max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_410.asm | ljhsiun2/medusa | 9 | 175279 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r8
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1133c, %rsi
lea addresses_D_ht+0x134cc, %rdi
nop
dec %r8
mov $54, %rcx
rep movsl
nop
nop
nop
mfence
lea addresses_WT_ht+0x13eac, %rax
nop
nop
nop
nop
and $15623, %rcx
mov $0x6162636465666768, %r9
movq %r9, (%rax)
add %rax, %rax
lea addresses_UC_ht+0xdc10, %rcx
nop
nop
nop
nop
nop
inc %rsi
vmovups (%rcx), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r9
nop
nop
dec %r8
lea addresses_UC_ht+0x59f4, %rsi
lea addresses_WT_ht+0xaffc, %rdi
nop
nop
dec %r13
mov $123, %rcx
rep movsw
nop
nop
cmp $44085, %rdi
lea addresses_UC_ht+0x112bc, %rsi
lea addresses_A_ht+0x747c, %rdi
nop
nop
sub %r9, %r9
mov $52, %rcx
rep movsw
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_A_ht+0x194bc, %rsi
lea addresses_A_ht+0xd1bc, %rdi
nop
nop
nop
nop
nop
dec %rbp
mov $125, %rcx
rep movsq
nop
nop
dec %rsi
lea addresses_A_ht+0xdefc, %rsi
nop
nop
nop
add %r13, %r13
mov (%rsi), %cx
nop
nop
nop
nop
cmp $18115, %rbp
lea addresses_A_ht+0xc7bc, %rdi
nop
nop
nop
nop
inc %r9
mov (%rdi), %r13w
nop
nop
cmp $58417, %r9
lea addresses_D_ht+0x1873c, %rsi
lea addresses_normal_ht+0x8878, %rdi
nop
nop
nop
and %rbp, %rbp
mov $76, %rcx
rep movsl
nop
cmp %rsi, %rsi
lea addresses_D_ht+0x1d35c, %r8
add %r13, %r13
mov $0x6162636465666768, %rax
movq %rax, %xmm2
movups %xmm2, (%r8)
nop
nop
nop
nop
add $39792, %r13
lea addresses_A_ht+0x16608, %rcx
nop
nop
nop
nop
cmp %r13, %r13
movw $0x6162, (%rcx)
nop
nop
nop
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %rax
push %rcx
push %rdi
// Load
lea addresses_UC+0x5f3c, %rax
nop
add %r10, %r10
mov (%rax), %r15d
nop
add %r12, %r12
// Faulty Load
mov $0x19857700000009bc, %rcx
nop
nop
nop
nop
nop
inc %r14
mov (%rcx), %ax
lea oracles, %r12
and $0xff, %rax
shlq $12, %rax
mov (%r12,%rax,1), %rax
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': True}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
test/Succeed/WithoutKRestrictive.agda | KDr2/agda | 0 | 7721 | <filename>test/Succeed/WithoutKRestrictive.agda
{-# OPTIONS --cubical-compatible --show-implicit #-}
-- {-# OPTIONS -v tc.lhs.split.well-formed:100 #-}
-- Andreas, adapted from <NAME>, 2013-05-29
module WithoutKRestrictive where
open import Common.Level
open import Common.Equality
open import Common.Product
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
data _≤_ : ℕ → ℕ → Set where
z≤n : ∀ {n} → zero ≤ n
s≤s : ∀ {n m} → n ≤ m → suc n ≤ suc m
_<_ : ℕ → ℕ → Set
n < m = suc n ≤ m
refl≤ : ∀ (n : ℕ) → n ≤ n
refl≤ zero = z≤n
refl≤ (suc n) = s≤s (refl≤ n)
data List {a} (A : Set a) : Set a where
[] : List A
_∷_ : (x : A) (xs : List A) → List A
length : {A : Set} → List A → ℕ
length [] = zero
length (x ∷ xs) = suc (length xs)
P : {A : Set} → List A → List A → Set
P xs ys = Σ _ (λ x → ys ≡ (x ∷ xs))
Q : {A : Set} → List A → List A → Set
Q xs ys = (length xs) < (length ys)
helper : {A : Set}(y : A)(xs : List A) → (length xs) < (length (y ∷ xs))
helper y [] = s≤s z≤n
helper y (x ∷ xs) = s≤s (refl≤ _)
-- Why the --cubical-compatible option rejects the following proof
foo : {A : Set}(xs ys : List A) → P xs ys → Q xs ys
foo xs .(x ∷ xs) (x , refl) = helper x xs
-- if I can prove foo using only subst
foo' : {A : Set}(xs ys : List A) → P xs ys → Q xs ys
foo' xs ys (x , h) =
subst (λ ys' → length xs < length ys') (sym h) (helper x xs)
|
Categories/Category/Construction/Arrow.agda | Taneb/agda-categories | 0 | 16289 | <reponame>Taneb/agda-categories
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Definition of the Arrow Category of a Category C
module Categories.Category.Construction.Arrow {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Data.Product using (_,_; _×_; map; zip)
open import Function using (_$_)
open import Relation.Binary using (Rel)
import Categories.Morphism as M
open M C
open import Categories.Morphism.Reasoning C
open Category C hiding (dom; cod)
open HomReasoning
private
variable
A B D E : Obj
record Morphism : Set (o ⊔ ℓ) where
field
{dom} : Obj
{cod} : Obj
arr : dom ⇒ cod
record Morphism⇒ (f g : Morphism) : Set (ℓ ⊔ e) where
constructor mor⇒
private
module f = Morphism f
module g = Morphism g
field
{dom⇒} : f.dom ⇒ g.dom
{cod⇒} : f.cod ⇒ g.cod
square : CommutativeSquare f.arr dom⇒ cod⇒ g.arr
Arrow : Category _ _ _
Arrow = record
{ Obj = Morphism
; _⇒_ = Morphism⇒
; _≈_ = λ f g → dom⇒ f ≈ dom⇒ g × cod⇒ f ≈ cod⇒ g
; id = mor⇒ $ identityˡ ○ ⟺ identityʳ
; _∘_ = λ m₁ m₂ → mor⇒ $ glue (square m₁) (square m₂)
; assoc = assoc , assoc
; sym-assoc = sym-assoc , sym-assoc
; identityˡ = identityˡ , identityˡ
; identityʳ = identityʳ , identityʳ
; identity² = identity² , identity²
; equiv = record
{ refl = refl , refl
; sym = map sym sym
; trans = zip trans trans
}
; ∘-resp-≈ = zip ∘-resp-≈ ∘-resp-≈
}
where open Morphism⇒
private
module MM = M Arrow
module _ where
open _≅_
lift-iso : ∀ {f h} →
(iso₁ : A ≅ D) → (iso₂ : B ≅ E) →
CommutativeSquare f (from iso₁) (from iso₂) h →
record { arr = f } MM.≅ record { arr = h }
lift-iso {f = f} {h = h} iso₁ iso₂ sq = record
{ from = record { square = sq }
; to = record { square = begin
to iso₂ ∘ h ≈⟨ introʳ (isoʳ iso₁) ⟩
(to iso₂ ∘ h) ∘ from iso₁ ∘ to iso₁ ≈⟨ assoc ⟩
to iso₂ ∘ h ∘ from iso₁ ∘ to iso₁ ≈˘⟨ refl ⟩∘⟨ pushˡ sq ⟩
to iso₂ ∘ (from iso₂ ∘ f) ∘ to iso₁ ≈˘⟨ assoc ⟩
(to iso₂ ∘ (from iso₂ ∘ f)) ∘ to iso₁ ≈⟨ cancelˡ (isoˡ iso₂) ⟩∘⟨ refl ⟩
f ∘ to iso₁ ∎ }
; iso = record
{ isoˡ = isoˡ iso₁ , isoˡ iso₂
; isoʳ = isoʳ iso₁ , isoʳ iso₂
}
}
|
extern/game_support/src/display-basic.ads | AdaCore/training_material | 15 | 29086 | <reponame>AdaCore/training_material<filename>extern/game_support/src/display-basic.ads<gh_stars>10-100
-----------------------------------------------------------------------
-- Ada Labs --
-- --
-- Copyright (C) 2008-2013, AdaCore --
-- --
-- Labs is free software; you can redistribute it and/or modify it --
-- under the terms of the GNU General Public License as published by --
-- the Free Software Foundation; either version 2 of the License, or --
-- (at your option) any later version. --
-- --
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. You should have received --
-- a copy of the GNU General Public License along with this program; --
-- if not, write to the Free Software Foundation, Inc., 59 Temple --
-- Place - Suite 330, Boston, MA 02111-1307, USA. --
-----------------------------------------------------------------------
package Display.Basic is
type Window_ID is private;
function Create_Window (Width : Integer; Height : Integer; Name : String) return Window_ID;
Graphical_Context_Not_Initialized : exception;
Too_Many_Windows: exception;
Too_Many_Canvas : exception;
type Canvas_ID is private;
function Get_Canvas(Window : Window_ID) return Canvas_ID;
type Point_2d is record
X : Float;
Y : Float;
end record;
type Point_3d is record
X : Float;
Y : Float;
Z : Float;
end record;
type Screen_Point is record
X, Y : Integer;
end record;
type Cursor_T is record
Position : Screen_Point;
Pressed : Boolean;
end record;
procedure Fill(Canvas : Canvas_ID; Color: RGBA_T);
procedure Draw_Sphere (Canvas : Canvas_ID; Position: Point_3d; Radius : Float; Color: RGBA_T);
procedure Draw_Sphere (Canvas : Canvas_ID; Position: Screen_Point; Radius : Integer; Color: RGBA_T);
procedure Draw_Circle (Canvas : Canvas_ID; Position: Point_3d; Radius : Float; Color: RGBA_T);
procedure Draw_Circle (Canvas : Canvas_ID; Position: Screen_Point; Radius : Integer; Color: RGBA_T);
procedure Draw_Line (Canvas : Canvas_ID; P1: Point_3d; P2 : Point_3d; Color: RGBA_T);
procedure Draw_Line (Canvas : Canvas_ID; P1: Screen_Point; P2 : Screen_Point; Color: RGBA_T);
procedure Draw_Text (Canvas : Canvas_ID; Position: Point_3d; Text : String; Color: RGBA_T; Bg_Color : RGBA_T := Black; Wrap: Boolean := True);
procedure Draw_Text (Canvas : Canvas_ID; Position: Screen_Point; Text : String; Color: RGBA_T; Bg_Color : RGBA_T := Black; Wrap: Boolean := True);
procedure Draw_Rect (Canvas : Canvas_ID; Position : Point_3d; Width, Height : Float; Color : RGBA_T);
procedure Draw_Rect (Canvas : Canvas_ID; Position : Screen_Point; Width, Height : Integer; Color : RGBA_T);
procedure Draw_Fill_Rect (Canvas : Canvas_ID; Position : Point_3d; Width, Height : Float; Color : RGBA_T);
procedure Draw_Fill_Rect (Canvas : Canvas_ID; Position : Screen_Point; Width, Height : Integer; Color : RGBA_T);
procedure Set_Pixel (Canvas : Canvas_ID; Position : Screen_Point; Color : RGBA_T);
procedure Enable_3d_Light (Canvas : Canvas_ID);
procedure Disable_3d_Light (Canvas : Canvas_ID);
procedure Set_3d_Light (Canvas : Canvas_ID;
Position : Point_3d;
Diffuse_Color : RGBA_T;
Ambient_Color : RGBA_T);
function Get_Text_Size(Text : String) return Screen_Point;
function Get_Zoom_Factor (Canvas : Canvas_ID) return Float;
procedure Set_Zoom_Factor (Canvas : Canvas_ID; ZF : Float);
procedure Set_Center (Canvas : Canvas_ID; Position : Point_3d);
procedure Set_Center (Canvas : Canvas_ID; Position : Screen_Point);
function Get_Center (Canvas : Canvas_ID) return Screen_Point;
function Get_Canvas_Size(Canvas : Canvas_ID) return Screen_Point;
procedure Swap_Buffers(Window : Window_ID; Erase : Boolean := True);
-- Update the canvas
-- copy the hidden buffer to the visible buffer
procedure Swap_Copy_Buffers(Window : Window_ID);
-- Update the canvas
function Get_Cursor_Status return Cursor_T;
function To_Point3d (Canvas : Canvas_ID; P : Screen_Point) return Point_3d;
function To_Screen_Point (Canvas : Canvas_ID; P : Point_3d) return Screen_Point;
function Is_Killed return Boolean;
private
type Window_ID_Range is range 0 .. 10;
type Window_ID is new Window_ID_Range;
type Canvas_ID_Range is range 1 .. 1024;
type Canvas_ID is new Canvas_ID_Range;
end Display.Basic;
|
src/gen-model-mappings.adb | Letractively/ada-gen | 0 | 7620 | <reponame>Letractively/ada-gen
-----------------------------------------------------------------------
-- gen-model-mappings -- Type mappings for Code Generator
-- Copyright (C) 2011, 2012 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Log.Loggers;
-- The <b>Gen.Model.Mappings</b> package controls the mappings to convert an XML
-- type into the Ada type.
package body Gen.Model.Mappings is
use Ada.Strings.Unbounded;
use Util.Log;
Log : constant Loggers.Logger := Loggers.Create ("Gen.Model.Mappings");
Types : Mapping_Maps.Map;
Mapping_Name : Unbounded_String;
-- ------------------------------
-- Mapping Definition
-- ------------------------------
-- Get the value identified by the name.
-- If the name cannot be found, the method should return the Null object.
-- ------------------------------
overriding
function Get_Value (From : in Mapping_Definition;
Name : in String) return Util.Beans.Objects.Object is
begin
if Name = "name" then
return Util.Beans.Objects.To_Object (From.Target);
elsif Name = "isBoolean" then
return Util.Beans.Objects.To_Object (From.Kind = T_BOOLEAN);
elsif Name = "isInteger" then
return Util.Beans.Objects.To_Object (From.Kind = T_INTEGER);
elsif Name = "isString" then
return Util.Beans.Objects.To_Object (From.Kind = T_STRING);
elsif Name = "isIdentifier" then
return Util.Beans.Objects.To_Object (From.Kind = T_IDENTIFIER);
elsif Name = "isDate" then
return Util.Beans.Objects.To_Object (From.Kind = T_DATE);
elsif Name = "isBlob" then
return Util.Beans.Objects.To_Object (From.Kind = T_BLOB);
elsif Name = "isEnum" then
return Util.Beans.Objects.To_Object (From.Kind = T_ENUM);
elsif Name = "isPrimitiveType" then
return Util.Beans.Objects.To_Object (From.Kind /= T_TABLE and From.Kind /= T_BLOB);
else
return Definition (From).Get_Value (Name);
end if;
end Get_Value;
-- ------------------------------
-- Find the mapping for the given type name.
-- ------------------------------
function Find_Type (Name : in Ada.Strings.Unbounded.Unbounded_String)
return Mapping_Definition_Access is
Pos : constant Mapping_Maps.Cursor := Types.Find (Mapping_Name & Name);
begin
if Mapping_Maps.Has_Element (Pos) then
return Mapping_Maps.Element (Pos);
else
Log.Info ("Type '{0}' not found in mapping table '{1}'",
To_String (Name), To_String (Mapping_Name));
return null;
end if;
end Find_Type;
procedure Register_Type (Name : in String;
Mapping : in Mapping_Definition_Access;
Kind : in Basic_Type) is
N : constant Unbounded_String := Mapping_Name & To_Unbounded_String (Name);
Pos : constant Mapping_Maps.Cursor := Types.Find (N);
begin
Log.Debug ("Register type '{0}'", Name);
if not Mapping_Maps.Has_Element (Pos) then
Mapping.Kind := Kind;
Types.Insert (N, Mapping);
end if;
end Register_Type;
-- ------------------------------
-- Register a type mapping <b>From</b> that is mapped to <b>Target</b>.
-- ------------------------------
procedure Register_Type (Target : in String;
From : in String;
Kind : in Basic_Type) is
Name : constant Unbounded_String := Mapping_Name & To_Unbounded_String (From);
Pos : constant Mapping_Maps.Cursor := Types.Find (Name);
Mapping : Mapping_Definition_Access;
begin
Log.Debug ("Register type '{0}' mapped to '{1}' type {2}",
From, Target, Basic_Type'Image (Kind));
if Mapping_Maps.Has_Element (Pos) then
Mapping := Mapping_Maps.Element (Pos);
else
Mapping := new Mapping_Definition;
Types.Insert (Name, Mapping);
end if;
Mapping.Target := To_Unbounded_String (Target);
Mapping.Kind := Kind;
end Register_Type;
-- ------------------------------
-- Setup the type mapping for the language identified by the given name.
-- ------------------------------
procedure Set_Mapping_Name (Name : in String) is
begin
Log.Info ("Using type mapping {0}", Name);
Mapping_Name := To_Unbounded_String (Name & ".");
end Set_Mapping_Name;
end Gen.Model.Mappings;
|
thirdparty/adasdl/thin/adasdl/AdaSDL/binding/sdl-timer.ads | Lucretia/old_nehe_ada95 | 0 | 29647 | <filename>thirdparty/adasdl/thin/adasdl/AdaSDL/binding/sdl-timer.ads
-- ----------------------------------------------------------------- --
-- AdaSDL --
-- Binding to Simple Direct Media Layer --
-- Copyright (C) 2001 A.M.F.Vargas --
-- <NAME> --
-- Ponta Delgada - Azores - Portugal --
-- http://www.adapower.net/~avargas --
-- E-mail: <EMAIL> --
-- ----------------------------------------------------------------- --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
-- ----------------------------------------------------------------- --
-- **************************************************************** --
-- This is an Ada binding to SDL ( Simple DirectMedia Layer from --
-- Sam Lantinga - www.libsld.org ) --
-- **************************************************************** --
-- In order to help the Ada programmer, the comments in this file --
-- are, in great extent, a direct copy of the original text in the --
-- SDL header files. --
-- **************************************************************** --
with System;
with SDL.Types; use SDL.Types;
package SDL.Timer is
-- This is the OS scheduler timeslice, in milliseconds
TIMESLICE : constant := 10;
-- This is the maximum resolution of the SDL timer on all platforms
RESOLUTION : constant := 10; -- Experimentally determined
-- Get the number of milliseconds since the SDL library initialization.
-- Note that this value wraps if the program runs for more than ~49 days.
function GetTicks return Uint32;
pragma Import (C, GetTicks, "SDL_GetTicks");
-- Wait a specified number of milliseconds before returning
procedure SDL_Delay (ms : Uint32);
pragma Import (C, SDL_Delay, "SDL_Delay");
-- Function pointer prototype for the timer callback function
type TimerCallback_ptr is
access function (interval : Uint32) return Uint32;
pragma Convention (C, TimerCallback_ptr);
-- Set a callback to run after the specified number of milliseconds has
-- elapsed. The callback function is passed the current timer interval
-- and returns the next timer interval. If the returned value is the
-- same as the one passed in, the periodic alarm continues, otherwise a
-- new alarm is scheduled. If the callback returns 0, the periodic alarm
-- is cancelled.
-- To cancel a currently running timer, call SetTimer(0, NULL);
-- The timer callback function may run in a different thread than your
-- main code, and so shouldn't call any functions from within itself.
-- The maximum resolution of this timer is 10 ms, which means that if
-- you request a 16 ms timer, your callback will run approximately 20 ms
-- later on an unloaded system. If you wanted to set a flag signaling
-- a frame update at 30 frames per second (every 33 ms), you might set a
-- timer for 30 ms:
-- SetTimer((33/10)*10, flag_update);
-- If you use this function, you need to pass INIT_TIMER to SDL_Init().
-- Under UNIX, you should not use raise or use SIGALRM and this function
-- in the same program, as it is implemented using setitimer(). You also
-- should not use this function in multi-threaded applications as signals
-- to multi-threaded apps have undefined behavior in some implementations.
function SetTimer (
interval : Uint32;
callback : TimerCallback_ptr)
return C.int;
procedure SetTimer (
interval : Uint32;
callback : TimerCallback_ptr);
pragma Import (C, SetTimer, "SDL_SetTimer");
-- New timer API, supports multiple timers
-- Written by <NAME> <<EMAIL>>
-- Function prototype for the new timer callback function.
-- The callback function is passed the current timer interval and returns
-- the next timer interval. If the returned value is the same as the one
-- passed in, the periodic alarm continues, otherwise a new alarm is
-- scheduled. If the callback returns 0, the periodic alarm is cancelled.
type NewTimerCallback_ptr is
access function (
interval : Uint32;
param : System.Address)
return Uint32;
pragma Convention (C, NewTimerCallback_ptr);
-- Definition of the timer ID type
type TimerID is new System.Address;
Null_TimerID : constant TimerID := TimerID (System.Null_Address);
-- Add a new timer to the pool of timers already running.
-- Returns a timer ID, or NULL when an error occurs.
function AddTimer (
interval : Uint32;
callback : NewTimerCallback_ptr;
param : System.Address)
return TimerID;
pragma Import (C, AddTimer, "SDL_AddTimer");
-- Remove one of the multiple timers knowing its ID.
-- Returns a boolean value indicating success.
function RemoveTimer (t : TimerID) return SDL_bool;
pragma Import (C, RemoveTimer, "SDL_RemoveTimer");
end SDL.Timer;
|
programs/oeis/121/A121816.asm | karttu/loda | 1 | 244211 | ; A121816: Conjectured chromatic number of the square of an outerplanar graph G^2 as a function of the maximum degree of a vertex of G.
; 9,10,11,12,13,14,16,17,19,20,22,23,25,26,28,29,31,32,34,35,37,38,40,41,43,44,46,47,49,50,52,53,55,56,58,59,61,62,64,65,67,68,70,71,73,74,76,77,79,80,82,83,85,86,88,89,91,92,94,95,97,98,100
mov $1,$0
div $1,2
trn $1,2
add $1,$0
add $1,9
|
programs/oeis/000/A000387.asm | neoneye/loda | 22 | 168188 | <reponame>neoneye/loda<filename>programs/oeis/000/A000387.asm<gh_stars>10-100
; A000387: Rencontres numbers: number of permutations of [n] with exactly two fixed points.
; 0,0,1,0,6,20,135,924,7420,66744,667485,7342280,88107426,1145396460,16035550531,240533257860,3848532125880,65425046139824,1177650830516985,22375365779822544,447507315596451070,9397653627525472260,206748379805560389951,4755212735527888968620,114125105652669335247156,2853127641316733381178600,74181318674235067910643925,2002895604204346833587385624,56081076917721711340446797850,1626351230613929628872957137244,48790536918417888866188714117755,1512506644470954554851850137649940,48400212623070545755259204404798576
mov $2,$0
mov $4,$0
lpb $0
lpb $0
sub $0,1
add $1,$4
add $3,1
gcd $0,$3
mul $1,$3
sub $2,1
mul $4,-1
lpe
mul $0,$2
lpe
div $1,2
mov $0,$1
|
Data/Int.agda | esoeylemez/agda-simple | 1 | 1087 | -- Copyright: (c) 2016 <NAME>
-- License: BSD3
-- Maintainer: <NAME> <<EMAIL>>
module Data.Int where
open import Algebra.Group
open import Classes
open import Core
open import Data.Int.Core
open import Data.Int.Core public
using (ℤ; ℤ-Negative; ℤ-Number; negsuc; pos)
ℤ,+ : Group
ℤ,+ =
record {
semigroup = record {
A = ℤ;
Eq = PropEq ℤ;
semigroupOver = record {
_⋄_ = _+_;
⋄-cong = cong2 _+_;
assoc = Props.+-assoc
}
};
isGroup = record {
isMonoid = record {
id = 0;
left-id = Props.+-left-id;
right-id = Props.+-right-id
};
iso = λ x → record {
inv = neg x;
left-inv = Props.+-left-inv x;
right-inv = Props.+-right-inv x
};
inv-cong = cong neg
}
}
ℤ,* : Monoid
ℤ,* =
record {
semigroup = record {
A = ℤ;
Eq = PropEq ℤ;
semigroupOver = record {
_⋄_ = _*_;
⋄-cong = cong2 _*_;
assoc = Props.*-assoc
}
};
isMonoid = record {
id = 1;
left-id = Props.*-left-id;
right-id = Props.*-right-id
}
}
|
test/interaction/Issue1266whyInScope.agda | cruhland/agda | 1,989 | 9943 | -- Andreas, 2014-09-03
-- Test explanation of local shadowed by import.
module _ where
module M where
A = Set1
test : (A : Set) → let open M in {!A!}
test A = Set
-- The A exported by M is in competition with the local A.
-- Ambiguous name should be reported.
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_19253_297.asm | ljhsiun2/medusa | 9 | 240353 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x7a47, %r8
nop
nop
nop
nop
nop
and %rcx, %rcx
movb (%r8), %r13b
nop
nop
lfence
lea addresses_WC_ht+0x11fc7, %rsi
lea addresses_normal_ht+0xc577, %rdi
xor %r10, %r10
mov $32, %rcx
rep movsw
nop
nop
nop
nop
cmp %r13, %r13
lea addresses_D_ht+0x5291, %rdi
nop
nop
nop
nop
dec %rsi
movw $0x6162, (%rdi)
cmp $60315, %r13
lea addresses_A_ht+0x15e57, %rdi
inc %r15
mov (%rdi), %r13d
nop
cmp $13010, %r10
lea addresses_WT_ht+0x5ac7, %rsi
nop
and %r15, %r15
mov $0x6162636465666768, %r8
movq %r8, %xmm3
movups %xmm3, (%rsi)
nop
nop
add $28758, %rdi
lea addresses_WT_ht+0xbd07, %rcx
nop
nop
and %r15, %r15
movups (%rcx), %xmm3
vpextrq $0, %xmm3, %rdi
add %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_PSE+0x180ff, %r15
nop
nop
nop
cmp $40392, %rdx
movw $0x5152, (%r15)
dec %r10
// REPMOV
lea addresses_D+0x1457, %rsi
lea addresses_PSE+0xac7, %rdi
nop
nop
sub $28481, %r10
mov $94, %rcx
rep movsw
nop
nop
nop
xor $35265, %r15
// Faulty Load
lea addresses_US+0x52c7, %r10
and %r9, %r9
mov (%r10), %r15d
lea oracles, %rdi
and $0xff, %r15
shlq $12, %r15
mov (%rdi,%r15,1), %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_US', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 11, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_D'}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_US', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 1}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 4}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 11}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 6}}
{'00': 19253}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_25.asm | ljhsiun2/medusa | 9 | 97047 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r8
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xcfac, %rsi
lea addresses_normal_ht+0x65c6, %rdi
nop
nop
nop
nop
cmp %rbp, %rbp
mov $106, %rcx
rep movsq
nop
nop
sub $45918, %rcx
lea addresses_UC_ht+0x26c6, %r15
nop
nop
nop
and $2795, %rdi
movw $0x6162, (%r15)
and $32206, %r12
lea addresses_UC_ht+0x1b8c6, %rcx
nop
nop
nop
inc %r15
movw $0x6162, (%rcx)
xor $24879, %rsi
lea addresses_D_ht+0xcd46, %rsi
lea addresses_WT_ht+0x17fc6, %rdi
nop
xor %rbp, %rbp
mov $11, %rcx
rep movsq
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_UC_ht+0x1be46, %rsi
lea addresses_UC_ht+0x19382, %rdi
nop
nop
nop
nop
sub $427, %r8
mov $97, %rcx
rep movsw
nop
inc %rsi
lea addresses_A_ht+0x1198e, %rdi
nop
nop
nop
nop
nop
and $8897, %rsi
movw $0x6162, (%rdi)
nop
nop
nop
add %rbp, %rbp
lea addresses_D_ht+0xd9c6, %r15
nop
nop
nop
nop
nop
and %rcx, %rcx
movb $0x61, (%r15)
nop
nop
nop
inc %rsi
lea addresses_WC_ht+0x1aeba, %r12
nop
and $61364, %rcx
vmovups (%r12), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r8
nop
nop
nop
nop
nop
xor %r15, %r15
lea addresses_D_ht+0xe7c6, %rcx
clflush (%rcx)
nop
xor $269, %rbp
mov $0x6162636465666768, %rsi
movq %rsi, (%rcx)
nop
nop
nop
xor %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r9
push %rax
push %rbp
// Faulty Load
lea addresses_A+0xa7c6, %r9
nop
nop
nop
nop
and $56228, %rbp
vmovaps (%r9), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r12
lea oracles, %r14
and $0xff, %r12
shlq $12, %r12
mov (%r14,%r12,1), %r12
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'AVXalign': True, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}}
{'08': 9, '48': 16652, '72': 12, '00': 5156}
48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 00 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 48 48 48 48 48 48 00 00 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 48 48 00 00 00 48 48 48 48 48 00 48 00 00 48 48 48 48 48 48 48 00 48 48 48 00 48 00 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 00 00 00 48 48 48 00 00 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 48 48 48 48 48 48 48 00 00 48 48 48 00 48 48 00 48 48 00 00 48 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 00 00 48 48 48 48 00 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 48 48 00 00 48 48 48 00 00 48 00 00 48 00 48 48 00 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 00 00 00 48 48 48 48 00 48 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 00 00 48 48 00 00 48 48 48 00 48 48 48 00 00 48 00 00 48 48 00 00 48 48 00 00 48 00 00 48 00 00 48 00 00 48 00 00 00 48 00 48 48 48 00 48 48 48 00 48 48 48 00 48 48 48 00 00 48 00 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 48 48 48 00 48 48 00 48 48 48 48 00 00 48 48 48 48 00 00 48 00 48 48 00 00 00 48 48 48 48 48 00 48 48 48 48 48 00 00 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 00 48 48 00 48 48 48 48 48 00 00 00 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 00 48 48 00 00 48 48 00 48 00 48 48 48 48 48 00 00 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 72 48 48 48 48 48 48 48 48 48 00 00 48 00 48 00 00 48 48 00 00 48 48 00 48 48 48 48 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 00 00 00 48 48 48 00 48 00 48 48 00 00 48 00 00 00 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 48 00 00 48 48 48 00 00 48 00 00 48 48 48 48 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 00 00 48 48 48 00 48 00 48 48 48 00 48 48 00 00 48 00 48 48 48 00 00 48 48 00 00 48 48 00 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 00 00 00 48 48 48 00 00 48 48 48 48 48 48 00 48 48 48 00 00 48 48 00 00 48 48 00 00 48 48 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 00 00 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 48 48 00 00 48 00 00 00 48 48 48 00 00 00 48 48 00 00 48 00 00 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 00 48 48 00 00 00 00 48 00 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48
*/
|
src/Human/Equality.agda | MaisaMilena/AgdaCalculator | 1 | 2147 | <filename>src/Human/Equality.agda
module Human.Equality where
data _==_ {A : Set} (x : A) : A -> Set where
refl : x == x
{-# BUILTIN EQUALITY _==_ #-}
sym : {A : Set} (x : A) (y : A) -> x == y -> y == x
sym x .x refl = refl
cong : {A : Set} {B : Set} (x : A) (y : A) (f : A -> B) -> x == y -> f x == f y
cong x y f refl = refl
|
source/commands/miscellany.asm | paulscottrobson/x16-basic | 1 | 99781 | ; *****************************************************************************
; *****************************************************************************
;
; Name : miscellany.asm
; Purpose : X16-Basic Miscellaneous
; Author : <NAME> (<EMAIL>)
; Date : 8th February 2020
;
; *****************************************************************************
; *****************************************************************************
; *****************************************************************************
;
; Assert command
;
; *****************************************************************************
Command_Assert: ;; assert
ldx #0 ; get a single parameter
getparam_n SyntaxError ; not a float.
lda xsIntLow,x ; check it is non-zero
ora xsIntHigh,x
beq _CAFail
rts
_CAFail:berror "Assert"
; *****************************************************************************
;
; Remark followed by a quoted string perhaps
;
; *****************************************************************************
Command_Rem: ;; rem
lda (codePtr),y
cmp #TOK_STRING_OBJ ; is there a string ?
bne _CRExit
iny ; then skip over it.
sec
tya
adc (codePtr),y
tay
_CRExit:
rts
|
oeis/266/A266435.asm | neoneye/loda-programs | 11 | 14537 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A266435: Binary representation of the n-th iteration of the "Rule 23" elementary cellular automaton starting with a single ON (black) cell.
; Submitted by <NAME>(s2)
; 1,111,0,1111111,0,11111111111,0,111111111111111,0,1111111111111111111,0,11111111111111111111111,0,111111111111111111111111111,0,1111111111111111111111111111111,0,11111111111111111111111111111111111,0,111111111111111111111111111111111111111,0,1111111111111111111111111111111111111111111,0,11111111111111111111111111111111111111111111111,0,111111111111111111111111111111111111111111111111111,0,1111111111111111111111111111111111111111111111111111111,0
dif $0,-2
mul $0,2
add $0,1
mov $2,10
pow $2,$0
mov $0,$2
div $0,9
|
arch/ARM/RP/svd/rp2040/rp_svd-xip_ctrl.ads | morbos/Ada_Drivers_Library | 2 | 6121 | <filename>arch/ARM/RP/svd/rp2040/rp_svd-xip_ctrl.ads
-- Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
--
-- SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from rp2040.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
-- QSPI flash execute-in-place block
package RP_SVD.XIP_CTRL is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Cache control
type CTRL_Register is record
-- When 1, enable the cache. When the cache is disabled, all XIP
-- accesses\n will go straight to the flash, without querying the cache.
-- When enabled,\n cacheable XIP accesses will query the cache, and the
-- flash will\n not be accessed if the tag matches and the valid bit is
-- set.\n\n If the cache is enabled, cache-as-SRAM accesses have no
-- effect on the\n cache data RAM, and will produce a bus error
-- response.
EN : Boolean := True;
-- When 1, writes to any alias other than 0x0 (caching, allocating)\n
-- will produce a bus fault. When 0, these writes are silently
-- ignored.\n In either case, writes to the 0x0 alias will deallocate on
-- tag match,\n as usual.
ERR_BADWRITE : Boolean := True;
-- unspecified
Reserved_2_2 : HAL.Bit := 16#0#;
-- When 1, the cache memories are powered down. They retain state,\n but
-- can not be accessed. This reduces static power dissipation.\n Writing
-- 1 to this bit forces CTRL_EN to 0, i.e. the cache cannot\n be enabled
-- when powered down.\n Cache-as-SRAM accesses will produce a bus error
-- response when\n the cache is powered down.
POWER_DOWN : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CTRL_Register use record
EN at 0 range 0 .. 0;
ERR_BADWRITE at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
POWER_DOWN at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-- Cache Flush control
type FLUSH_Register is record
-- After a write operation all bits in the field are cleared (set to
-- zero). Write 1 to flush the cache. This clears the tag memory, but\n
-- the data memory retains its contents. (This means cache-as-SRAM\n
-- contents is not affected by flush or reset.)\n Reading will hold the
-- bus (stall the processor) until the flush\n completes. Alternatively
-- STAT can be polled until completion.
FLUSH : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for FLUSH_Register use record
FLUSH at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- Cache Status
type STAT_Register is record
-- Read-only. Reads as 0 while a cache flush is in progress, and 1
-- otherwise.\n The cache is flushed whenever the XIP block is reset,
-- and also\n when requested via the FLUSH register.
FLUSH_READY : Boolean;
-- Read-only. When 1, indicates the XIP streaming FIFO is completely
-- empty.
FIFO_EMPTY : Boolean;
-- Read-only. When 1, indicates the XIP streaming FIFO is completely
-- full.\n The streaming FIFO is 2 entries deep, so the full and empty\n
-- flag allow its level to be ascertained.
FIFO_FULL : Boolean;
-- unspecified
Reserved_3_31 : HAL.UInt29;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STAT_Register use record
FLUSH_READY at 0 range 0 .. 0;
FIFO_EMPTY at 0 range 1 .. 1;
FIFO_FULL at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype STREAM_ADDR_STREAM_ADDR_Field is HAL.UInt30;
-- FIFO stream address
type STREAM_ADDR_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- The address of the next word to be streamed from flash to the
-- streaming FIFO.\n Increments automatically after each flash access.\n
-- Write the initial access address here before starting a streaming
-- read.
STREAM_ADDR : STREAM_ADDR_STREAM_ADDR_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STREAM_ADDR_Register use record
Reserved_0_1 at 0 range 0 .. 1;
STREAM_ADDR at 0 range 2 .. 31;
end record;
subtype STREAM_CTR_STREAM_CTR_Field is HAL.UInt22;
-- FIFO stream control
type STREAM_CTR_Register is record
-- Write a nonzero value to start a streaming read. This will then\n
-- progress in the background, using flash idle cycles to transfer\n a
-- linear data block from flash to the streaming FIFO.\n Decrements
-- automatically (1 at a time) as the stream\n progresses, and halts on
-- reaching 0.\n Write 0 to halt an in-progress stream, and discard any
-- in-flight\n read, so that a new stream can immediately be started
-- (after\n draining the FIFO and reinitialising STREAM_ADDR)
STREAM_CTR : STREAM_CTR_STREAM_CTR_Field := 16#0#;
-- unspecified
Reserved_22_31 : HAL.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for STREAM_CTR_Register use record
STREAM_CTR at 0 range 0 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- QSPI flash execute-in-place block
type XIP_CTRL_Peripheral is record
-- Cache control
CTRL : aliased CTRL_Register;
-- Cache Flush control
FLUSH : aliased FLUSH_Register;
-- Cache Status
STAT : aliased STAT_Register;
-- Cache Hit counter\n A 32 bit saturating counter that increments upon
-- each cache hit,\n i.e. when an XIP access is serviced directly from
-- cached data.\n Write any value to clear.
CTR_HIT : aliased HAL.UInt32;
-- Cache Access counter\n A 32 bit saturating counter that increments
-- upon each XIP access,\n whether the cache is hit or not. This
-- includes noncacheable accesses.\n Write any value to clear.
CTR_ACC : aliased HAL.UInt32;
-- FIFO stream address
STREAM_ADDR : aliased STREAM_ADDR_Register;
-- FIFO stream control
STREAM_CTR : aliased STREAM_CTR_Register;
-- FIFO stream data\n Streamed data is buffered here, for retrieval by
-- the system DMA.\n This FIFO can also be accessed via the XIP_AUX
-- slave, to avoid exposing\n the DMA to bus stalls caused by other XIP
-- traffic.
STREAM_FIFO : aliased HAL.UInt32;
end record
with Volatile;
for XIP_CTRL_Peripheral use record
CTRL at 16#0# range 0 .. 31;
FLUSH at 16#4# range 0 .. 31;
STAT at 16#8# range 0 .. 31;
CTR_HIT at 16#C# range 0 .. 31;
CTR_ACC at 16#10# range 0 .. 31;
STREAM_ADDR at 16#14# range 0 .. 31;
STREAM_CTR at 16#18# range 0 .. 31;
STREAM_FIFO at 16#1C# range 0 .. 31;
end record;
-- QSPI flash execute-in-place block
XIP_CTRL_Periph : aliased XIP_CTRL_Peripheral
with Import, Address => XIP_CTRL_Base;
end RP_SVD.XIP_CTRL;
|
Ejemplos/SwordFish/Blink/Demo project ThunderBolt Nova.asm | DAFRELECTRONICS/ThunderBolt-Nova | 0 | 94783 | ; Swordfish Structured BASIC Compiler for PICmicros.
; Version 1.1.6.3 SE Copyright Mecanique 2013
;
; C:\Users\<NAME>\Documents\SwordfishSE\Demo project ThunderBolt Nova.BAS 25/01/2017
;
PROCESSOR PIC18F14K50
RADIX DEC
ERRORLEVEL 2
EXPAND ON
; SPECIAL FUNCTION REGISTERS...
UEP0 EQU 0X0F53
UEP1 EQU 0X0F54
UEP2 EQU 0X0F55
UEP3 EQU 0X0F56
UEP4 EQU 0X0F57
UEP5 EQU 0X0F58
UEP6 EQU 0X0F59
UEP7 EQU 0X0F5A
UEIE EQU 0X0F5B
UADDR EQU 0X0F5C
UFRML EQU 0X0F5D
UFRMLH EQU 0X0F5E
UFRMH EQU 0X0F5E
UEIR EQU 0X0F5F
UIE EQU 0X0F60
UCFG EQU 0X0F61
UIR EQU 0X0F62
USTAT EQU 0X0F63
UCON EQU 0X0F64
SRCON0 EQU 0X0F68
SRCON1 EQU 0X0F69
CM2CON0 EQU 0X0F6B
CM2CON1 EQU 0X0F6C
CM1CON0 EQU 0X0F6D
SSPMSK EQU 0X0F6F
SLRCON EQU 0X0F76
WPUA EQU 0X0F77
WPUB EQU 0X0F78
IOCA EQU 0X0F79
IOCB EQU 0X0F7A
ANSEL EQU 0X0F7E
ANSELH EQU 0X0F7F
LATA EQU 0X0F89
LATB EQU 0X0F8A
LATC EQU 0X0F8B
DDRA EQU 0X0F92
TRISA EQU 0X0F92
DDRB EQU 0X0F93
TRISB EQU 0X0F93
DDRC EQU 0X0F94
TRISC EQU 0X0F94
OSCTUNE EQU 0X0F9B
PIE1 EQU 0X0F9D
PIR1 EQU 0X0F9E
IPR1 EQU 0X0F9F
PIE2 EQU 0X0FA0
PIR2 EQU 0X0FA1
IPR2 EQU 0X0FA2
EECON1 EQU 0X0FA6
EECON2 EQU 0X0FA7
EEDATA EQU 0X0FA8
EEADR EQU 0X0FA9
RCSTA EQU 0X0FAB
TXSTA EQU 0X0FAC
TXREG EQU 0X0FAD
RCREG EQU 0X0FAE
SPBRG EQU 0X0FAF
SPBRGH EQU 0X0FB0
T3CON EQU 0X0FB1
TMR3L EQU 0X0FB2
TMR3LH EQU 0X0FB3
TMR3H EQU 0X0FB3
ECCP1AS EQU 0X0FB6
PWM1CON EQU 0X0FB7
BAUDCON EQU 0X0FB8
BAUDCTL EQU 0X0FB8
PSTRCON EQU 0X0FB9
REFCON0 EQU 0X0FBA
VREFCON0 EQU 0X0FBA
REFCON1 EQU 0X0FBB
VREFCON1 EQU 0X0FBB
REFCON2 EQU 0X0FBC
VREFCON2 EQU 0X0FBC
CCP1CON EQU 0X0FBD
CCPR1 EQU 0X0FBE
CCPR1L EQU 0X0FBE
CCPR1LH EQU 0X0FBF
CCPR1H EQU 0X0FBF
ADCON2 EQU 0X0FC0
ADCON1 EQU 0X0FC1
ADCON0 EQU 0X0FC2
ADRES EQU 0X0FC3
ADRESL EQU 0X0FC3
ADRESLH EQU 0X0FC4
ADRESH EQU 0X0FC4
SSPCON2 EQU 0X0FC5
SSPCON1 EQU 0X0FC6
SSPSTAT EQU 0X0FC7
SSPADD EQU 0X0FC8
SSPBUF EQU 0X0FC9
T2CON EQU 0X0FCA
PR2 EQU 0X0FCB
TMR2 EQU 0X0FCC
T1CON EQU 0X0FCD
TMR1L EQU 0X0FCE
TMR1LH EQU 0X0FCF
TMR1H EQU 0X0FCF
RCON EQU 0X0FD0
WDTCON EQU 0X0FD1
OSCCON2 EQU 0X0FD2
OSCCON EQU 0X0FD3
T0CON EQU 0X0FD5
TMR0L EQU 0X0FD6
TMR0LH EQU 0X0FD7
TMR0H EQU 0X0FD7
STATUS EQU 0X0FD8
FSR2L EQU 0X0FD9
FSR2LH EQU 0X0FDA
FSR2H EQU 0X0FDA
PLUSW2 EQU 0X0FDB
PREINC2 EQU 0X0FDC
POSTDEC2 EQU 0X0FDD
POSTINC2 EQU 0X0FDE
INDF2 EQU 0X0FDF
BSR EQU 0X0FE0
FSR1L EQU 0X0FE1
FSR1LH EQU 0X0FE2
FSR1H EQU 0X0FE2
PLUSW1 EQU 0X0FE3
PREINC1 EQU 0X0FE4
POSTDEC1 EQU 0X0FE5
POSTINC1 EQU 0X0FE6
INDF1 EQU 0X0FE7
WREG EQU 0X0FE8
FSR0L EQU 0X0FE9
FSR0LH EQU 0X0FEA
FSR0H EQU 0X0FEA
PLUSW0 EQU 0X0FEB
PREINC0 EQU 0X0FEC
POSTDEC0 EQU 0X0FED
POSTINC0 EQU 0X0FEE
INDF0 EQU 0X0FEF
INTCON3 EQU 0X0FF0
INTCON2 EQU 0X0FF1
INTCON EQU 0X0FF2
PROD EQU 0X0FF3
PRODL EQU 0X0FF3
PRODLH EQU 0X0FF4
PRODH EQU 0X0FF4
TABLAT EQU 0X0FF5
TBLPTR EQU 0X0FF6
TBLPTRL EQU 0X0FF6
TBLPTRLH EQU 0X0FF7
TBLPTRH EQU 0X0FF7
TBLPTRU EQU 0X0FF8
PC EQU 0X0FF9
PCL EQU 0X0FF9
PCLATH EQU 0X0FFA
PCLATU EQU 0X0FFB
STKPTR EQU 0X0FFC
TOS EQU 0X0FFD
TOSL EQU 0X0FFD
TOSLH EQU 0X0FFE
TOSH EQU 0X0FFE
TOSU EQU 0X0FFF
; SYSTEM PORTS...
PORTC EQU 0X0F82
PORTB EQU 0X0F81
PORTA EQU 0X0F80
; UEP0
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP1
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP2
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP3
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP4
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP5
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP6
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEP7
EPSTALL = 0
EPINEN = 1
EPOUTEN = 2
EPCONDIS = 3
EPHSHK = 4
; UEIE
PIDEE = 0
CRC5EE = 1
CRC16EE = 2
DFN8EE = 3
BTOEE = 4
BTSEE = 7
; UADDR
ADDR0 = 0
ADDR1 = 1
ADDR2 = 2
ADDR3 = 3
ADDR4 = 4
ADDR5 = 5
ADDR6 = 6
; UFRML
FRM0 = 0
FRM1 = 1
FRM2 = 2
FRM3 = 3
FRM4 = 4
FRM5 = 5
FRM6 = 6
FRM7 = 7
; UFRMH
FRM8 = 0
FRM9 = 1
FRM10 = 2
; UEIR
PIDEF = 0
CRC5EF = 1
CRC16EF = 2
DFN8EF = 3
BTOEF = 4
BTSEF = 7
; UIE
URSTIE = 0
UERRIE = 1
ACTVIE = 2
TRNIE = 3
IDLEIE = 4
STALLIE = 5
SOFIE = 6
; UCFG
PPB0 = 0
PPB1 = 1
FSEN = 2
UPUEN = 4
UTEYE = 7
; UIR
URSTIF = 0
UERRIF = 1
ACTVIF = 2
TRNIF = 3
IDLEIF = 4
STALLIF = 5
SOFIF = 6
; USTAT
PPBI = 1
DIR = 2
ENDP0 = 3
ENDP1 = 4
ENDP2 = 5
ENDP3 = 6
; UCON
SUSPND = 1
RESUME = 2
USBEN = 3
PKTDIS = 4
SE0 = 5
PPBRST = 6
; SRCON0
SRPR = 0
SRPS = 1
SRNQEN = 2
SRQEN = 3
SRLEN = 7
SRCLK0 = 4
SRCLK1 = 5
SRCLK2 = 6
; SRCON1
SRRC1E = 0
SRRC2E = 1
SRRCKE = 2
SRRPE = 3
SRSC1E = 4
SRSC2E = 5
SRSCKE = 6
SRSPE = 7
; CM2CON0
C2R = 2
C2SP = 3
C2POL = 4
C2OE = 5
C2OUT = 6
C2ON = 7
C2CH0 = 0
C2CH1 = 1
; CM2CON1
C2SYNC = 0
C1SYNC = 1
C2HYS = 2
C1HYS = 3
C2RSEL = 4
C1RSEL = 5
MC2OUT = 6
MC1OUT = 7
; CM1CON0
C1R = 2
C1SP = 3
C1POL = 4
C1OE = 5
C1OUT = 6
C1ON = 7
C1CH0 = 0
C1CH1 = 1
; SSPMSK
MSK0 = 0
MSK1 = 1
MSK2 = 2
MSK3 = 3
MSK4 = 4
MSK5 = 5
MSK6 = 6
MSK7 = 7
; SLRCON
SLRA = 0
SLRB = 1
SLRC = 2
; WPUA
WPUA3 = 3
WPUA4 = 4
WPUA5 = 5
; WPUB
WPUB4 = 4
WPUB5 = 5
WPUB6 = 6
WPUB7 = 7
; IOCA
IOCA0 = 0
IOCA1 = 1
IOCA3 = 3
IOCA4 = 4
IOCA5 = 5
; IOCB
IOCB4 = 4
IOCB5 = 5
IOCB6 = 6
IOCB7 = 7
; ANSEL
ANS3 = 3
ANS4 = 4
ANS5 = 5
ANS6 = 6
ANS7 = 7
; ANSELH
ANS8 = 0
ANS9 = 1
ANS10 = 2
ANS11 = 3
; PORTA
RA0 = 0
RA1 = 1
RA3 = 3
RA4 = 4
RA5 = 5
AN3 = 4
OSC2 = 4
OSC1 = 5
CLKOUT = 4
CLKIN = 5
; PORTB
RB4 = 4
RB5 = 5
RB6 = 6
RB7 = 7
SDI = 4
RX = 5
SCL = 6
TX = 7
SDA = 4
; DT = 5
SCK = 6
CK = 7
AN10 = 4
AN11 = 5
; PORTC
RC0 = 0
RC1 = 1
RC2 = 2
RC3 = 3
RC4 = 4
RC5 = 5
RC6 = 6
RC7 = 7
AN4 = 0
AN5 = 1
AN6 = 2
AN7 = 3
AN8 = 6
AN9 = 7
C12INP = 0
C12IN1M = 1
C12IN2M = 2
C12IN3M = 3
C12OUT = 4
CCP1 = 5
NOT_SS = 6
INT0 = 0
INT1 = 1
INT2 = 2
PGM = 3
SRQ = 4
T0CKI = 5
T13CKI = 6
T1OSCO = 7
VREFP = 0
VREFM = 1
CVREF = 2
T1OSCI = 6
P1D = 2
P1C = 3
P1B = 4
P1A = 5
SS = 6
SDO = 7
; LATA
LATA4 = 4
LATA5 = 5
; LATB
LATB4 = 4
LATB5 = 5
LATB6 = 6
LATB7 = 7
; LATC
LATC0 = 0
LATC1 = 1
LATC2 = 2
LATC3 = 3
LATC4 = 4
LATC5 = 5
LATC6 = 6
LATC7 = 7
; DDRA
TRISA4 = 4
TRISA5 = 5
RA4 = 4
RA5 = 5
; TRISA
TRISA4 = 4
TRISA5 = 5
RA4 = 4
RA5 = 5
; DDRB
TRISB4 = 4
TRISB5 = 5
TRISB6 = 6
TRISB7 = 7
RB4 = 4
RB5 = 5
RB6 = 6
RB7 = 7
; TRISB
TRISB4 = 4
TRISB5 = 5
TRISB6 = 6
TRISB7 = 7
RB4 = 4
RB5 = 5
RB6 = 6
RB7 = 7
; DDRC
TRISC0 = 0
TRISC1 = 1
TRISC2 = 2
TRISC3 = 3
TRISC4 = 4
TRISC5 = 5
TRISC6 = 6
TRISC7 = 7
RC0 = 0
RC1 = 1
RC2 = 2
RC3 = 3
RC4 = 4
RC5 = 5
RC6 = 6
RC7 = 7
; TRISC
TRISC0 = 0
TRISC1 = 1
TRISC2 = 2
TRISC3 = 3
TRISC4 = 4
TRISC5 = 5
TRISC6 = 6
TRISC7 = 7
RC0 = 0
RC1 = 1
RC2 = 2
RC3 = 3
RC4 = 4
RC5 = 5
RC6 = 6
RC7 = 7
; OSCTUNE
SPLLEN = 6
INTSRC = 7
TUN0 = 0
TUN1 = 1
TUN2 = 2
TUN3 = 3
TUN4 = 4
TUN5 = 5
; PIE1
TMR1IE = 0
TMR2IE = 1
CCP1IE = 2
SSPIE = 3
TXIE = 4
RCIE = 5
ADIE = 6
; PIR1
TMR1IF = 0
TMR2IF = 1
CCP1IF = 2
SSPIF = 3
TXIF = 4
RCIF = 5
ADIF = 6
; IPR1
TMR1IP = 0
TMR2IP = 1
CCP1IP = 2
SSPIP = 3
TXIP = 4
RCIP = 5
ADIP = 6
; PIE2
TMR3IE = 1
USBIE = 2
BCLIE = 3
EEIE = 4
C2IE = 5
C1IE = 6
OSCFIE = 7
; PIR2
TMR3IF = 1
USBIF = 2
BCLIF = 3
EEIF = 4
C2IF = 5
C1IF = 6
OSCFIF = 7
; IPR2
TMR3IP = 1
USBIP = 2
BCLIP = 3
EEIP = 4
C2IP = 5
C1IP = 6
OSCFIP = 7
; EECON1
RD = 0
WR = 1
WREN = 2
WRERR = 3
FREE = 4
CFGS = 6
EEPGD = 7
; EEADR
EEADR0 = 0
EEADR1 = 1
EEADR2 = 2
EEADR3 = 3
EEADR4 = 4
EEADR5 = 5
EEADR6 = 6
EEADR7 = 7
; RCSTA
RX9D = 0
OERR = 1
FERR = 2
ADDEN = 3
CREN = 4
SREN = 5
RX9 = 6
SPEN = 7
ADEN = 3
; TXSTA
TX9D = 0
TRMT = 1
BRGH = 2
SENDB = 3
SYNC = 4
TXEN = 5
TX9 = 6
CSRC = 7
; T3CON
TMR3ON = 0
TMR3CS = 1
NOT_T3SYNC = 2
T3CCP1 = 3
RD16 = 7
T3SYNC = 2
T3CKPS0 = 4
T3CKPS1 = 5
; ECCP1AS
ECCPASE = 7
PSSBD0 = 0
PSSBD1 = 1
PSSAC0 = 2
PSSAC1 = 3
ECCPAS0 = 4
ECCPAS1 = 5
ECCPAS2 = 6
; PWM1CON
PRSEN = 7
PDC0 = 0
PDC1 = 1
PDC2 = 2
PDC3 = 3
PDC4 = 4
PDC5 = 5
PDC6 = 6
; BAUDCON
ABDEN = 0
WUE = 1
BRG16 = 3
CKTXP = 4
DTRXP = 5
RCIDL = 6
ABDOVF = 7
SCKP = 4
; BAUDCTL
ABDEN = 0
WUE = 1
BRG16 = 3
CKTXP = 4
DTRXP = 5
RCIDL = 6
ABDOVF = 7
SCKP = 4
; PSTRCON
STRA = 0
STRB = 1
STRC = 2
STRD = 3
STRSYNC = 4
; REFCON0
FVR1S0 = 4
FVR1S1 = 5
FVR1ST = 6
FVR1EN = 7
; VREFCON0
FVR1S0 = 4
FVR1S1 = 5
FVR1ST = 6
FVR1EN = 7
; REFCON1
D1NSS = 0
DAC1OE = 5
D1LPS = 6
D1EN = 7
D1PSS0 = 2
D1PSS1 = 3
; VREFCON1
D1NSS = 0
DAC1OE = 5
D1LPS = 6
D1EN = 7
D1PSS0 = 2
D1PSS1 = 3
; REFCON2
DAC1R0 = 0
DAC1R1 = 1
DAC1R2 = 2
DAC1R3 = 3
DAC1R4 = 4
; VREFCON2
DAC1R0 = 0
DAC1R1 = 1
DAC1R2 = 2
DAC1R3 = 3
DAC1R4 = 4
; CCP1CON
CCP1M0 = 0
CCP1M1 = 1
CCP1M2 = 2
CCP1M3 = 3
DC1B0 = 4
DC1B1 = 5
P1M0 = 6
P1M1 = 7
; ADCON2
ADFM = 7
ADCS0 = 0
ADCS1 = 1
ADCS2 = 2
ACQT0 = 3
ACQT1 = 4
ACQT2 = 5
; ADCON1
NVCFG0 = 0
NVCFG1 = 1
PVCFG0 = 2
PVCFG1 = 3
; ADCON0
ADON = 0
GO_NOT_DONE = 1
GO = 1
CHS0 = 2
CHS1 = 3
CHS2 = 4
CHS3 = 5
DONE = 1
NOT_DONE = 1
GO_DONE = 1
; SSPCON2
SEN = 0
RSEN = 1
PEN = 2
RCEN = 3
ACKEN = 4
ACKDT = 5
ACKSTAT = 6
GCEN = 7
; SSPCON1
CKP = 4
SSPEN = 5
SSPOV = 6
WCOL = 7
SSPM0 = 0
SSPM1 = 1
SSPM2 = 2
SSPM3 = 3
; SSPSTAT
BF = 0
UA = 1
R_NOT_W = 2
S = 3
P = 4
D_NOT_A = 5
CKE = 6
SMP = 7
R = 2
D = 5
NOT_W = 2
NOT_A = 5
R_W = 2
D_A = 5
NOT_WRITE = 2
NOT_ADDRESS = 5
; T2CON
TMR2ON = 2
T2CKPS0 = 0
T2CKPS1 = 1
T2OUTPS0 = 3
T2OUTPS1 = 4
T2OUTPS2 = 5
T2OUTPS3 = 6
; T1CON
TMR1ON = 0
TMR1CS = 1
NOT_T1SYNC = 2
T1OSCEN = 3
T1RUN = 6
RD16 = 7
T1SYNC = 2
T1CKPS0 = 4
T1CKPS1 = 5
; RCON
NOT_BOR = 0
NOT_POR = 1
NOT_PD = 2
NOT_TO = 3
NOT_RI = 4
SBOREN = 6
IPEN = 7
BOR = 0
POR = 1
PD = 2
TO = 3
RI = 4
; WDTCON
SWDTEN = 0
SWDTE = 0
; OSCCON2
LFIOFS = 0
HFIOFL = 1
PRI_SD = 2
; OSCCON
SCS0 = 0
SCS1 = 1
IOFS = 2
OSTS = 3
IDLEN = 7
IRCF0 = 4
IRCF1 = 5
IRCF2 = 6
; T0CON
PSA = 3
T0SE = 4
T0CS = 5
T08BIT = 6
TMR0ON = 7
T0PS0 = 0
T0PS1 = 1
T0PS2 = 2
; STATUS
C = 0
DC = 1
Z = 2
OV = 3
N = 4
; INTCON3
INT1IF = 0
INT2IF = 1
INT1IE = 3
INT2IE = 4
INT1IP = 6
INT2IP = 7
INT1F = 0
INT2F = 1
INT1E = 3
INT2E = 4
INT1P = 6
INT2P = 7
; INTCON2
RABIP = 0
TMR0IP = 2
INTEDG2 = 4
INTEDG1 = 5
INTEDG0 = 6
NOT_RABPU = 7
RABPU = 7
; INTCON
RABIF = 0
INT0IF = 1
TMR0IF = 2
RABIE = 3
INT0IE = 4
TMR0IE = 5
PEIE_GIEL = 6
GIE_GIEH = 7
INT0F = 1
T0IF = 2
INT0E = 4
T0IE = 5
PEIE = 6
GIE = 7
GIEL = 6
GIEH = 7
; STKPTR
STKUNF = 6
STKFUL = 7
SP0 = 0
SP1 = 1
SP2 = 2
SP3 = 3
SP4 = 4
STKOVF = 7
#DEFINE W 0
#DEFINE F 1
#DEFINE A 0
#DEFINE _CLOCK 48000000
#DEFINE CLRW CLRF 4072,0
#DEFINE NEGW NEGF 4072,0
#DEFINE SKPC BTFSS 4056,0,0
#DEFINE SKPNC BTFSC 4056,0,0
#DEFINE CLRC BCF 4056,0,0
#DEFINE SETC BSF 4056,0,0
#DEFINE SKPZ BTFSS 4056,2,0
#DEFINE SKPNZ BTFSC 4056,2,0
#DEFINE CLRZ BCF 4056,2,0
#DEFINE SETZ BSF 4056,2,0
SB_SV0 EQU 0
SB_SV0H EQU 1
SB_SV0HH EQU 2
SB_SV0HHH EQU 3
SB_SV1 EQU 4
SB_SV1H EQU 5
SB_SV2 EQU 6
SB_SV2H EQU 7
SB_SV2HH EQU 8
SB_SV2HHH EQU 9
SB_SV3 EQU 10
SB_SV3H EQU 11
SB_SV3HH EQU 12
SB_SV3HHH EQU 13
SB_SV4 EQU 14
SB_SV4H EQU 15
SB_SV5 EQU 16
SB_SV5H EQU 17
SB_SV5HH EQU 18
SB_SV5HHH EQU 19
SB_SV6 EQU 20
SB_SV6H EQU 21
SB_SV6HH EQU 22
SB_SV6HHH EQU 23
SB_SV7 EQU 24
A0 EQU 4073
A0H EQU 4074
A1 EQU 4065
A1H EQU 4066
A2 EQU 4057
A2H EQU 4058
TBPTR EQU 4086
TBPTRH EQU 4087
PROD EQU 4083
PRODH EQU 4084
FP_REGA EQU 16
FP_REGAH EQU 17
FP_REGAHH EQU 18
FP_REGAHHH EQU 19
FP_REGB EQU 20
FP_REGBH EQU 21
FP_REGBHH EQU 22
FP_REGBHHH EQU 23
ORG 0X001000
GOTO SBCDSTD
ORG 0X001008
GOTO 0X01008
ORG 0X001018
GOTO 0X01018
SBDLYMS
CLRF 5,0
SBDLYMS16
MOVWF 4,0
MOVLW 255
ADDWF 4,1,0
BTFSS 4056,0,0
ADDWF 5,1,0
NOP
BTFSS 4056,0,0
RETURN 0
MOVLW 3
MOVWF 1,0
MOVLW 231
RCALL SBDLYUS16
BRA $ - 22
SBDLYUS
CLRF 1,0
SBDLYUS16
ADDLW 253
MOVWF 0,0
MOVLW 255
BRA $ + 2
BRA $ + 4
ADDWF 0,1,0
NOP
BRA $ + 2
BRA $ + 2
BTFSS 4056,0,0
ADDWF 1,1,0
BTFSS 4056,0,0
RETURN 0
BRA $ - 16
SBCDSTD
BSF 24,6,0
?I000000_F000_000044_M000000 ; L#MK TRISB.7 = 0
BCF TRISB,7,0
L00000001
?I000001_F000_000047_M000000 ; L#MK PORTB.7 = 1
BSF LATB,7,0
?I000002_F000_000048_M000000 ; L#MK DELAYMS(500)
MOVLW 1
MOVWF SB_SV1H,0
MOVLW 244
RCALL SBDLYMS16
?I000003_F000_000049_M000000 ; L#MK PORTB.7 = 0
BCF LATB,7,0
?I000004_F000_000050_M000000 ; L#MK DELAYMS(500)
MOVLW 1
MOVWF SB_SV1H,0
MOVLW 244
RCALL SBDLYMS16
?I000005_F000_000052_M000000 ; L#MK IF PORTA.3 = 0 THEN
BTFSC PORTA,3,0
BRA L00000002
?I000006_F000_000053_M000000 ; L#MK ASM
GOTO 0X30
L00000002
?I000007_F000_000058_M000000 ; L#MK GOTO LOOP
BRA L00000001
?I000008_END; L#MK
SBGLB2
SLEEP
BRA SBGLB2
CONFIG CPUDIV = NOCLKDIV
CONFIG USBDIV = OFF
CONFIG FOSC = HS
CONFIG PLLEN = ON
CONFIG PCLKEN = ON
CONFIG FCMEN = OFF
CONFIG IESO = OFF
CONFIG PWRTEN = ON
CONFIG BOREN = ON
CONFIG BORV = 22
CONFIG WDTEN = OFF
CONFIG WDTPS = 32768
CONFIG HFOFST = OFF
CONFIG MCLRE = OFF
CONFIG STVREN = ON
CONFIG LVP = OFF
CONFIG BBSIZ = OFF
CONFIG XINST = OFF
CONFIG DEBUG = OFF
CONFIG CP0 = OFF
CONFIG CP1 = OFF
CONFIG CPB = OFF
CONFIG CPD = OFF
CONFIG WRT0 = OFF
CONFIG WRT1 = OFF
CONFIG WRTC = OFF
CONFIG WRTB = OFF
CONFIG WRTD = OFF
CONFIG EBTR0 = OFF
CONFIG EBTR1 = OFF
CONFIG EBTRB = OFF
SB#ASMEND
END
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/double_record_extension1.ads | best08618/asylo | 7 | 19156 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/double_record_extension1.ads
-- { dg-do compile }
package double_record_extension1 is
type T1(n: natural) is tagged record
s1: string (1..n);
end record;
type T2(j,k: natural) is new T1(j) with record
s2: string (1..k);
end record;
type T3 is new T2 (10, 10) with null record;
end double_record_extension1;
|
src/SingleSorted/Combinators.agda | cilinder/formaltt | 21 | 5469 | open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst)
open import Data.Sum
import SingleSorted.AlgebraicTheory as SS
module SingleSorted.Combinators where
module Sum {𝓈} (Σ₁ Σ₂ : SS.Signature) (T₁ : SS.Theory 𝓈 Σ₁) (T₂ : SS.Theory 𝓈 Σ₂) where
-- disjoint sum of signatures
S : SS.Signature
S = record { oper = SS.Signature.oper Σ₁ ⊎ SS.Signature.oper Σ₂
; oper-arity = [ SS.Signature.oper-arity Σ₁ , SS.Signature.oper-arity Σ₂ ]
}
inj-term-l : ∀ {Γ : SS.Context} → SS.Signature.Term Σ₁ Γ → SS.Signature.Term S Γ
inj-term-l {Γ} (SS.Signature.tm-var x) = SS.Signature.tm-var x
inj-term-l {Γ} (SS.Signature.tm-oper f ts) = SS.Signature.tm-oper (inj₁ f) λ{ i → inj-term-l (ts i)}
inj-term-r : ∀ {Γ : SS.Context} → SS.Signature.Term Σ₂ Γ → SS.Signature.Term S Γ
inj-term-r {Γ} (SS.Signature.tm-var x) = SS.Signature.tm-var x
inj-term-r {Γ} (SS.Signature.tm-oper f ts) = SS.Signature.tm-oper (inj₂ f) λ{ i → inj-term-r (ts i)}
coerce₁ : SS.Signature.Equation Σ₁ → SS.Signature.Equation S
coerce₁ eq = record { eq-ctx = SS.Signature.Equation.eq-ctx eq
; eq-lhs = inj-term-l (SS.Signature.Equation.eq-lhs eq)
; eq-rhs = inj-term-l (SS.Signature.Equation.eq-rhs eq)
}
coerce₂ : SS.Signature.Equation Σ₂ → SS.Signature.Equation S
coerce₂ eq = record { eq-ctx = SS.Signature.Equation.eq-ctx eq
; eq-lhs = inj-term-r (SS.Signature.Equation.eq-lhs eq)
; eq-rhs = inj-term-r (SS.Signature.Equation.eq-rhs eq)
}
-- define a theory with the set of axioms a union of the axioms of both theories
T : SS.Theory 𝓈 S
T = record { ax = SS.Theory.ax T₁ ⊎ SS.Theory.ax T₂
; ax-eq = [ (λ a → coerce₁ (SS.Theory.ax-eq T₁ a)) , (λ a → coerce₂ (SS.Theory.ax-eq T₂ a)) ]
}
|
Classical.agda | oisdk/agda-playground | 6 | 13780 | <filename>Classical.agda
{-# OPTIONS --cubical --safe #-}
module Classical where
open import Prelude
open import Relation.Nullary.Stable using (Stable) public
open import Relation.Nullary.Decidable.Properties using (Dec→Stable) public
Classical : Type a → Type a
Classical A = ¬ ¬ A
pure : A → Classical A
pure x k = k x
_>>=_ : Classical A → (A → Classical B) → Classical B
xs >>= f = λ k → xs λ x → f x k
_<*>_ : Classical (A → B) → Classical A → Classical B
fs <*> xs = λ k → fs λ f → xs λ x → k (f x)
lem : {A : Type a} → Classical (Dec A)
lem k = k (no (k ∘ yes))
|
src/fot/FOTC/Relation/Binary/Bisimilarity/PropertiesI.agda | asr/fotc | 11 | 10533 | ------------------------------------------------------------------------------
-- Properties for the bisimilarity relation
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module FOTC.Relation.Binary.Bisimilarity.PropertiesI where
open import FOTC.Base
open import FOTC.Base.List
open import FOTC.Base.List.PropertiesI
open import FOTC.Base.PropertiesI
open import FOTC.Data.Stream.Type
open import FOTC.Relation.Binary.Bisimilarity.Type
------------------------------------------------------------------------------
-- Because a greatest post-fixed point is a fixed-point, the
-- bisimilarity relation _≈_ on unbounded lists is also a pre-fixed
-- point of the bisimulation functional (see
-- FOTC.Relation.Binary.Bisimulation).
≈-in : ∀ {xs ys} →
∃[ x' ] ∃[ xs' ] ∃[ ys' ]
xs ≡ x' ∷ xs' ∧ ys ≡ x' ∷ ys' ∧ xs' ≈ ys' →
xs ≈ ys
≈-in h = ≈-coind B h' h
where
B : D → D → Set
B xs ys = ∃[ x' ] ∃[ xs' ] ∃[ ys' ]
xs ≡ x' ∷ xs' ∧ ys ≡ x' ∷ ys' ∧ xs' ≈ ys'
h' : ∀ {xs} {ys} → B xs ys →
∃[ x' ] ∃[ xs' ] ∃[ ys' ] xs ≡ x' ∷ xs' ∧ ys ≡ x' ∷ ys' ∧ B xs' ys'
h' (x' , xs' , ys' , prf₁ , prf₂ , xs'≈ys') =
x' , xs' , ys' , prf₁ , prf₂ , ≈-out xs'≈ys'
≈-refl : ∀ {xs} → Stream xs → xs ≈ xs
≈-refl {xs} Sxs = ≈-coind B h₁ h₂
where
B : D → D → Set
B xs ys = Stream xs ∧ xs ≡ ys
h₁ : ∀ {xs ys} → B xs ys →
∃[ x' ] ∃[ xs' ] ∃[ ys' ] xs ≡ x' ∷ xs' ∧ ys ≡ x' ∷ ys' ∧ B xs' ys'
h₁ (Sxs , refl) with Stream-out Sxs
... | x' , xs' , prf , Sxs' =
x' , xs' , xs' , prf , prf , (Sxs' , refl)
h₂ : B xs xs
h₂ = Sxs , refl
≈-sym : ∀ {xs ys} → xs ≈ ys → ys ≈ xs
≈-sym {xs} {ys} xs≈ys = ≈-coind B h₁ h₂
where
B : D → D → Set
B xs ys = ys ≈ xs
h₁ : ∀ {ys xs} → B ys xs →
∃[ y' ] ∃[ ys' ] ∃[ xs' ] ys ≡ y' ∷ ys' ∧ xs ≡ y' ∷ xs' ∧ B ys' xs'
h₁ Bxsys with ≈-out Bxsys
... | y' , ys' , xs' , prf₁ , prf₂ , ys'≈xs' =
y' , xs' , ys' , prf₂ , prf₁ , ys'≈xs'
h₂ : B ys xs
h₂ = xs≈ys
≈-trans : ∀ {xs ys zs} → xs ≈ ys → ys ≈ zs → xs ≈ zs
≈-trans {xs} {ys} {zs} xs≈ys ys≈zs = ≈-coind B h₁ h₂
where
B : D → D → Set
B xs zs = ∃[ ys ] xs ≈ ys ∧ ys ≈ zs
h₁ : ∀ {as} {cs} → B as cs →
∃[ a' ] ∃[ as' ] ∃[ cs' ] as ≡ a' ∷ as' ∧ cs ≡ a' ∷ cs' ∧ B as' cs'
h₁ {cs = cs} (bs , as≈bs , bs≈cs) with ≈-out as≈bs
... | a' , as' , bs' , prf₁ , prf₂ , as'≈bs' with ≈-out bs≈cs
... | b' , bs'' , cs' , prf₃ , prf₄ , bs''≈cs' =
a'
, as'
, cs'
, prf₁
, subst (λ t → cs ≡ t ∷ cs') b'≡a' prf₄
, (bs' , as'≈bs' , subst (λ t → t ≈ cs') bs''≡bs' bs''≈cs')
where
b'≡a' : b' ≡ a'
b'≡a' = ∧-proj₁ (∷-injective (trans (sym prf₃) prf₂))
bs''≡bs' : bs'' ≡ bs'
bs''≡bs' = ∧-proj₂ (∷-injective (trans (sym prf₃) prf₂))
h₂ : B xs zs
h₂ = ys , (xs≈ys , ys≈zs)
∷-injective≈ : ∀ {x xs ys} → x ∷ xs ≈ x ∷ ys → xs ≈ ys
∷-injective≈ {x} {xs} {ys} h with ≈-out h
... | x' , xs' , ys' , prf₁ , prf₂ , prf₃ = xs≈ys
where
xs≡xs' : xs ≡ xs'
xs≡xs' = ∧-proj₂ (∷-injective prf₁)
ys≡ys' : ys ≡ ys'
ys≡ys' = ∧-proj₂ (∷-injective prf₂)
xs≈ys : xs ≈ ys
xs≈ys = subst (λ t → t ≈ ys)
(sym xs≡xs')
(subst (_≈_ xs') (sym ys≡ys') prf₃)
∷-rightCong≈ : ∀ {x xs ys} → xs ≈ ys → x ∷ xs ≈ x ∷ ys
∷-rightCong≈ {x} {xs} {ys} h = ≈-in (x , xs , ys , refl , refl , h)
|
proofs/Proofs.agda | samuelhklumpers/strong-vector | 0 | 13185 | <reponame>samuelhklumpers/strong-vector
module Proofs where
open import Agda.Builtin.Equality
open import Relation.Binary.PropositionalEquality.Core
open import Data.Nat
open ≡-Reasoning
open import Classes
data Vec : ℕ → Set → Set where
Nil : ∀ {a} → Vec 0 a
Cons : ∀ {n A} → (a : A) → Vec n A → Vec (suc n) A
cons-cong : ∀ {n A} {a c : A} {b d : Vec n A} → a ≡ c → b ≡ d → Cons a b ≡ Cons c d
cons-cong {_} {_} {a} {c} {b} {d} p q = begin
Cons a b ≡⟨ cong (λ x → Cons a x) q ⟩
Cons a d ≡⟨ cong (λ x → Cons x d) p ⟩
Cons c d ∎
instance
VecF : {n : ℕ} → Functor (Vec n)
VecF = record {
fmap = fmap' ;
F-id = id' ;
F-∘ = comp' }
where
fmap' : ∀ {n A B} → (A → B) → Vec n A → Vec n B
fmap' f Nil = Nil
fmap' f (Cons a v) = Cons (f a) (fmap' f v)
id' : ∀ {n A} → (a : Vec n A) → fmap' id a ≡ a
id' Nil = refl
id' (Cons a v) = cong (λ w → Cons a w) (id' v)
comp' : ∀ {n A B C} → (g : B → C) (f : A → B) (a : Vec n A) → fmap' (g ∘ f) a ≡ (fmap' g ∘ fmap' f) a
comp' g f Nil = refl
comp' g f (Cons a v) = cons-cong refl (comp' g f v)
full : ∀ {A} → A → (n : ℕ) → Vec n A
full x zero = Nil
full x (suc n) = Cons x (full x n)
zipWith : ∀ {n A B C} → (A → B → C) → Vec n A → Vec n B → Vec n C
zipWith _ Nil Nil = Nil
zipWith f (Cons a v) (Cons b w) = Cons (f a b) (zipWith f v w)
instance
VecA : {n : ℕ} → Applicative (Vec n)
VecA {n} = record
{ pure = λ x → full x n
; _<*>_ = ap'
; A-id = id'
; A-∘ = comp'
; A-hom = hom'
; A-ic = ic'
}
where
ap' : ∀ {n A B} (v : Vec n (A → B)) (w : Vec n A) → Vec n B
ap' Nil Nil = Nil
ap' (Cons a v) (Cons b w) = Cons (a b) (ap' v w)
id' : ∀ {n A} (v : Vec n A) → ap' (full id n) v ≡ v
id' Nil = refl
id' (Cons a v) = cons-cong refl (id' v)
comp' : ∀ {n A B C} → (u : Vec n (B → C)) (v : Vec n (A → B)) (w : Vec n A)
→ ap' (ap' (ap' (full _∘_ n) u) v) w ≡ ap' u (ap' v w)
comp' Nil Nil Nil = refl
comp' (Cons a u) (Cons b v) (Cons c w) = cons-cong refl (comp' u v w)
hom' : ∀ {n A B} (f : A → B) (x : A) → ap' (full f n) (full x n) ≡ full (f x) n
hom' {zero} f x = refl
hom' {suc n} f x = cons-cong refl (hom' {n} f x)
ic' : ∀ {n A B} (u : Vec n (A → B)) (y : A) → ap' u (full y n) ≡ ap' (full (_$ y) n) u
ic' Nil y = refl
ic' (Cons a u) y = cons-cong refl (ic' u y)
tail : ∀ {n A} → Vec (suc n) A → Vec n A
tail (Cons x v) = v
diag : ∀ {n A} → Vec n (Vec n A) → Vec n A
diag Nil = Nil
diag (Cons (Cons a w) v) = Cons a (diag (fmap tail v))
fmap-pure : ∀ {A B F} {{aF : Applicative F}} (f : A → B) (x : A)
→ fmap f (Applicative.pure aF x) ≡ Applicative.pure aF (f x)
fmap-pure f x = begin
fmap f (pure x) ≡⟨ sym (appFun f (pure x)) ⟩
pure f <*> pure x ≡⟨ A-hom f x ⟩
pure (f x) ∎
diag-full : ∀ {A} (n : ℕ) (v : Vec n A) → diag (full v n) ≡ v
diag-full _ Nil = refl
diag-full (suc n) (Cons a v) = cons-cong refl (begin
diag (fmap tail (full (Cons a v) n)) ≡⟨ cong diag (fmap-pure tail (Cons a v)) ⟩
diag (full v n) ≡⟨ diag-full n v ⟩
v ∎)
instance
VecM : {n : ℕ} → Monad (Vec n)
VecM = record { _>>=_ = bind' ;
left-1 = left' ;
right-1 = {!!} ;
assoc = {!!} }
where
bind' : ∀ {n A B} → Vec n A → (A → Vec n B) → Vec n B
bind' v f = diag (fmap f v)
left' : ∀ {n A B} (a : A) (k : A → Vec n B) → bind' (pure a) k ≡ k a
left' {n} a k = begin
diag (fmap k (full a n)) ≡⟨ cong diag (fmap-pure k a) ⟩
diag (full (k a) n) ≡⟨ diag-full n (k a) ⟩
k a ∎
right' : ∀ {n A} (m : Vec n A) → bind' m pure ≡ m
right' Nil = refl
right' (Cons a m) = begin
bind' (Cons a m) pure ≡⟨ refl ⟩
diag (fmap pure (Cons a m)) ≡⟨ cons-cong refl {!!} ⟩ -- :(
Cons a m ∎
|
oeis/073/A073747.asm | neoneye/loda-programs | 11 | 84866 | <filename>oeis/073/A073747.asm<gh_stars>10-100
; A073747: Decimal expansion of coth(1).
; Submitted by <NAME>
; 1,3,1,3,0,3,5,2,8,5,4,9,9,3,3,1,3,0,3,6,3,6,1,6,1,2,4,6,9,3,0,8,4,7,8,3,2,9,1,2,0,1,3,9,4,1,2,4,0,4,5,2,6,5,5,5,4,3,1,5,2,9,6,7,5,6,7,0,8,4,2,7,0,4,6,1,8,7,4,3,8,2,6,7,4,6,7,9,2,4,1,4,8,0,8,5,6,3,0,2
mov $1,1
mov $2,1
mov $3,$0
mul $3,5
mov $4,$0
cmp $4,0
add $0,$4
lpb $3
mul $2,$3
add $2,$1
mul $1,2
add $1,$2
mov $5,$0
div $5,3
mov $4,$5
cmp $4,0
add $5,$4
div $1,$5
div $2,$5
sub $3,1
lpe
mov $6,10
pow $6,$0
div $2,$6
cmp $4,0
cmp $4,0
add $2,$4
div $1,$2
mod $1,10
mov $0,$1
|
oeis/027/A027603.asm | neoneye/loda-programs | 11 | 16342 | <filename>oeis/027/A027603.asm<gh_stars>10-100
; A027603: a(n) = n^3 + (n+1)^3 + (n+2)^3 + (n+3)^3.
; 36,100,224,432,748,1196,1800,2584,3572,4788,6256,8000,10044,12412,15128,18216,21700,25604,29952,34768,40076,45900,52264,59192,66708,74836,83600,93024,103132,113948,125496,137800,150884,164772,179488,195056,211500,228844,247112,266328,286516,307700,329904,353152,377468,402876,429400,457064,485892,515908,547136,579600,613324,648332,684648,722296,761300,801684,843472,886688,931356,977500,1025144,1074312,1125028,1177316,1231200,1286704,1343852,1402668,1463176,1525400,1589364,1655092,1722608,1791936
add $0,2
mov $1,$0
mul $0,2
sub $0,1
bin $1,2
add $1,2
mul $1,$0
mov $0,$1
mul $0,4
|
malban/Release/VRelease/Release.History/VRelease_2017_04_07/Song/patternE.asm | mikepea/vectrex-playground | 5 | 86182 | ; this file is part of Release, written by Malban in 2017
;
HAS_VOICE0 = 1
HAS_TONE0 = 1
FIRST7 = $3E
dw $0033
patternEData:
db $E1, $18, $96, $00, $00, $00, $00, $00, $00, $00
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2582.asm | ljhsiun2/medusa | 9 | 20608 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xd0c2, %rsi
lea addresses_A_ht+0x186c6, %rdi
nop
nop
nop
nop
nop
sub $27245, %rax
mov $32, %rcx
rep movsl
nop
nop
nop
nop
nop
xor $51073, %r12
lea addresses_WC_ht+0x125e, %rsi
nop
nop
and %rbx, %rbx
movw $0x6162, (%rsi)
xor $52859, %r12
lea addresses_WT_ht+0x6204, %rcx
nop
nop
and %rax, %rax
movb $0x61, (%rcx)
nop
nop
nop
nop
nop
cmp $51603, %rsi
lea addresses_WC_ht+0xdc9e, %rsi
lea addresses_A_ht+0xa75e, %rdi
nop
nop
and $57997, %rdx
mov $95, %rcx
rep movsl
nop
nop
nop
xor %rsi, %rsi
lea addresses_WT_ht+0xdd16, %r12
nop
nop
xor $60465, %rbx
movl $0x61626364, (%r12)
nop
add $37004, %rax
lea addresses_WC_ht+0x1935e, %rdi
nop
nop
nop
nop
nop
and $28550, %rax
movw $0x6162, (%rdi)
nop
nop
nop
nop
nop
sub $39394, %rbx
lea addresses_normal_ht+0x1bc10, %rax
nop
nop
nop
nop
and %rcx, %rcx
mov (%rax), %r12
nop
nop
nop
and %rsi, %rsi
lea addresses_D_ht+0x19cde, %rcx
nop
nop
nop
nop
nop
add $63836, %rsi
movb (%rcx), %bl
nop
nop
nop
and %rax, %rax
lea addresses_WT_ht+0x14566, %rsi
lea addresses_UC_ht+0xb9e, %rdi
clflush (%rdi)
nop
inc %r12
mov $47, %rcx
rep movsw
lfence
lea addresses_WT_ht+0x1e75e, %rdi
nop
nop
nop
nop
nop
xor $1141, %rax
mov (%rdi), %bx
nop
nop
nop
nop
nop
sub $14471, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r8
push %r9
push %rax
push %rsi
// Faulty Load
lea addresses_UC+0x175e, %r9
nop
nop
nop
nop
nop
cmp $582, %r8
mov (%r9), %esi
lea oracles, %r8
and $0xff, %rsi
shlq $12, %rsi
mov (%r8,%rsi,1), %rsi
pop %rsi
pop %rax
pop %r9
pop %r8
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': True, 'size': 1, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 4, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 2, 'congruent': 9, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'37': 21829}
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
*/
|
oeis/016/A016847.asm | neoneye/loda-programs | 11 | 3270 | ; A016847: (4n+3)^11.
; 177147,1977326743,285311670611,8649755859375,116490258898219,952809757913927,5559060566555523,25408476896404831,96549157373046875,317475837322472439,929293739471222707,2472159215084012303,6071163615208263051,13931233916552734375,30155888444737842659,62050608388552823487,122130132904968017083,231122292121701565271,422351360321044921875,747993810527520928879,1287831418538085836267,2161283703465490489863,3543686674874777831491,5688000922764599609375,8953382542587164451099,13842338707244455781047
mul $0,4
add $0,3
pow $0,11
|
examples/Termination/StructuralOrder.agda | shlevy/agda | 1,989 | 3236 | <reponame>shlevy/agda<filename>examples/Termination/StructuralOrder.agda
-- some examples for structural order in the termination checker
module StructuralOrder where
data Nat : Set where
zero : Nat
succ : Nat -> Nat
-- c t > t for any term t
-- e.g., succ (succ y) > succ y
plus : Nat -> Nat -> Nat
plus x (succ (succ y)) = succ (plus x (succ y))
plus x (succ zero) = succ x
plus x zero = x
-- constructor names do not matter
-- c (c' t) > c'' t
-- e.g. c0 (c1 x) > c0 x
-- c0 (c0 x) > c1 x
-- Actually constructor names does matter until the non-mattering is
-- implemented properly.
{- TEMPORARILY REMOVED by Ulf since there are problems with the constructor-name ignoring
data Bin : Set where
eps : Bin
c0 : Bin -> Bin
c1 : Bin -> Bin
foo : Bin -> Nat
foo eps = zero
foo (c0 eps) = zero
foo (c0 (c1 x)) = succ (foo (c0 x))
foo (c0 (c0 x)) = succ (foo (c1 x))
foo (c1 x) = succ (foo x)
-}
|
oeis/021/A021383.asm | neoneye/loda-programs | 11 | 245657 | ; A021383: Decimal expansion of 1/379.
; Submitted by <NAME>
; 0,0,2,6,3,8,5,2,2,4,2,7,4,4,0,6,3,3,2,4,5,3,8,2,5,8,5,7,5,1,9,7,8,8,9,1,8,2,0,5,8,0,4,7,4,9,3,4,0,3,6,9,3,9,3,1,3,9,8,4,1,6,8,8,6,5,4,3,5,3,5,6,2,0,0,5,2,7,7,0,4,4,8,5,4,8,8,1,2,6,6,4,9,0,7,6,5,1,7
add $0,1
mov $2,10
pow $2,$0
div $2,379
mov $0,$2
mod $0,10
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_1775.asm | ljhsiun2/medusa | 9 | 21745 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x160bf, %rdx
clflush (%rdx)
nop
cmp $55952, %r15
movb $0x61, (%rdx)
nop
nop
nop
nop
add $54268, %rbp
lea addresses_WT_ht+0x1a263, %rsi
lea addresses_D_ht+0xf863, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
add %r11, %r11
mov $99, %rcx
rep movsw
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_UC_ht+0x98e3, %rcx
clflush (%rcx)
and $45044, %rdi
mov $0x6162636465666768, %r15
movq %r15, %xmm6
vmovups %ymm6, (%rcx)
nop
nop
nop
nop
nop
sub $44917, %rdi
lea addresses_WC_ht+0x14b63, %rsi
lea addresses_A_ht+0x7a63, %rdi
nop
nop
nop
nop
nop
cmp $16343, %r13
mov $109, %rcx
rep movsq
nop
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_WC_ht+0xe562, %rsi
nop
sub $41027, %rcx
mov (%rsi), %r13d
nop
nop
inc %rdx
lea addresses_UC_ht+0x1e63, %rsi
lea addresses_WC_ht+0xe0a3, %rdi
clflush (%rsi)
nop
cmp %r13, %r13
mov $86, %rcx
rep movsq
nop
nop
nop
nop
nop
mfence
lea addresses_D_ht+0x1bbf3, %rdi
nop
nop
add $44948, %r13
mov $0x6162636465666768, %r11
movq %r11, %xmm1
and $0xffffffffffffffc0, %rdi
movaps %xmm1, (%rdi)
and $41840, %rbp
lea addresses_D_ht+0x13a63, %rbp
nop
nop
and $31217, %r13
movups (%rbp), %xmm0
vpextrq $0, %xmm0, %r15
cmp $33514, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %rax
push %rdx
// Faulty Load
lea addresses_WT+0x1fa63, %rax
nop
xor %r11, %r11
mov (%rax), %rdx
lea oracles, %r13
and $0xff, %rdx
shlq $12, %rdx
mov (%r13,%rdx,1), %rdx
pop %rdx
pop %rax
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
concerto_gui/gui_utils.asm | biermanncarl/cx16-concerto | 4 | 7747 | <reponame>biermanncarl/cx16-concerto
; Copyright 2021 <NAME>
; Many utility functions for the GUI are found in this file.
; From more basic stuff like setting the VERA "screen cursor" to a specific location
; to displaying more complex stuff like frames, edits, checkboxes etc.
; These routines are designed to be called from within the main program.
; The VERA is used from within the ISR and from within the main program.
; To avoid any disturbances of VERA writes by the ISR (which uses the VERA, too),
; great care has to be taken to always put an SEI before any VERA actions.
.scope guiutils
; variables used by the DISPLAY_BYTE macro
display_100s: .byte 0
display_10s: .byte 0
display_1s: .byte 0
.macro SET_VERA_XY svx, svy
stz VERA_ctrl
lda #$10
sta VERA_addr_high
lda svy
sta VERA_addr_mid
lda svx
asl
sta VERA_addr_low
.endmacro
; displays the byte db_data at position db_x and db_y
; used only for debugging.
.macro DISPLAY_BYTE db_data, db_x, db_y
.local @loop100s
.local @loop10s
.local @loop1s
; convert binary into decimal
lda db_data
ldx #48
@loop100s:
inx
sec
sbc #100
bcs @loop100s
adc #100
dex
cpx #48
bne :+
ldx #32
: stx concerto_gui::guiutils::display_100s
ldx #48
@loop10s:
inx
sec
sbc #10
bcs @loop10s
adc #10
dex
cpx #48
bne :+
ldx #32
: stx concerto_gui::guiutils::display_10s
ldx #48
@loop1s:
inx
sec
sbc #1
bcs @loop1s
adc #1
dex
stx concerto_gui::guiutils::display_1s
sei
; set VERA address
stz VERA_ctrl
lda #$10
sta VERA_addr_high
lda #db_y
sta VERA_addr_mid
lda #db_x
clc
asl
sta VERA_addr_low
; do output
lda concerto_gui::guiutils::display_100s
sta VERA_data0
lda #$21
sta VERA_data0
lda concerto_gui::guiutils::display_10s
sta VERA_data0
lda #$21
sta VERA_data0
lda concerto_gui::guiutils::display_1s
sta VERA_data0
lda #$21 ; set color
sta VERA_data0
cli
.endmacro
; displays the 0-terminated message at position db_x and db_y
; not used for the actual GUI, but rather for debugging etc.
.macro DISPLAY_LABEL msg_start, dm_x, dm_y
.local @loop_msg
.local @done_msg
sei
; set VERA address
stz VERA_ctrl
lda #$10
sta VERA_addr_high
lda #dm_y
sta VERA_addr_mid
lda #dm_x
clc
asl
sta VERA_addr_low
; print message
lda #<msg_start
sta mzpwa
lda #>msg_start
sta mzpwa+1
ldy #0
@loop_msg:
lda (mzpwa),y
beq @done_msg
sta VERA_data0
lda #CCOLOR_CAPTION ; set color
sta VERA_data0
iny
bra @loop_msg
@done_msg:
cli
.endmacro
; outputs the state of the FM voice map. used only for debugging
.macro DEBUG_FM_MAP
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist, 1,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+1, 5,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+2, 9,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+3, 13,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+4, 17,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+5, 21,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+6, 25,55
DISPLAY_BYTE concerto_synth::voices::FMmap::freevoicelist+7, 29,55
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap, 1,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+1, 5,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+2, 9,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+3, 13,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+4, 17,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+5, 21,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+6, 25,57
DISPLAY_BYTE concerto_synth::voices::FMmap::timbremap+7, 29,57
; ffv, lfv
DISPLAY_BYTE concerto_synth::voices::FMmap::ffv, 40,55
DISPLAY_BYTE concerto_synth::voices::FMmap::lfv, 44,55
.endmacro
; UTILITY ROUTINES
; ----------------
; drawing parameters
; "cursor" position
cur_x: .byte 0
cur_y: .byte 0
; color
color: .byte 0
; string pointer
str_pointer = mzpwe
; draw a component at position and with dimensions:
draw_x: .byte 0
draw_y: .byte 0
; NOTE: draw_x/draw_y are kept separate from cur_x/cur_y, because of the drawing of more complex objects like the frame around a panel.
; However, this is the only place where it is necessary ATM, so it might be possible to get rid of either of them and find a different solution for draw_frame.
draw_width: .byte 0
draw_height: .byte 0
; additional drawing parameters
draw_data1: .byte 0 ; e.g. number of tabs
draw_data2: .byte 0 ; e.g. index of active tab
; set cursor
set_cursor:
SET_VERA_XY cur_x, cur_y
rts
; move the cursor one line down from the current cur_x, cur_y
move_cursor_down:
inc cur_y
jsr set_cursor
rts
; move the cursor two lines down from the current cur_x, cur_y
move_cursor_down2:
inc cur_y
inc cur_y
jsr set_cursor
rts
; displays the 0-terminated message at position cur_x|cur_y
; message pointer is in str_pointer
; color as in variable color
print:
sei
; set VERA address
jsr set_cursor
; print message
ldx color
ldy #0
@loop_msg:
lda (str_pointer),y
beq @done_msg
sta VERA_data0
stx VERA_data0
iny
bra @loop_msg
@done_msg:
cli
rts
; prints a byte on screen (position as in VERA's address 0)
; color as in register X
; number as in register A
print_byte_simple:
; convert binary into decimal
ldy #48
@loop100s:
iny
sec
sbc #100
bcs @loop100s
adc #100
dey
cpy #48
bne :+
ldy #32
: sty display_100s
ldy #48
@loop10s:
iny
sec
sbc #10
bcs @loop10s
adc #10
dey
cpy #48
bne :+
; digit is zero. now it depends on 100s digit, whether it's space or 0
ldy display_100s
cpy #32
beq :+
ldy #48
: sty display_10s
ldy #48
@loop1s:
iny
sec
sbc #1
bcs @loop1s
adc #1
dey
sty display_1s
; do output
lda display_100s
sta VERA_data0
stx VERA_data0
lda display_10s
sta VERA_data0
stx VERA_data0
lda display_1s
sta VERA_data0
stx VERA_data0
rts
; clear screen in my own background color
cls:
; set background color in a dirty manner (we did not hear that from <NAME>)
; https://www.commanderx16.com/forum/index.php?/topic/469-change-background-color-using-vpoke/&do=findComment&comment=3084
lda #(11*16+1)
sta $376
; actually, I'd like a dark green or something
; TODO: set custom palette
; do the screen clear
lda #$93
jsr CHROUT
rts
; subroutine that draws a frame (around a panel)
; x, y position in draw_x and draw_y
; width and height in draw_width and draw_height
; data1 is number of tabs (0 if there are no tabs)
; data2 is index of active tab (0 to N-1)
draw_frame:
lda #(16*COLOR_BACKGROUND + COLOR_FRAME)
sta color
; top of frame
lda draw_x
sta cur_x
lda draw_y
sta cur_y
sei
jsr set_cursor
lda #85
sta VERA_data0
ldx color
stx VERA_data0
ldy draw_width
dey
dey
@loop_top:
lda #64
sta VERA_data0
stx VERA_data0
dey
bne @loop_top
lda #73
sta VERA_data0
stx VERA_data0
cli
; bottom of frame
lda cur_y
clc
adc draw_height
dec
sta cur_y
ldy draw_width
dey
dey
lda draw_data1 ; if 0 tabs, a simple frame is drawn
beq :+ ; if 1 or more tabs are present, the bottom side is drawn differently
lda cur_x
clc
adc #2
sta cur_x
dey
dey
: sei
jsr set_cursor
lda #74
sta VERA_data0
stx VERA_data0
@loop_bottom:
lda #64
sta VERA_data0
stx VERA_data0
dey
bne @loop_bottom
lda #75
sta VERA_data0
stx VERA_data0
cli
; right side of frame
lda draw_x
clc
adc draw_width
dec
sta cur_x
lda draw_y
inc
sta cur_y
ldy draw_height
dey
dey
sei
@loop_right:
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
inc cur_y
dey
bne @loop_right
cli
; left side of frame
lda draw_x
ldy draw_data1
beq :+
clc
adc #2
: sta cur_x
lda draw_y
inc
sta cur_y
ldy draw_height
dey
dey
sei
@loop_left:
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
inc cur_y
dey
bne @loop_left
cli
; check for tabs
ldy draw_data1
beq :+
jsr draw_tabs
: rts
; draw tabs
; x, y position in draw_x and draw_y
; independent routine for updating when another tab is selected
; data1 is number of tabs (0 if there are no tabs)
; data2 is index of active tab (0 to N-1)
draw_tabs:
ldx #(16*COLOR_BACKGROUND + COLOR_FRAME)
stx color
lda draw_x
clc
adc #2
sta cur_x
lda draw_y
sta cur_y
sei
jsr set_cursor
lda #114
sta VERA_data0
lda color
sta VERA_data0
; draw tabs
lda draw_x
sta cur_x
lda draw_y
inc
sta cur_y
ldy #0
ldx color
sei
@loop_tabs:
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
tya
clc
adc #49
sta VERA_data0
lda #(COLOR_BACKGROUND*16+COLOR_TABS)
sta VERA_data0
lda #66
sta VERA_data0
stx VERA_data0
inc cur_y
jsr set_cursor
lda #107
sta VERA_data0
stx VERA_data0
lda #64
sta VERA_data0
stx VERA_data0
lda #115
sta VERA_data0
stx VERA_data0
inc cur_y
iny
cpy draw_data1
bne @loop_tabs
dec cur_y
jsr set_cursor
lda #74
sta VERA_data0
cli
; draw active tab
lda draw_data2
dec
asl
clc
adc draw_y
sta cur_y
lda draw_x
sta cur_x
ldx color
sei
jsr set_cursor
lda #85
sta VERA_data0
stx VERA_data0
lda #64
sta VERA_data0
stx VERA_data0
lda #75
ldy draw_data2
cpy #1
bne :+
lda #64
: sta VERA_data0
stx VERA_data0
inc cur_y
inc cur_y
jsr set_cursor
lda #74
sta VERA_data0
stx VERA_data0
lda #64
sta VERA_data0
stx VERA_data0
lda #73
sta VERA_data0
stx VERA_data0
dec cur_y
inc cur_x
inc cur_x
jsr set_cursor
lda #32
sta VERA_data0
cli
rts
; draw a button
; x, y position in draw_x and draw_y
; label as address of 0-terminated string in str_pointer
; width in draw_width
draw_button:
lda draw_x
sta cur_x
lda draw_y
sta cur_y
; top of button
ldx #(1+16*COLOR_BACKGROUND)
ldy draw_width
sei
jsr set_cursor
lda #100
@loop_top:
sta VERA_data0
stx VERA_data0
dey
bne @loop_top
; label of button
inc cur_y
lda #CCOLOR_BUTTON
sta color
ldx draw_width
inx ; this is required by print_with_padding
ldy #0
jsr set_cursor
jsr print_with_padding
cli
rts
; draw a number edit that has arrows
; x, y position in draw_x and draw_y
; data1: number on display
draw_arrowed_edit:
lda draw_x
sta cur_x
lda draw_y
sta cur_y
sei
jsr set_cursor
ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_ARROWS)
lda #60 ; 62
sta VERA_data0
stx VERA_data0
lda draw_data1
ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_FG)
jsr print_byte_simple
lda #32
sta VERA_data0
stx VERA_data0
ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_ARROWS)
lda #62
sta VERA_data0
stx VERA_data0
cli
rts
; draw a number edit for drag-edit
; x, y position in draw_x and draw_y
; data1: number on display
; data2: bit 0: coarse/fine available, bit1: coarse/fine switch, bit2: signed
draw_drag_edit:
dde_bittest = mzpbg ; mzpbg used! (use something else for bit-testing in this routine if this clashes with something else)
lda draw_x
sta cur_x
lda draw_y
sta cur_y
ldx #(16*COLOR_ARROWED_EDIT_BG + COLOR_ARROWED_EDIT_FG)
sei
jsr set_cursor
lda draw_data2
sta dde_bittest
bbs2 dde_bittest, @signed
@unsigned:
bra @check_fine_coarse
@signed:
lda draw_data1
bmi @minus
@plus:
lda #43
sta VERA_data0
stx VERA_data0
bra @check_fine_coarse
@minus:
eor #%11111111
inc
sta draw_data1
lda #45
sta VERA_data0
stx VERA_data0
@check_fine_coarse:
bbr0 dde_bittest, @no_coarse_fine ; fine/coarse ?
; here we are doing fine/coarse
bbs1 dde_bittest, @fine ; doing fine?
@coarse:
lda draw_data1
jsr print_byte_simple
lda #46
sta VERA_data0
stx VERA_data0
cli
rts
@fine:
lda #46
sta VERA_data0
stx VERA_data0
lda draw_data1
jsr print_byte_simple
cli
rts
@no_coarse_fine:
lda draw_data1
jsr print_byte_simple
cli
rts
; draws a checkbox
; x, y position in draw_x and draw_y
; checked in draw_data1
draw_checkbox:
lda draw_x
sta cur_x
lda draw_y
sta cur_y
sei
jsr set_cursor
lda draw_data1
beq @notick
@tick:
lda #86
sta VERA_data0
lda #CCOLOR_CHECKBOX_TICK
sta VERA_data0
bra @done
@notick:
lda #81
sta VERA_data0
lda #CCOLOR_CHECKBOX_CLEAR
sta VERA_data0
@done:
cli
rts
; prints a string with padding up to specified width -- quite specific, it is used in listbox & button drawing
; assumes that the VERA address is already set accordingly
; (str_pointer), y is where printing continues, incrementing Y along the way
; color according to the variable color
; X: overall width plus 1
print_with_padding:
@loop1: ; printing loop. assumes that the string length is less or equal than the listbox/button width minus 2 (really 2 or just 1?)
lda (str_pointer), y
beq @end_loop1
sta VERA_data0
lda color
sta VERA_data0
dex
iny
bra @loop1
@end_loop1:
; do padding at the end of the listbox/button if necessary
@loop2:
dex
beq @end_loop2
lda #32
sta VERA_data0
lda color
sta VERA_data0
bra @loop2
@end_loop2:
rts
; draws a listbox
; x, y position in draw_x and draw_y
; width in draw_width
; label pointer in str_pointer
draw_listbox:
lda draw_x
sta cur_x
lda draw_y
sta cur_y
sei
jsr set_cursor
lda #90 ; listbox "bullet"
sta VERA_data0
ldx #(COLOR_LISTBOX_BG*16+COLOR_LISTBOX_ARROW)
stx VERA_data0
lda #32
sta VERA_data0
stx VERA_data0
ldy #0
; prepare width counter
ldx draw_width
dex ; (for extra characters on the left hand side of the listbox, but just one because of the way we determine the length of the padding)
lda #(COLOR_LISTBOX_BG*16+COLOR_LISTBOX_FG)
sta color
jsr print_with_padding
cli
rts
; draws the listbox popup
; x, y position in draw_x and draw_y
; width in draw_width, height in draw_height (also marks number of strings)
; pointer to stringlist in str_pointer
draw_lb_popup:
dlbp_line_counter = mzpbg
lda draw_x
sta cur_x
lda draw_y
sta cur_y
ldy #0
lda draw_height
sta dlbp_line_counter
lda #(16*COLOR_LISTBOX_POPUP_BG+COLOR_LISTBOX_POPUP_FG)
sta color
sei
@line_loop:
jsr set_cursor
ldx draw_width
inx
jsr print_with_padding
; advance indices
inc cur_y
iny
lda dlbp_line_counter
dec
sta dlbp_line_counter
bne @line_loop
cli
rts
; clears the area on the screen where the listbox popup was before.
; x, y position in draw_x and draw_y
; width in draw_width, height in draw_height
clear_lb_popup:
lda draw_x
sta cur_x
lda draw_y
sta cur_y
ldy draw_height
lda #(16*COLOR_BACKGROUND)
sta color
sei
@line_loop:
jsr set_cursor
ldx draw_width
@column_loop:
lda #32
sta VERA_data0
lda color
sta VERA_data0
dex
bne @column_loop
; advance indices
inc cur_y
dey
bne @line_loop
cli
rts
; draw FM algorithm
; Alg number in draw_data1
; Position fixed by macros @alg_x, @alg_y
draw_fm_alg:
@alg_x = 70
@alg_y = 14
; clear drawing area
lda #@alg_x
sta draw_x
lda #@alg_y
sta draw_y
lda #5
sta draw_width
lda #8
sta draw_height
jsr clear_lb_popup
lda #@alg_x
sta cur_x
lda #@alg_y
sta cur_y
; do actual drawing
sei
jsr set_cursor
ldx #CCOLOR_ALG_CONNECTION
; operator 1, always the same
lda #112
sta VERA_data0
stx VERA_data0
lda #110
sta VERA_data0
stx VERA_data0
inc cur_y
jsr set_cursor
lda #109
sta VERA_data0
stx VERA_data0
lda #49
sta VERA_data0
ldx #CCOLOR_ALG_OP_NUMBERS
stx VERA_data0
; all algs require this
inc cur_x
; now switch depending on alg
lda draw_data1
asl
tax
INDEXED_JSR @jmp_table, @return
@jmp_table:
.word @con_0
.word @con_1
.word @con_2
.word @con_3
.word @con_4
.word @con_5
.word @con_6
.word @con_7
@con_0:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
jsr move_cursor_down2
lda #50
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #51
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #66
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #66
sta VERA_data0
stx VERA_data0
rts
@con_1:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
lda #50
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #51
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #107
sta VERA_data0
stx VERA_data0
lda #125
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #66
sta VERA_data0
stx VERA_data0
rts
@con_2:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
lda #50
sta VERA_data0
stx VERA_data0
inc cur_x
jsr move_cursor_down2
lda #51
sta VERA_data0
stx VERA_data0
dec cur_x
jsr move_cursor_down
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
sta VERA_data0
stx VERA_data0
jsr move_cursor_down
lda #107
sta VERA_data0
stx VERA_data0
rts
@con_3:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
lda #51
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #50
sta VERA_data0
stx VERA_data0
inc cur_x
jsr move_cursor_down
lda #52
sta VERA_data0
stx VERA_data0
dec cur_x
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
sta VERA_data0
stx VERA_data0
inc cur_x
jsr move_cursor_down
lda #115
sta VERA_data0
stx VERA_data0
rts
@con_4:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
lda #51
sta VERA_data0
stx VERA_data0
jsr move_cursor_down2
lda #50
sta VERA_data0
stx VERA_data0
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
sta VERA_data0
stx VERA_data0
rts
@con_5:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
jsr move_cursor_down2
lda #50
sta VERA_data0
stx VERA_data0
lda #51
sta VERA_data0
stx VERA_data0
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #107
sta VERA_data0
stx VERA_data0
lda #114
sta VERA_data0
stx VERA_data0
lda #110
sta VERA_data0
stx VERA_data0
rts
@con_6:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
jsr move_cursor_down2
lda #51
sta VERA_data0
stx VERA_data0
lda #50
sta VERA_data0
stx VERA_data0
lda #52
sta VERA_data0
stx VERA_data0
; draw connections
ldx #CCOLOR_ALG_CONNECTION
lda #@alg_y+2
sta cur_y
jsr set_cursor
lda #66
sta VERA_data0
stx VERA_data0
rts
@con_7:
; finish off numbers
ldx #CCOLOR_ALG_OP_NUMBERS
lda #51
sta VERA_data0
stx VERA_data0
lda #50
sta VERA_data0
stx VERA_data0
lda #52
sta VERA_data0
stx VERA_data0
rts
@return:
cli
rts
; moves to screen position (.A|.X) (does not preserve .A)
alternative_gotoxy:
stz VERA_ctrl
asl
sta VERA_addr_low
lda #$10
sta VERA_addr_high
stx VERA_addr_mid
rts
; This function has been adapted from the awesome VTUI library by JimmyDansbo.
; https://github.com/JimmyDansbo/VTUIlib
; https://www.commanderx16.com/forum/index.php?/files/file/142-vtui-library/
; Unfortunately, we have to modify it severely because the VERA communication
; would otherwise get disrupted by the interrupt.
; *****************************************************************************
; Show a cursor and get a string input from keyboard.
; *****************************************************************************
; INPUTS: r0 = pointer to buffer to hold string (must be pre-allocated)
; r2 = screen coordinates
; r3 = pointer to buffer holding the screen code
; .Y = maximum length of string
; .X = color information for input characters
; OUPUTS: .Y = actual length of input
; USES: .A & r1
; *****************************************************************************
vtui_input_str:
@ptr = r0
@length = r1L
@invcol = r1H
@pos_x = r2L
@pos_y = r2H
phx
sty @length ; Store maximum length
; move cursor to screen position
sei
lda @pos_x
ldx @pos_y
jsr alternative_gotoxy
lda #$A0 ; Show a "cursor"
sta VERA_data0
plx
stx VERA_data0
;dec VERA_addr_low ; only necessary if we do not re-set the cursor later
;dec VERA_addr_low
; clear remaining area for string input
phy
dey
lda #' '
: sta VERA_data0
stx VERA_data0
dey
bne :-
ply
ldy #0
@inputloop:
; give ISR a moment to interrupt us
cli
phx
phy
jsr $FFE4 ; Read keyboard input
ply
plx
; now take back control and move VERA cursor back to the position we need
sei
pha
phx
tya
clc
adc @pos_x
ldx @pos_y
jsr alternative_gotoxy
plx
pla
cmp #$0D ; If RETURN has been pressed, we exit
beq @end
cmp #$14 ; We need to handle backspace
bne @istext
cpy #0 ; If .Y is 0, we can not delete
beq @inputloop
; Here we need to handle backspace
dey
lda #' ' ; Delete cursor
sta VERA_data0
lda VERA_addr_low ; Go 2 chars back = 4 bytes
sbc #3
sta VERA_addr_low
lda #$A0 ; Overwrite last char with cursor
sta VERA_data0
dec VERA_addr_low
bra @inputloop
@istext:
cpy @length
beq @inputloop ; If .Y = @length, we can not add character
;sta (@ptr),y ; Store char in buffer -- original function stored input petscii. Here, we store screen codes
cmp #$20 ; If < $20, we can not use it
bcc @inputloop
cmp #$40 ; If < $40 & >= $20, screencode is equal to petscii
bcc @stvera
cmp #$60 ; If > $60, we can not use it
bcs @inputloop
sbc #$3F ; When .A >= $40 & < $60, subtract $3F to get screencode
@stvera:
sta (@ptr),y ; store screen code in buffer
sta VERA_data0 ; Write char to screen with colorcode
stx VERA_data0
lda #$A0 ; Write cursor
sta VERA_data0
stx VERA_data0
dec VERA_addr_low ; Set VERA to point at cursor
dec VERA_addr_low
iny ; Inc .Y to show a char has been added
bra @inputloop
@end: lda #' '
sta VERA_data0
stx VERA_data0
lda #0
sta (@ptr),y ; trailing zero to finish string
cli
rts
.endscope ; guiutils |
coverage/PENDING_SUBMIT/amdvlk/0627-COVERAGE-cmp-inst-analysis-87/work/variant/1_spirv_asm/shader.frag.asm | asuonpaa/ShaderTests | 0 | 5890 | <filename>coverage/PENDING_SUBMIT/amdvlk/0627-COVERAGE-cmp-inst-analysis-87/work/variant/1_spirv_asm/shader.frag.asm<gh_stars>0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 39
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %34
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 320
OpName %4 "main"
OpName %8 "a"
OpName %16 "buf0"
OpMemberName %16 0 "one"
OpName %18 ""
OpName %34 "_GLF_color"
OpMemberDecorate %16 0 Offset 0
OpDecorate %16 Block
OpDecorate %18 DescriptorSet 0
OpDecorate %18 Binding 0
OpDecorate %34 Location 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeInt 32 1
%7 = OpTypePointer Function %6
%9 = OpConstant %6 1
%15 = OpTypeFloat 32
%16 = OpTypeStruct %15
%17 = OpTypePointer Uniform %16
%18 = OpVariable %17 Uniform
%19 = OpConstant %6 0
%20 = OpTypePointer Uniform %15
%24 = OpTypeBool
%28 = OpConstant %6 5
%32 = OpTypeVector %15 4
%33 = OpTypePointer Output %32
%34 = OpVariable %33 Output
%35 = OpConstant %15 1
%36 = OpConstant %15 0
%37 = OpConstantComposite %32 %35 %36 %36 %35
%4 = OpFunction %2 None %3
%5 = OpLabel
%8 = OpVariable %7 Function
OpStore %8 %9
OpBranch %10
%10 = OpLabel
OpLoopMerge %12 %13 None
OpBranch %14
%14 = OpLabel
%21 = OpAccessChain %20 %18 %19
%22 = OpLoad %15 %21
%23 = OpConvertFToS %6 %22
%25 = OpSGreaterThanEqual %24 %23 %9
OpBranchConditional %25 %11 %12
%11 = OpLabel
%26 = OpLoad %6 %8
%27 = OpIAdd %6 %26 %9
OpStore %8 %27
%29 = OpSGreaterThanEqual %24 %26 %28
OpSelectionMerge %31 None
OpBranchConditional %29 %30 %31
%30 = OpLabel
OpStore %34 %37
OpBranch %12
%31 = OpLabel
OpBranch %13
%13 = OpLabel
OpBranch %10
%12 = OpLabel
OpReturn
OpFunctionEnd
|
oeis/023/A023539.asm | neoneye/loda-programs | 11 | 126 | ; A023539: Convolution of natural numbers with composite numbers.
; 4,14,32,59,96,145,208,286,380,492,624,777,952,1151,1375,1625,1902,2207,2542,2909,3309,3743,4212,4717,5260,5842,6464,7128,7836,8589,9388,10235,11131,12077,13074,14123,15226,16384,17598,18869,20198,21587,23038,24552,26130,27773,29482,31259,33105,35021,37009,39071,41208,43421,45711,48079,50527,53056,55667,58362,61142,64008,66961,70002,73133,76355,79669,83076,86577,90173,93865,97655,101544,105533,109624,113819,118119,122525,127039,131663,136398,141245,146206,151282,156474,161783,167210,172756
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
add $0,1
seq $0,53767 ; Sum of first n composite numbers.
add $1,$0
lpe
mov $0,$1
|
boards/stm32f0xxk8_stackable/stm32gd-board.ads | ekoeppen/STM32_Generic_Ada_Drivers | 1 | 25473 | with STM32GD.GPIO; use STM32GD.GPIO;
with STM32GD.GPIO.Pin;
with STM32GD.SPI;
with STM32GD.SPI.Peripheral;
with STM32GD.USART;
with STM32GD.USART.Peripheral;
with STM32GD.RTC;
with STM32GD.Clock;
with STM32GD.Clock.Tree;
with Drivers.Text_IO;
package STM32GD.Board is
package CLOCKS is new STM32GD.Clock.Tree;
package GPIO renames STM32GD.GPIO;
package SCLK is new GPIO.Pin (Pin => GPIO.Pin_5, Port => GPIO.Port_A, Mode => GPIO.Mode_AF);
package MISO is new GPIO.Pin (Pin => GPIO.Pin_6, Port => GPIO.Port_A, Mode => GPIO.Mode_AF);
package MOSI is new GPIO.Pin (Pin => GPIO.Pin_7, Port => GPIO.Port_A, Mode => GPIO.Mode_AF);
package CSN is new GPIO.Pin (Pin => GPIO.Pin_4, Port => GPIO.Port_A, Mode => GPIO.Mode_Out);
package LED is new GPIO.Pin (Pin => GPIO.Pin_1, Port => GPIO.Port_A, Mode => GPIO.Mode_Out);
package TX is new GPIO.Pin (Pin => GPIO.Pin_2, Port => GPIO.Port_A, Pull_Resistor => GPIO.Pull_Up, Mode => GPIO.Mode_AF, Alternate_Function => 1);
package RX is new GPIO.Pin (Pin => GPIO.Pin_3, Port => GPIO.Port_A, Pull_Resistor => GPIO.Pull_Up, Mode => GPIO.Mode_AF, Alternate_Function => 1);
package P1_IN is new GPIO.Pin (Pin => GPIO.Pin_8, Port => GPIO.Port_A);
package P2_IN is new GPIO.Pin (Pin => GPIO.Pin_11, Port => GPIO.Port_A);
package P3_IN is new GPIO.Pin (Pin => GPIO.Pin_12, Port => GPIO.Port_A);
package P4_IN is new GPIO.Pin (Pin => GPIO.Pin_14, Port => GPIO.Port_A);
package P5_IN is new GPIO.Pin (Pin => GPIO.Pin_3, Port => GPIO.Port_B);
package P6_IN is new GPIO.Pin (Pin => GPIO.Pin_4, Port => GPIO.Port_B);
package P7_IN is new GPIO.Pin (Pin => GPIO.Pin_5, Port => GPIO.Port_B);
package P8_IN is new GPIO.Pin (Pin => GPIO.Pin_6, Port => GPIO.Port_B);
package P9_IN is new GPIO.Pin (Pin => GPIO.Pin_7, Port => GPIO.Port_B);
package P10_IN is new GPIO.Pin (Pin => GPIO.Pin_0, Port => GPIO.Port_A);
package USART is new STM32GD.USART.Peripheral (USART => STM32GD.USART.USART_2, Speed => 115200,
Clock_Tree => CLOCKS, Clock => STM32GD.Clock.PCLK);
package RTC is new STM32GD.RTC (Clock_Tree => STM32GD.Board.Clocks, Clock => STM32GD.Clock.LSI);
package Text_IO is new Drivers.Text_IO (USART => STM32GD.Board.USART);
package SPI is new STM32GD.SPI.Peripheral (SPI => STM32GD.SPI.SPI_1);
procedure Init;
end STM32GD.Board;
|
src/main/gov/nasa/jpf/inspector/client/parser/ConsoleGrammar.g4 | fossabot/jpf-inspector | 4 | 7020 | //
// Copyright (C) 2010-2011 <NAME>
// Copyright (C) 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
grammar ConsoleGrammar;
options {
language=Java;
}
@header{
package gov.nasa.jpf.inspector.client.parser.generated;
import gov.nasa.jpf.inspector.interfaces.*;
import gov.nasa.jpf.inspector.interfaces.InspectorStatusChange;
import gov.nasa.jpf.inspector.interfaces.CallbackKind;
import gov.nasa.jpf.inspector.client.*;
import gov.nasa.jpf.inspector.client.commands.*;
import gov.nasa.jpf.inspector.client.commands.CmdRun.CmdRunTypes;
import gov.nasa.jpf.inspector.common.BreakpointCreationExpression;
import gov.nasa.jpf.inspector.interfaces.CommandsInterface.StepType;
import gov.nasa.jpf.inspector.utils.parser.RecognitionRuntimeException;
}
// *******************************
// Parser rules
// *******************************
// Identifies of keyword as text
anyWord returns [String text]
: IDF { $text = $IDF.text; }
| allKeyWords { $text = $allKeyWords.text; }
;
allKeyWords returns [String text]
: a=TOKEN_HIT_COUNT { $text = $a.text; }
| allKeyWordsWithoutHitCountBP { $text = $allKeyWordsWithoutHitCountBP.text; }
;
allKeyWordsWithoutHitCountBP returns [String text]
: a=TOKEN_NAME { $text = $a.text; }
| a=TOKEN_STATE { $text = $a.text; }
| allKeyWordsWithoutCreateBPandHitCount { $text = $allKeyWordsWithoutCreateBPandHitCount.text; }
;
allKeyWordsWithoutCreateBPandHitCount returns [String text]
: a=TOKEN_ALL { $text = $a.text; }
| a=TOKEN_ASK { $text = $a.text; }
| a=TOKEN_ASSERT { $text = $a.text; }
| a=TOKEN_BREAK { $text = $a.text; }
| a=TOKEN_BREAKPOINT { $text = $a.text; }
| a=TOKEN_CHOICE_GENERATORS { $text = $a.text; }
| a=TOKEN_CONTINUE { $text = $a.text; }
| a=TOKEN_CLEAR { $text = $a.text; }
| a=TOKEN_CREATE { $text = $a.text; }
| a=TOKEN_DATA { $text = $a.text; }
| a=TOKEN_DELETE { $text = $a.text; }
| a=TOKEN_DISABLE { $text = $a.text; }
| a=TOKEN_E { $text = $a.text; }
| a=TOKEN_ENABLE { $text = $a.text; }
| a=TOKEN_EXECUTE { $text = $a.text; }
| a=TOKEN_LOG { $text = $a.text; }
| a=TOKEN_PRINT { $text = $a.text; }
| a=TOKEN_RECORD { $text = $a.text; }
| a=TOKEN_RUN { $text = $a.text; }
| a=TOKEN_RUNNING { $text = $a.text; }
| a=TOKEN_SAVE { $text = $a.text; }
| a=TOKEN_SET { $text = $a.text; }
| a=TOKEN_SELECT { $text = $a.text; }
| a=TOKEN_SCHEDULING { $text = $a.text; }
| a=TOKEN_SHOW { $text = $a.text; }
| a=TOKEN_STARTED { $text = $a.text; }
| a=TOKEN_STOPPED { $text = $a.text; }
| a=TOKEN_USED { $text = $a.text; }
| a=TOKEN_TERMINATING { $text = $a.text; }
| a=TOKEN_THREAD { $text = $a.text; }
| a=TOKEN_THREAD_PC { $text = $a.text; }
| a=TOKEN_X { $text = $a.text; }
| a=TOKEN_STEP_INSTRUCTION { $text = $a.text; }
| a=TOKEN_STEP_OVER { $text = $a.text; }
| a=TOKEN_STEP_IN { $text = $a.text; }
| a=TOKEN_STEP_OUT { $text = $a.text; }
| a=TOKEN_STEP_TRANSITION { $text = $a.text; }
| a=TOKEN_BACK_STEP_INSTRUCTION { $text = $a.text; }
| a=TOKEN_BACK_STEP_OVER { $text = $a.text; }
| a=TOKEN_BACK_STEP_IN { $text = $a.text; }
| a=TOKEN_BACK_STEP_OUT { $text = $a.text; }
| a=TOKEN_BACK_STEP_TRANSITION { $text = $a.text; }
| a=TOKEN_BACK_FIELD_ACCESS { $text = $a.text; }
| a=TOKEN_BACK_BREAKPOINT_HIT { $text = $a.text; }
| a=TOKEN_CB_STATE_CHANGE { $text = $a.text; }
| a=TOKEN_CB_GENERIC_ERROR { $text = $a.text; }
| a=TOKEN_CB_GENERIC_INFO { $text = $a.text; }
| a=TOKEN_CB_BREAKPOINT_HIT { $text = $a.text; }
| a=TOKEN_CB_CG_NEW_CHOICE { $text = $a.text; }
| a=TOKEN_CB_CG_CHOICE_TO_USE { $text = $a.text; }
| a=TOKEN_CB_CG_USED_CHOICE { $text = $a.text; }
| a=TOKEN_QUIT { $text = $a.text; }
| a=TOKEN_HELLO { $text = $a.text; }
| a=TOKEN_HELP { $text = $a.text; }
| a=TOKEN_WAIT { $text = $a.text; }
| a=TOKEN_FINISH { $text = $a.text; }
| a=TOKEN_TERMINATE { $text = $a.text; }
| a=TOKEN_BOTH { $text = $a.text; }
| a=TOKEN_CHANGE { $text = $a.text; }
| a=TOKEN_SET_ATTR { $text = $a.text; }
| a=TOKEN_PRINT_ATTR { $text = $a.text; }
;
// Can parse all Client commands as well as text representation of Callbacks - used for Record&Replay approach
clientCommandWithCB returns [ClientCommand value]
: clientCommands { $value = $clientCommands.value; } EOF
| WS? cmdCallback WS? { $value = $cmdCallback.value; }
;
clientCommands returns [ClientCommand value]
: WS? clientCommands1 EOF { $value = $clientCommands1.value; }
;
clientCommands1 returns [ClientCommand value]
: left=clientCommands1 WS? SIGN_AMPERSAND_AMPERSAND WS? right=clientCommands1 WS?{ $value = new CmdThen($left.value, $right.value); }
// the "then" command (&&); recursive, thus must be here and not in a sub-nonterminal
| cmdBreakpoints WS? { $value = $cmdBreakpoints.value; }
| cmdSingleSteps WS? { $value = $cmdSingleSteps.value; }
| cmdInformational WS? { $value = $cmdInformational.value; }
| cmdChoiceGenerators WS? { $value = $cmdChoiceGenerators.value; }
| cmdRecord WS? { $value = $cmdRecord.value; }
| cmdAssertions WS? { $value = $cmdAssertions.value; }
| cmdExecution WS? { $value = $cmdExecution.value; }
| cmdCustom WS? { $value = $cmdCustom.value; } // Must be the last item because this is a catch-all.
;
cmdExecution returns [ClientCommand value]
: TOKEN_RUN WS? { $value = new CmdRun(CmdRunTypes.RUN, "run"); }
| TOKEN_CONTINUE WS? { $value = new CmdRun(CmdRunTypes.RUN, "continue"); }
| TOKEN_BREAK WS? { $value = new CmdRun(CmdRunTypes.STOP, "break"); }
| TOKEN_QUIT WS? { $value = new CmdQuit(); }
| TOKEN_TERMINATE { $value = new CmdTerminate(); }
| TOKEN_WAIT { $value = new CmdWait(); }
| TOKEN_FINISH { $value = new CmdFinish(); }
| TOKEN_SET WS? allText { $value = new CmdSet($allText.text); }
| TOKEN_SET_ATTR WS? allText { $value = new CmdSetAttr($allText.text); }
;
cmdInformational returns [ClientCommand value]
: TOKEN_THREAD (WS? intValue)? { $value = new CmdStatusThreads($intValue.ctx != null ? $intValue.value : null); }
| TOKEN_PRINT (WS? allText)? { $value = new CmdPrint($allText.text != null ? $allText.text : ""); }
| TOKEN_PRINT_ATTR (WS? allText)? { $value = new CmdPrintAttr($allText.text != null ? $allText.text : ""); }
| TOKEN_THREAD_PC (WS? intValue)? { $value = new CmdThreadsPC($intValue.ctx != null ? $intValue.value : null); }
| TOKEN_HELLO { $value = new CmdHello(); }
| TOKEN_HELP { $value = new CmdHelp(); }
;
cmdCustom returns [ClientCommand value]
: name=IDF { $value = new CmdCustomCommand($name.text, ""); }
| name=IDF WS arguments=allText { $value = new CmdCustomCommand($name.text, $arguments.text); }
;
cmdBreakpoints returns [ClientCommand value]
: TOKEN_SHOW WS? TOKEN_BREAKPOINT { $value = new CmdBreakpointShow(); }
| TOKEN_DELETE WS? TOKEN_BREAKPOINT WS? INT { $value = new CmdBreakpointDelete($INT.text); }
| TOKEN_CREATE WS? TOKEN_BREAKPOINT
{ BreakpointCreationExpression bpCreate = new BreakpointCreationExpression(); } ( WS? cmdCreateBP[bpCreate])* WS bpExpression
{ bpCreate.setBPExpression($bpExpression.expr); $value = new CmdBreakpointCreate(bpCreate); }
| cmdChangeBreakpoint { $value = $cmdChangeBreakpoint.value; }
;
cmdChangeBreakpoint returns [ClientCommand value]
: TOKEN_ENABLE WS? TOKEN_BREAKPOINT WS? INT { $value = CmdBreakpointChange.createEnableBreakpointCommand($INT.text); }
| TOKEN_DISABLE WS? TOKEN_BREAKPOINT WS? INT { $value = CmdBreakpointChange.createDisableBreakpointCommand($INT.text); }
| TOKEN_CHANGE WS? TOKEN_BREAKPOINT WS? INT WS? TOKEN_STATE WS? SIGN_EQUAL WS? cmdBreakpointState
{ $value = CmdBreakpointChange.createChangeBreakpointCommand($INT.text, $cmdBreakpointState.bpState); }
;
cmdCreateBP [BreakpointCreationExpression bpCreate]
: TOKEN_NAME WS? SIGN_EQUAL WS? anyWord { $bpCreate.setName($anyWord.text); }
| TOKEN_STATE WS? SIGN_EQUAL WS? cmdBreakpointState { $bpCreate.setState($cmdBreakpointState.bpState); }
| (lower=intValue WS? signLess=LESS WS?)? TOKEN_HIT_COUNT (WS? signHigh=LESS WS? upper=intValue)?
{
$bpCreate.setBounds(
$lower.ctx != null ? $lower.value : null,
$signLess != null ? $signLess.text : null,
$signHigh != null ? $signHigh.text : null,
$upper.ctx != null ? $upper.value : null
);
}
;
cmdBreakpointState returns [BreakpointState bpState]
: TOKEN_DISABLE { $bpState = BreakpointState.DISABLED; }
| TOKEN_LOG { $bpState = BreakpointState.LOGGING; }
| TOKEN_ENABLE { $bpState = BreakpointState.ENABLED; }
;
// We have to solve collision between bpExpression and "hitCountExpression" expression
// Note: Not precise, however due to structure of the bpExpressions it is enough
// Special handling of "name" "hitCount" "state" and '+' '-' INT HEX
bpExpression returns [String expr]
: allKeyWordsWithoutCreateBPandHitCount b01=allTextWS? { $expr = $allKeyWordsWithoutCreateBPandHitCount.text + ($b01.text!=null?$b01.text:""); }
| allNonKeywordsRulesBase b02=allTextWS? { $expr = $allNonKeywordsRulesBase.text + ($b02.text!=null?$b02.text:""); }
| IDF b03=allTextWS? { $expr = $IDF.text + ($b03.text!=null?$b03.text:""); }
;
cmdSingleSteps returns [CmdSingleStepping value]
: TOKEN_STEP_INSTRUCTION (WS intValue)?
{ $value = new CmdSingleStepping(true, StepType.ST_INSTRUCTION, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_STEP_OVER (WS intValue)?
{ $value = new CmdSingleStepping(true, StepType.ST_LINE, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_STEP_IN (WS intValue)?
{ $value = new CmdSingleStepping(true, StepType.ST_STEP_IN, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_STEP_OUT (WS intValue)?
{ $value = new CmdSingleStepping(true, StepType.ST_STEP_OUT, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_STEP_TRANSITION (WS? c=cgType)? (WS intValue)?
{ $value = CmdSingleStepping.createCmdSingleSteppingTransition(true, $c.ctx != null ? $c.cgsType : null, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_STEP_INSTRUCTION (WS intValue)?
{ $value = new CmdSingleStepping(false, StepType.ST_INSTRUCTION, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_STEP_OVER (WS intValue)?
{ $value = new CmdSingleStepping(false, StepType.ST_LINE, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_STEP_IN (WS intValue)?
{ $value = new CmdSingleStepping(false, StepType.ST_STEP_IN, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_STEP_OUT (WS intValue)?
{ $value = new CmdSingleStepping(false, StepType.ST_STEP_OUT, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_STEP_TRANSITION (WS? c=cgType)? (WS intValue)?
{ $value = CmdSingleStepping.createCmdSingleSteppingTransition(false, $c.ctx != null ? $c.cgsType : null, $intValue.ctx != null ? $intValue.value : 1); }
| TOKEN_BACK_BREAKPOINT_HIT
{ $value = CmdSingleStepping.createBackBreakpointHit(); }
| TOKEN_BACK_FIELD_ACCESS (WS? field=allTextNoWS)
{ $value = CmdSingleStepping.createBackFieldAccess($field.expr); }
;
cmdChoiceGenerators returns [ClientCommand value]
: TOKEN_USED WS? TOKEN_CHOICE_GENERATORS { $value = new CmdUsedChoiceGenerators(); }
| a=enableOrDisable WS? (b=cgMode WS?)? (c=cgType WS?)? TOKEN_CHOICE_GENERATORS
{
$value = new CmdChoiceGeneratorsTracking(
($c.ctx !=null ? $c.cgsType : CmdChoiceGeneratorsTracking.CGTypeSpec.CGS_ALL),
($b.ctx != null ? $b.cg_mode : ChoiceGeneratorsInterface.CGMode.CG_MODE_PRINT),
$a.value);
}
| TOKEN_CHOICE_GENERATORS WS? TOKEN_SELECT cgChoice { $value = new CmdChoiceSelect($cgChoice.choice); }
| TOKEN_ENABLE WS? TOKEN_THREAD WS? intValue { $value = CmdEnableThread.createEnableThreadCommand($intValue.value); }
| TOKEN_DISABLE WS? TOKEN_THREAD WS? intValue { $value = CmdEnableThread.createDisableThreadCommand($intValue.value); }
| TOKEN_SHOW WS? TOKEN_CHOICE_GENERATORS { $value = new CmdShowChoiceGenerators(); }
;
cgType returns [CmdChoiceGeneratorsTracking.CGTypeSpec cgsType]
: TOKEN_SCHEDULING { $cgsType = CmdChoiceGeneratorsTracking.CGTypeSpec.CGS_SCHEDULING; }
| TOKEN_DATA { $cgsType = CmdChoiceGeneratorsTracking.CGTypeSpec.CGS_DATA; }
| TOKEN_ALL { $cgsType = CmdChoiceGeneratorsTracking.CGTypeSpec.CGS_ALL; }
| TOKEN_BOTH { $cgsType = CmdChoiceGeneratorsTracking.CGTypeSpec.CGS_ALL; }
;
cgMode returns [ChoiceGeneratorsInterface.CGMode cg_mode]
: TOKEN_ASK { $cg_mode = ChoiceGeneratorsInterface.CGMode.CG_MODE_ASK; }
| TOKEN_PRINT { $cg_mode = ChoiceGeneratorsInterface.CGMode.CG_MODE_PRINT; }
;
enableOrDisable returns [boolean value]
: TOKEN_ENABLE { $value = true; }
| TOKEN_DISABLE { $value = false; }
;
cgChoice returns [int choice]
: { $choice = CmdChoiceSelect.USE_CURRENT_CHOICE; }
| WS? intValue { $choice = $intValue.value; }
| WS? '*' { $choice = ChoiceGeneratorsInterface.USE_DEFAULT_CHOICE; }
;
cmdCallback returns [ClientCommand value]
: TOKEN_CB_STATE_CHANGE { $value = new CmdCallback(CallbackKind.CB_STATE_CHANGE); }
| TOKEN_CB_STATE_CHANGE WS? TOKEN_STATE WS? '=' WS? inspectorState { $value = new CmdCallback($inspectorState.state); }
| TOKEN_CB_GENERIC_ERROR { $value = new CmdCallback(CallbackKind.CB_GENERIC_ERROR); }
| TOKEN_CB_GENERIC_INFO { $value = new CmdCallback(CallbackKind.CB_GENERIC_INFO); }
| TOKEN_CB_BREAKPOINT_HIT { $value = new CmdCallback(CallbackKind.CB_BREAKPOINT_HIT); }
| TOKEN_CB_CG_NEW_CHOICE { $value = new CmdCallback(CallbackKind.CB_CG_NEW_CHOICE); }
| TOKEN_CB_CG_CHOICE_TO_USE { $value = new CmdCallback(CallbackKind.CB_CG_CHOICE_TO_USE); }
| TOKEN_CB_CG_USED_CHOICE { $value = new CmdCallback(CallbackKind.CB_CG_USED_CHOICE); }
;
inspectorState returns [InspectorStatusChange state]
: TOKEN_RUNNING { $state = InspectorStatusChange.JPF_RUNNING; }
| TOKEN_STARTED { $state = InspectorStatusChange.JPF_STARTED; }
| TOKEN_STOPPED { $state = InspectorStatusChange.JPF_STOPPED; }
| TOKEN_TERMINATING { $state = InspectorStatusChange.JPF_TERMINATING; }
;
cmdRecord returns [ClientCommand value]
: TOKEN_RECORD WS TOKEN_CLEAR { $value = new CmdRecordClear(); }
| TOKEN_RECORD WS TOKEN_PRINT { $value = new CmdRecordPrint(); }
| TOKEN_RECORD WS TOKEN_SAVE WS allText { $value = new CmdRecordSave($allText.expr); }
| TOKEN_RECORD WS TOKEN_EXECUTE WS allText { $value = new CmdRecordExecute($allText.expr); }
;
cmdAssertions returns [ClientCommand value]
: TOKEN_ASSERT WS a=allTextNoWS WS b=allText
{ $value = new CmdAssert($a.expr, $b.expr); }
;
// TOKEN_PRINT is defined cmdProgramStateText
signs : SIGN_DOLLAR | SIGN_DOT | SIGN_EQUAL | SIGN_HASH | SIGN_COLON | SIGN_LSBRA | SIGN_RSBRA | SIGN_ASTERISK | SIGN_SLASH | SIGN_BACKSLASH ;
intValue returns [Integer value]
: SIGN_PLUS? INT { $value = Integer.valueOf($INT.text); }
| SIGN_MINUS INT { $value = -Integer.valueOf($INT.text); }
| SIGN_PLUS? HEX { $value = Integer.valueOf(($HEX.text).substring(2), 16); }
| SIGN_MINUS HEX { $value = -Integer.valueOf(($HEX.text).substring(2), 16); }
;
allText returns [String expr]
: anyWord b02=allTextWS? { $expr = $anyWord.text + ($b02.text!=null?$b02.text:""); }
| allNonKeywordsRules b03=allTextWS? { $expr = $allNonKeywordsRules.text + ($b03.text!=null?$b03.text:""); }
;
allTextNoWS returns [String expr]
: anyWord b02=allTextNoWS? { $expr = $anyWord.text + ($b02.text!=null?$b02.text:""); }
| allNonKeywordsRules b03=allTextNoWS? { $expr = $allNonKeywordsRules.text + ($b03.text!=null?$b03.text:""); }
;
allTextWS returns [String expr]
: (a=WS?) allText { $expr = ($a.text!=null?$a.text:"") + $allText.expr; }
;
//Non "IDF" like rules
allNonKeywordsRules
: allNonKeywordsRulesBase
| LESS
| HIGH
| SIGN_PLUS
| SIGN_MINUS
| INT
| HEX
;
allNonKeywordsRulesBase
: signs
| specialChar
;
specialChar : SPECIAL_CHAR ;
// *******************************
// Lexer rules
// *******************************
// (In ANTLR4, all lexer rules must be after all parser rules or a syntax error
// ("expecting ARG_ACTION while matching a rule") will trigger.
// Keywords and commands
TOKEN_ALL : 'all' ;
TOKEN_ASK : 'ask';
TOKEN_ASSERT : 'assert' ;
TOKEN_BOTH : 'both';
TOKEN_BREAK : 'break' ;
TOKEN_BREAKPOINT : 'breakpoint' | 'bp' ;
TOKEN_CHOICE_GENERATORS : 'choice_generators' | 'cg' ;
TOKEN_CHANGE : 'change';
TOKEN_CONTINUE : 'continue' | 'cont' ;
TOKEN_CLEAR : 'clear' ;
TOKEN_CREATE : 'create' | 'cr' ;
TOKEN_DATA : 'data' ;
TOKEN_DELETE : 'delete' | 'del' ;
TOKEN_DISABLE : 'disable' | 'dis' ;
TOKEN_E : 'e' | 'E' ;
TOKEN_ENABLE : 'enable' | 'en' ;
TOKEN_EXECUTE : 'execute' | 'ex' ;
TOKEN_HIT_COUNT : 'hit_count' | 'hc' ;
TOKEN_LOG : 'log' ;
TOKEN_NAME : 'name' ;
TOKEN_PRINT : 'print' ;
TOKEN_PRINT_ATTR : 'print_attr';
TOKEN_RECORD : 'record' | 'rec' ;
TOKEN_RUN : 'run' ;
TOKEN_RUNNING : 'running' ;
TOKEN_SAVE : 'save' ;
TOKEN_SELECT : 'select' | 'sel' ;
TOKEN_SET : 'set' ;
TOKEN_SET_ATTR : 'set_attr' | 'seta';
TOKEN_SCHEDULING : 'scheduling' | 'sched' ;
TOKEN_SHOW : 'show' | 'sw' ;
TOKEN_STARTED : 'started' ;
TOKEN_STATE : 'state' ;
TOKEN_STOPPED : 'stopped' ;
TOKEN_USED : 'used' ;
TOKEN_TERMINATING : 'terminating' ;
TOKEN_THREAD : 'thread' | 'ti' | 't';
TOKEN_THREAD_PC : 'thread_pc' | 'thpc' ;
TOKEN_X : 'x' | 'X' ;
// Stepping-related keywords
TOKEN_STEP_INSTRUCTION : 'step_instruction' | 'sins' ;
TOKEN_STEP_OVER : 'step_over' | 'so' ;
TOKEN_STEP_IN : 'step_in' | 'si' ;
TOKEN_STEP_OUT : 'step_out' | 'sout' ;
TOKEN_STEP_TRANSITION : 'step_transition' | 'st' ;
TOKEN_BACK_STEP_INSTRUCTION : 'back_step_instruction' | 'bsins' ;
TOKEN_BACK_STEP_OVER : 'back_step_over' | 'bso' ;
TOKEN_BACK_STEP_IN : 'back_step_in' | 'bsi' ;
TOKEN_BACK_STEP_OUT : 'back_step_out' | 'bsout' ;
TOKEN_BACK_STEP_TRANSITION : 'back_step_transition' | 'bst' ;
TOKEN_BACK_BREAKPOINT_HIT : 'back_breakpoint_hit' | 'bbhit';
TOKEN_BACK_FIELD_ACCESS : 'back_field_access' | 'bfa';
// Callback-related keywords
TOKEN_CB_STATE_CHANGE : 'callback_state_change' | 'cb_state_changed' ;
TOKEN_CB_GENERIC_ERROR : 'callback_generic_error' | 'cb_gen_error' ;
TOKEN_CB_GENERIC_INFO : 'callback_generic_info' | 'cg_gen_info' ;
TOKEN_CB_BREAKPOINT_HIT : 'callback_breakpoint_hit' | 'cb_bp_hit' ;
TOKEN_CB_CG_NEW_CHOICE : 'callback_choice_generator_new_choice' | 'cb_cg_new_choice' ;
TOKEN_CB_CG_CHOICE_TO_USE : 'callback_choice_generator_choice_to_use' | 'cb_cg_choice_to_use' ;
TOKEN_CB_CG_USED_CHOICE : 'callback_choice_generator_used_choice' | 'cb_cg_used_choice' ;
// New commmands
TOKEN_HELLO : 'hello';
TOKEN_HELP : 'help';
TOKEN_WAIT : 'wait';
TOKEN_FINISH : 'finish';
TOKEN_TERMINATE : 'terminate';
TOKEN_QUIT : 'quit' | 'exit';
// End of keywords.
SIGN_AMPERSAND_AMPERSAND : '&&';
SIGN_EQUAL : '=' ;
SIGN_DOLLAR : '$' ;
SIGN_DOT : '.' ;
SIGN_HASH : '#' ;
SIGN_COLON : ':';
SIGN_LSBRA : '[' ;
SIGN_RSBRA : ']' ;
SIGN_ASTERISK : '*' ;
SIGN_SLASH : '/' ;
SIGN_BACKSLASH : '\\' ;
SIGN_PLUS : '+' ;
SIGN_MINUS : '-' ;
LESS : '<' | '<=' ;
HIGH : '>' | '>=' ;
IDF : ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '0'..'9' | '_')* ;
HEX : '0' TOKEN_X ('0'..'9'|'A'..'F'|'a'..'f')+;
INT : ('0'..'9')+ ;
// Whitespace
WS : (' '|'\n'|'\r'|'\t')+ ;
// Any characters not matched before
SPECIAL_CHAR : . ;
|
source/a-undesu.ads | ytomino/drake | 33 | 15920 | <filename>source/a-undesu.ads
pragma License (Unrestricted);
-- Ada 2012
with System.Storage_Pools.Subpools;
procedure Ada.Unchecked_Deallocate_Subpool (
Subpool : in out System.Storage_Pools.Subpools.Subpool_Handle);
pragma Preelaborate (Ada.Unchecked_Deallocate_Subpool);
pragma Inline (Ada.Unchecked_Deallocate_Subpool);
|
extern/gnat_sdl/gnat_sdl2/src/avx512vbmivlintrin_h.ads | AdaCore/training_material | 15 | 22310 | <reponame>AdaCore/training_material<gh_stars>10-100
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package avx512vbmivlintrin_h is
-- Copyright (C) 2013-2017 Free Software Foundation, Inc.
-- This file is part of GCC.
-- GCC is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3, or (at your option)
-- any later version.
-- GCC is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- Under Section 7 of GPL version 3, you are granted additional
-- permissions described in the GCC Runtime Library Exception, version
-- 3.1, as published by the Free Software Foundation.
-- You should have received a copy of the GNU General Public License and
-- a copy of the GCC Runtime Library Exception along with this program;
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-- <http://www.gnu.org/licenses/>.
-- skipped func _mm256_mask_multishift_epi64_epi8
-- skipped func _mm256_maskz_multishift_epi64_epi8
-- skipped func _mm256_multishift_epi64_epi8
-- skipped func _mm_mask_multishift_epi64_epi8
-- skipped func _mm_maskz_multishift_epi64_epi8
-- skipped func _mm_multishift_epi64_epi8
-- skipped func _mm256_permutexvar_epi8
-- skipped func _mm256_maskz_permutexvar_epi8
-- skipped func _mm256_mask_permutexvar_epi8
-- skipped func _mm_permutexvar_epi8
-- skipped func _mm_maskz_permutexvar_epi8
-- skipped func _mm_mask_permutexvar_epi8
-- skipped func _mm256_permutex2var_epi8
-- idx
-- skipped func _mm256_mask_permutex2var_epi8
-- idx
-- skipped func _mm256_mask2_permutex2var_epi8
-- idx
-- skipped func _mm256_maskz_permutex2var_epi8
-- idx
-- skipped func _mm_permutex2var_epi8
-- idx
-- skipped func _mm_mask_permutex2var_epi8
-- idx
-- skipped func _mm_mask2_permutex2var_epi8
-- idx
-- skipped func _mm_maskz_permutex2var_epi8
-- idx
end avx512vbmivlintrin_h;
|
src/svd/sam_svd-trng.ads | Fabien-Chouteau/samd51-hal | 1 | 8881 | <gh_stars>1-10
pragma Style_Checks (Off);
-- This spec has been automatically generated from ATSAMD51G19A.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package SAM_SVD.TRNG is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Control A
type TRNG_CTRLA_Register is record
-- unspecified
Reserved_0_0 : HAL.Bit := 16#0#;
-- Enable
ENABLE : Boolean := False;
-- unspecified
Reserved_2_5 : HAL.UInt4 := 16#0#;
-- Run in Standby
RUNSTDBY : Boolean := False;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for TRNG_CTRLA_Register use record
Reserved_0_0 at 0 range 0 .. 0;
ENABLE at 0 range 1 .. 1;
Reserved_2_5 at 0 range 2 .. 5;
RUNSTDBY at 0 range 6 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
end record;
-- Event Control
type TRNG_EVCTRL_Register is record
-- Data Ready Event Output
DATARDYEO : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for TRNG_EVCTRL_Register use record
DATARDYEO at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
end record;
-- Interrupt Enable Clear
type TRNG_INTENCLR_Register is record
-- Data Ready Interrupt Enable
DATARDY : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for TRNG_INTENCLR_Register use record
DATARDY at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
end record;
-- Interrupt Enable Set
type TRNG_INTENSET_Register is record
-- Data Ready Interrupt Enable
DATARDY : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for TRNG_INTENSET_Register use record
DATARDY at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
end record;
-- Interrupt Flag Status and Clear
type TRNG_INTFLAG_Register is record
-- Data Ready Interrupt Flag
DATARDY : Boolean := False;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for TRNG_INTFLAG_Register use record
DATARDY at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
end record;
-----------------
-- Peripherals --
-----------------
-- True Random Generator
type TRNG_Peripheral is record
-- Control A
CTRLA : aliased TRNG_CTRLA_Register;
-- Event Control
EVCTRL : aliased TRNG_EVCTRL_Register;
-- Interrupt Enable Clear
INTENCLR : aliased TRNG_INTENCLR_Register;
-- Interrupt Enable Set
INTENSET : aliased TRNG_INTENSET_Register;
-- Interrupt Flag Status and Clear
INTFLAG : aliased TRNG_INTFLAG_Register;
-- Output Data
DATA : aliased HAL.UInt32;
end record
with Volatile;
for TRNG_Peripheral use record
CTRLA at 16#0# range 0 .. 7;
EVCTRL at 16#4# range 0 .. 7;
INTENCLR at 16#8# range 0 .. 7;
INTENSET at 16#9# range 0 .. 7;
INTFLAG at 16#A# range 0 .. 7;
DATA at 16#20# range 0 .. 31;
end record;
-- True Random Generator
TRNG_Periph : aliased TRNG_Peripheral
with Import, Address => TRNG_Base;
end SAM_SVD.TRNG;
|
vp8/common/arm/neon/reconb_neon.asm | mrchapp/libvpx | 1 | 80553 | ;
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
EXPORT |vp8_recon_b_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
; r0 unsigned char *pred_ptr,
; r1 short *diff_ptr,
; r2 unsigned char *dst_ptr,
; r3 int stride
|vp8_recon_b_neon| PROC
mov r12, #16
vld1.u8 {d28}, [r0], r12 ;load 4 data/line from pred_ptr
vld1.16 {q10, q11}, [r1]! ;load data from diff_ptr
vld1.u8 {d29}, [r0], r12
vld1.16 {q11, q12}, [r1]!
vld1.u8 {d30}, [r0], r12
vld1.16 {q12, q13}, [r1]!
vld1.u8 {d31}, [r0], r12
vld1.16 {q13}, [r1]
vmovl.u8 q0, d28 ;modify Pred data from 8 bits to 16 bits
vmovl.u8 q1, d29 ;Pred data in d0, d2, d4, d6
vmovl.u8 q2, d30
vmovl.u8 q3, d31
vadd.s16 d0, d0, d20 ;add Diff data and Pred data together
vadd.s16 d2, d2, d22
vadd.s16 d4, d4, d24
vadd.s16 d6, d6, d26
vqmovun.s16 d0, q0 ;CLAMP() saturation
vqmovun.s16 d1, q1
vqmovun.s16 d2, q2
vqmovun.s16 d3, q3
add r1, r2, r3
vst1.32 {d0[0]}, [r2] ;store result
vst1.32 {d1[0]}, [r1], r3
add r2, r1, r3
vst1.32 {d2[0]}, [r1]
vst1.32 {d3[0]}, [r2], r3
bx lr
ENDP
END
|
tests/inputs/test_structural_hazards/test_CDB_hazard/test.asm | danielstumpp/tomasulo-simulator | 0 | 168423 | <filename>tests/inputs/test_structural_hazards/test_CDB_hazard/test.asm
ld, R10, 4(R0)
addi, R1, R10, 1
addi, R2, R10, 2
addi, R3, R10, 3
addi, R4, R10, 4
addi, R20, R20, 1
addi, R21, R21, 1 |
_build/dispatcher/jmp_ippsRSA_MB_GetBufferSizePublicKey_02197557.asm | zyktrcn/ippcp | 1 | 103652 | extern m7_ippsRSA_MB_GetBufferSizePublicKey:function
extern n8_ippsRSA_MB_GetBufferSizePublicKey:function
extern y8_ippsRSA_MB_GetBufferSizePublicKey:function
extern e9_ippsRSA_MB_GetBufferSizePublicKey:function
extern l9_ippsRSA_MB_GetBufferSizePublicKey:function
extern n0_ippsRSA_MB_GetBufferSizePublicKey:function
extern k0_ippsRSA_MB_GetBufferSizePublicKey:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsRSA_MB_GetBufferSizePublicKey
.Larraddr_ippsRSA_MB_GetBufferSizePublicKey:
dq m7_ippsRSA_MB_GetBufferSizePublicKey
dq n8_ippsRSA_MB_GetBufferSizePublicKey
dq y8_ippsRSA_MB_GetBufferSizePublicKey
dq e9_ippsRSA_MB_GetBufferSizePublicKey
dq l9_ippsRSA_MB_GetBufferSizePublicKey
dq n0_ippsRSA_MB_GetBufferSizePublicKey
dq k0_ippsRSA_MB_GetBufferSizePublicKey
segment .text
global ippsRSA_MB_GetBufferSizePublicKey:function (ippsRSA_MB_GetBufferSizePublicKey.LEndippsRSA_MB_GetBufferSizePublicKey - ippsRSA_MB_GetBufferSizePublicKey)
.Lin_ippsRSA_MB_GetBufferSizePublicKey:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsRSA_MB_GetBufferSizePublicKey:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsRSA_MB_GetBufferSizePublicKey]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsRSA_MB_GetBufferSizePublicKey:
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_13063_1028.asm | ljhsiun2/medusa | 9 | 6855 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r14
push %rax
push %rbx
push %rsi
lea addresses_D_ht+0x18609, %rsi
nop
nop
nop
inc %r11
movups (%rsi), %xmm4
vpextrq $0, %xmm4, %rax
nop
nop
nop
and $15537, %r13
lea addresses_normal_ht+0x4451, %rax
nop
nop
nop
nop
nop
cmp $53, %r11
movb (%rax), %bl
nop
cmp %rbx, %rbx
lea addresses_D_ht+0x12c39, %r10
clflush (%r10)
nop
nop
xor %r11, %r11
movb $0x61, (%r10)
nop
nop
nop
sub $58054, %r11
lea addresses_WT_ht+0x19e09, %rbx
nop
nop
nop
nop
add $41304, %r14
mov $0x6162636465666768, %rax
movq %rax, %xmm7
movups %xmm7, (%rbx)
nop
nop
nop
nop
nop
add %r14, %r14
lea addresses_normal_ht+0x15e7c, %rax
add $63628, %r11
movb $0x61, (%rax)
nop
nop
nop
xor $7522, %rax
lea addresses_WT_ht+0x13c09, %r11
nop
nop
dec %r10
mov (%r11), %eax
nop
inc %r10
lea addresses_UC_ht+0x1c099, %r10
nop
nop
nop
nop
and $38765, %r11
mov (%r10), %r13d
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0x11fb1, %r13
nop
nop
nop
nop
nop
dec %rax
movups (%r13), %xmm1
vpextrq $0, %xmm1, %r10
nop
nop
nop
nop
sub $54549, %rbx
lea addresses_UC_ht+0x48c4, %rsi
nop
nop
xor %r11, %r11
mov $0x6162636465666768, %rbx
movq %rbx, %xmm1
vmovups %ymm1, (%rsi)
nop
and %r13, %r13
pop %rsi
pop %rbx
pop %rax
pop %r14
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_WC+0x73d9, %r11
nop
nop
nop
nop
and $12901, %rax
mov $0x5152535455565758, %r13
movq %r13, %xmm1
movups %xmm1, (%r11)
nop
nop
nop
xor %r11, %r11
// Store
lea addresses_WC+0x6b31, %rdx
nop
nop
nop
nop
inc %rdi
movw $0x5152, (%rdx)
nop
cmp %r13, %r13
// Store
lea addresses_PSE+0x174b9, %r13
clflush (%r13)
nop
nop
nop
and $57378, %r15
mov $0x5152535455565758, %r11
movq %r11, %xmm6
vmovups %ymm6, (%r13)
nop
sub %rdi, %rdi
// Store
lea addresses_WC+0x1b009, %r11
nop
nop
nop
nop
xor $54636, %rcx
mov $0x5152535455565758, %r13
movq %r13, (%r11)
nop
nop
nop
nop
nop
add $58200, %rdx
// Store
mov $0xbf0, %r13
and %rax, %rax
movb $0x51, (%r13)
nop
and $50263, %rdi
// REPMOV
lea addresses_WT+0x1e809, %rsi
lea addresses_normal+0x1d009, %rdi
nop
nop
nop
xor %r11, %r11
mov $70, %rcx
rep movsb
nop
and $59604, %rdx
// Faulty Load
lea addresses_WT+0x1e809, %r15
nop
nop
nop
cmp %r13, %r13
movups (%r15), %xmm0
vpextrq $1, %xmm0, %rdi
lea oracles, %rax
and $0xff, %rdi
shlq $12, %rdi
mov (%rax,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'}
{'src': {'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal'}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 3, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'NT': True, 'AVXalign': True, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'39': 13063}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
src/Categories/Monad/Relative.agda | Trebor-Huang/agda-categories | 279 | 7176 | {-# OPTIONS --without-K --safe #-}
module Categories.Monad.Relative where
open import Level
open import Categories.Category using (Category)
open import Categories.Functor using (Functor; Endofunctor; _∘F_) renaming (id to idF)
import Categories.Morphism.Reasoning as MR
open import Categories.NaturalTransformation renaming (id to idN)
open import Categories.NaturalTransformation.NaturalIsomorphism hiding (_≃_)
open import Categories.NaturalTransformation.Equivalence
open NaturalIsomorphism
private
variable
o ℓ e o′ ℓ′ e′ : Level
C : Category o ℓ e
D : Category o′ ℓ′ e′
record Monad {C : Category o ℓ e} {D : Category o′ ℓ′ e′} (J : Functor C D) : Set (o ⊔ o′ ⊔ ℓ′ ⊔ e′) where
private
module C = Category C
module D = Category D
module J = Functor J
open D using (_⇒_; _∘_; _≈_)
field
F₀ : C.Obj → D.Obj
unit : {c : C.Obj} → J.₀ c ⇒ F₀ c
extend : {x y : C.Obj} → (J.₀ x ⇒ F₀ y) → F₀ x ⇒ F₀ y
identityʳ : {x y : C.Obj} { k : J.₀ x ⇒ F₀ y} → extend k ∘ unit ≈ k
identityˡ : {x : C.Obj} → extend {x} unit ≈ D.id
assoc : {x y z : C.Obj} {k : J.₀ x ⇒ F₀ y} {l : J.₀ y ⇒ F₀ z} → extend (extend l ∘ k) ≈ extend l ∘ extend k
extend-≈ : {x y : C.Obj} {k h : J.₀ x ⇒ F₀ y} → k ≈ h → extend k ≈ extend h
-- From a Relative Monad, we can extract a functor
RMonad⇒Functor : {J : Functor C D} → Monad J → Functor C D
RMonad⇒Functor {C = C} {D = D} {J = J} r = record
{ F₀ = F₀
; F₁ = λ f → extend (unit ∘ J.₁ f)
; identity = identity′
; homomorphism = hom′
; F-resp-≈ = λ f≈g → extend-≈ (∘-resp-≈ʳ (J.F-resp-≈ f≈g))
}
where
open Monad r
module C = Category C
module D = Category D
module J = Functor J
open Category D hiding (identityˡ; identityʳ; assoc)
open HomReasoning
open MR D
identity′ : {c : C.Obj} → extend {c} (unit ∘ J.₁ C.id) ≈ id
identity′ = begin
extend (unit ∘ J.₁ C.id) ≈⟨ extend-≈ (elimʳ J.identity) ⟩
extend unit ≈⟨ identityˡ ⟩
id ∎
hom′ : {X Y Z : C.Obj} {f : X C.⇒ Y} {g : Y C.⇒ Z} →
extend (unit ∘ J.₁ (g C.∘ f)) ≈ extend (unit ∘ J.₁ g) ∘ extend (unit ∘ J.F₁ f)
hom′ {f = f} {g} = begin
extend (unit ∘ J.₁ (g C.∘ f)) ≈⟨ extend-≈ (pushʳ J.homomorphism) ⟩
extend ((unit ∘ J.₁ g) ∘ J.₁ f) ≈⟨ extend-≈ (pushˡ (⟺ identityʳ)) ⟩
extend (extend (unit ∘ J.₁ g) ∘ (unit ∘ J.F₁ f)) ≈⟨ assoc ⟩
extend (unit ∘ J.₁ g) ∘ extend (unit ∘ J.F₁ f) ∎
|
oeis/168/A168930.asm | neoneye/loda-programs | 11 | 90401 | <reponame>neoneye/loda-programs
; A168930: Number of reduced words of length n in Coxeter group on 13 generators S_i with relations (S_i)^2 = (S_i S_j)^22 = I.
; 1,13,156,1872,22464,269568,3234816,38817792,465813504,5589762048,67077144576,804925734912,9659108818944,115909305827328,1390911669927936,16690940039135232,200291280469622784
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
div $3,$2
mul $2,12
lpe
mov $0,$2
div $0,12
|
loaders_patches_etc/overlay_manager_ninja_hamst128.asm | alexanderbazhenoff/zx-spectrum-various | 0 | 246161 | <gh_stars>0
DISPLAY "OVERLAY MANAGER FOR NINJA HAMSTER GAME. 128K MODE"
ORG #FF00
DISP #4900
DI
LD (STEK),SP
LD SP,#4900
LD A,(#6D69)
SRL A
LD HL,TABL
ADD A,L
LD L,A
PUSH IY
PUSH HL
POP IY
LD HL,#E600
LD BC,#A00
CALL MOV_DEP
LD HL,#C4E0
LD DE,#6590
LD BC,#1A9
PUSH BC
LDIR
LD HL,#C6E0
LD DE,#A12C
POP BC
LDIR
LD HL,#C8E0
LD DE,#AF32
LD C,#85
LDIR
LD HL,#C9E0
LD DE,#B3B0
LD BC,#6FF
LDIR
LD HL,#C000
LD BC,#2600
CALL MOV_DEP
LD HL,#F000
LD IX,#FD38
LD BC,#100
CALL MOV
POP IY
LD SP,#3131
STEK EQU $-2
EI
HALT
NOP
NOP
NOP
RET
TABL DB #11+8,#13+8,#14+8,#16+8
MOV_DEP LD IX,#C4E0
PUSH IX
CALL MOV
POP HL
JP #40B9
MOV LD D,(IY)
LD E,#18
PUSH IY
PUSH HL
POP IY
EX DE,HL
MOV_L PUSH BC
LD BC,#7FFD
OUT (C),H
LD A,(IY)
OUT (C),L
LD (IX),A
INC IY
INC IX
POP BC
DEC BC
LD A,B
OR C
JR NZ,MOV_L
POP IY
RET
|
fastmodel-parser/src/main/antlr4/imports/BusinessProcessParser.g4 | alibaba/fast-modeling-language | 9 | 1287 | parser grammar BusinessProcessParser;
bpStatements:
createBpStatement
| renameBp
| setBpComment
| setBpAliasedName
| setBpProperties
| unSetBpProperties
| dropBpStatement
;
createBpStatement
: KW_CREATE replace? KW_PROCESS
ifNotExists?
qualifiedName
alias?
comment?
(KW_WITH setProperties)?
;
renameBp
: KW_ALTER KW_PROCESS qualifiedName alterStatementSuffixRename
;
setBpAliasedName
: KW_ALTER KW_PROCESS qualifiedName setAliasedName
;
setBpComment
: KW_ALTER KW_PROCESS qualifiedName alterStatementSuffixSetComment
;
setBpProperties
: KW_ALTER KW_PROCESS qualifiedName KW_SET setProperties
;
unSetBpProperties
: KW_ALTER KW_PROCESS qualifiedName KW_UNSET unSetProperties
;
dropBpStatement
: KW_DROP KW_PROCESS qualifiedName
; |
programs/oeis/033/A033358.asm | karttu/loda | 1 | 2301 | <reponame>karttu/loda
; A033358: [ 38/n ].
; 38,19,12,9,7,6,5,4,4,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
add $0,1
mov $1,38
div $1,$0
|
common/hal/hal.ads | ekoeppen/STM32_Generic_Ada_Drivers | 1 | 24417 | with STM32GD.GPIO.Pin;
with STM32GD.GPIO.IRQ;
with STM32GD.SPI.Peripheral;
with STM32GD.I2C.Peripheral;
with STM32GD.USART.Peripheral;
package HAL is
generic package Pin renames STM32GD.GPIO.Pin;
generic package Pin_IRQ renames STM32GD.GPIO.IRQ;
generic package SPI renames STM32GD.SPI.Peripheral;
generic package I2C renames STM32GD.I2C.Peripheral;
generic package USART renames STM32GD.USART.Peripheral;
end HAL;
|
libsrc/_DEVELOPMENT/compress/zx0/c/sdcc/dzx0_turbo_callee.asm | ahjelm/z88dk | 640 | 18772 |
; void dzx0_turbo_callee(void *src, void *dst)
SECTION code_clib
SECTION code_compress_zx0
PUBLIC _dzx0_turbo_callee
EXTERN asm_dzx0_turbo
_dzx0_turbo_callee:
pop af
pop hl
pop de
push af
jp asm_dzx0_turbo
|
Light/Implementation/Action.agda | zamfofex/lightlib | 1 | 11956 | {-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Action where
open import Light.Library.Action using (Library ; Dependencies)
open import Light.Level using (++_ ; 0ℓ)
open import Light.Library.Data.Unit using (Unit)
open import Light.Library.Data.Natural using (ℕ)
open import Light.Variable.Sets
open import Light.Variable.Levels
import Light.Package
import Light.Implementation.Data.Natural
import Light.Implementation.Data.Unit
instance dependencies : Dependencies
dependencies = record {}
instance library : Library dependencies
library = record { Implementation }
where
module Implementation where
postulate Main : Set
private
postulate
pure′ : 𝕒 → Main
bind′ : Main → (𝕒 → Main) → Main
follow : Main → Main → Main
{-# COMPILE JS pure′ = () => () => () => a => () => a #-}
{-# COMPILE JS bind′ = () => () => () => m => f => f(m()) #-}
{-# COMPILE JS follow = () => () => m => m2 => () => (m(), m2()) #-}
{-# NO_UNIVERSE_CHECK #-}
data Action (𝕒 : Set ℓ) : Set ℓ where
pure : 𝕒 → Action 𝕒
_>>=_ : Action 𝕓 → (𝕓 → Action 𝕒) → Action 𝕒
_>>_ : Action 𝕓 → Action 𝕒 → Action 𝕒
lift : Main → Action 𝕒
run : Action 𝕒 → Main
run (pure a) = pure′ a
run (a >>= f) = bind′ (run a) (λ a → run (f a))
run (a >> b) = follow (run a) (run b)
run (lift m) = m
private
postulate log′ alert′ : 𝕒 → Main
postulate prompt′ : Main
log : 𝕒 → Action Unit
log a = lift (log′ a)
prompt = lift prompt′
alert : 𝕒 → Action Unit
alert a = lift (alert′ a)
{-# COMPILE JS log′ = () => () => a => () => console.log(a) #-}
{-# COMPILE JS prompt′ = () => () => BigInt(prompt()) #-}
{-# COMPILE JS alert′ = () => () => () => a => alert(a) #-}
|
SOURCE ASM FILES/FPSHack_TEST_Link_SetPushPullKeepData_LowHz.asm | Meowmaritus/Wind-Waker-60FPS-Hack | 14 | 97879 | #To be inserted at 801514b0
###############################################
##FPSHack_TEST_Link_SetPushPullKeepData_LowHz##
###############################################
lis r17, 0x817F
lwz r17, 0x0000 (r17) #Load LowHzUpdate
cmpwi r17, 0
bne- 0x0008
blr
stwu sp, -0x0030 (sp) #Vanilla |
src/main/antlr4/io/github/pastorgl/aqlselectex/AQLSelectEx.g4 | PastorGL/AQLSelectEx | 2 | 3613 | grammar AQLSelectEx;
parse
: ( select_stmt | error ) EOF
;
error
: UNEXPECTED_CHAR
{
throw new RuntimeException("UNEXPECTED_CHAR=" + $UNEXPECTED_CHAR.text);
}
;
select_stmt
: K_SELECT ( STAR | column_name ( COMMA column_name )* )
( K_FROM from_set )?
( (K_USE | K_WITH) index_expr )?
( K_WHERE where_expr )?
;
type_name
: K_DECIMAL | K_INT | K_NUMERIC
| K_FLOAT | K_REAL
| K_JSON
| K_LIST
| K_MAP
| K_GEOJSON
| K_CHAR | K_STRING | K_TEXT | K_VARCHAR
;
where_expr
: ( atomic_expr | OPEN_PAR | CLOSE_PAR | logic_op )+
;
logic_op
: K_NOT | K_AND | K_OR
;
atomic_expr
: column_name ( equality_op | regex_op ) STRING_LITERAL
| ( column_name | meta_name ) ( equality_op | comparison_op ) NUMERIC_LITERAL
| column_name map_op iter_expr
| column_name list_op iter_expr
| column_name geo_op cast_expr
;
equality_op
: EQ | EQ2 | NOT_EQ1 | NOT_EQ2
;
comparison_op
: LT | LT_EQ | GT | GT_EQ
;
map_op
: K_ANY? K_MAPVALUES | K_ANY? K_MAPKEYS
;
iter_expr
: OPEN_PAR var_name equality_op STRING_LITERAL CLOSE_PAR
| OPEN_PAR var_name ( equality_op | comparison_op ) NUMERIC_LITERAL CLOSE_PAR
;
geo_op
: K_CONTAINS | K_WITHIN
;
list_op
: K_ANY? K_CONTAINS
;
regex_op
: K_LIKE | K_MATCH | K_REGEXP
;
index_expr
: index_type? OPEN_PAR (
column_name index_op ( NUMERIC_LITERAL | STRING_LITERAL )
| column_name geo_op cast_expr
| column_name between_expr )
CLOSE_PAR
;
index_op
: EQ | EQ2 | K_CONTAINS
;
between_expr
: K_BETWEEN low=NUMERIC_LITERAL K_AND high=NUMERIC_LITERAL
;
cast_expr
: K_CAST OPEN_PAR STRING_LITERAL K_AS type_name CLOSE_PAR
| type_name OPEN_PAR STRING_LITERAL CLOSE_PAR
;
from_set
: ns_name ( DOT set_name )?
;
index_type
: K_DEFAULT
| K_LIST
| K_MAPKEYS
| K_MAPVALUES
;
column_name
: bin_name
;
meta_name
: K_LUT
| K_RECSIZE
| K_TTL
| K_DIGEST OPEN_PAR NUMERIC_LITERAL CLOSE_PAR
;
ns_name
: IDENTIFIER
;
set_name
: IDENTIFIER
;
bin_name
: K_PK | IDENTIFIER
;
var_name
: IDENTIFIER
;
SCOL : ';';
DOT : '.';
OPEN_PAR : '(';
CLOSE_PAR : ')';
COMMA : ',';
EQ : '=';
STAR : '*';
PLUS : '+';
MINUS : '-';
LT : '<';
LT_EQ : '<=';
GT : '>';
GT_EQ : '>=';
EQ2 : '==';
NOT_EQ1 : '!=';
NOT_EQ2 : '<>';
K_AND : A N D;
K_ANY : A N Y;
K_AS : A S;
K_BETWEEN : B E T W E E N;
K_CAST : C A S T;
K_CHAR : C H A R;
K_CONTAINS : C O N T A I N S;
K_DECIMAL : D E C I M A L;
K_DEFAULT : D E F A U L T;
K_DIGEST : D I G E S T;
K_FLOAT : F L O A T;
K_FROM : F R O M;
K_GEOJSON : G E O J S O N;
K_INT : I N T;
K_JSON : J S O N;
K_LIKE : L I K E;
K_LIST : L I S T;
K_LUT : L U T;
K_MATCH : M A T C H;
K_MAP : M A P;
K_MAPKEYS : M A P K E Y S;
K_MAPVALUES : M A P V A L U E S;
K_NOT : N O T;
K_NUMERIC : N U M E R I C;
K_OR : O R;
K_PK : P K;
K_REAL : R E A L;
K_RECSIZE : R E C S I Z E;
K_REGEXP : R E G E X P;
K_SELECT : S E L E C T;
K_STRING : S T R I N G;
K_TEXT : T E X T;
K_TTL : T T L;
K_USE : U S E;
K_VARCHAR : V A R C H A R;
K_WHERE : W H E R E;
K_WITH : W I T H;
K_WITHIN : W I T H I N;
IDENTIFIER
: '"' (~'"' | '""')* '"'
| [a-zA-Z_] [a-zA-Z_0-9]*
;
UNARY_OPERATOR
: PLUS
| MINUS
;
NUMERIC_LITERAL
: UNARY_OPERATOR? DIGIT+ ( DOT DIGIT* )? ( E UNARY_OPERATOR? DIGIT+ )?
| UNARY_OPERATOR DOT DIGIT+ ( E UNARY_OPERATOR? DIGIT+ )?
;
INTEGER_LITERAL
: UNARY_OPERATOR? DIGIT+ L?
;
APOS
: '\''
;
STRING_LITERAL
: APOS ( ~'\'' | '\'\'' )* APOS
;
SPACES
: [ \u000B\t\r\n] -> channel(HIDDEN)
;
UNEXPECTED_CHAR
: .
;
fragment DIGIT : [0-9];
fragment A : [aA];
fragment B : [bB];
fragment C : [cC];
fragment D : [dD];
fragment E : [eE];
fragment F : [fF];
fragment G : [gG];
fragment H : [hH];
fragment I : [iI];
fragment J : [jJ];
fragment K : [kK];
fragment L : [lL];
fragment M : [mM];
fragment N : [nN];
fragment O : [oO];
fragment P : [pP];
fragment Q : [qQ];
fragment R : [rR];
fragment S : [sS];
fragment T : [tT];
fragment U : [uU];
fragment V : [vV];
fragment W : [wW];
fragment X : [xX];
fragment Y : [yY];
fragment Z : [zZ]; |
libsrc/_DEVELOPMENT/l/sccz80/crt0_long/l_long_aslo.asm | meesokim/z88dk | 0 | 90387 | ; Z88 Small C+ Run Time Library
; Long support functions
;
; djm 25/2/99
; Made work! - Seems a little messed up previously (still untested)
;
; djm 7/5/99
; This version is called when the optimizer has had a look at
; the code
;
; aralbrec 01/2007
; switched to shifts from slower doubling using de/hl
SECTION code_l_sccz80
PUBLIC l_long_aslo
EXTERN l_lsl_dehl
defc l_long_aslo = l_lsl_dehl
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c83027a.ada | best08618/asylo | 7 | 3022 | -- C83027A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT A DECLARATION IN A RECORD DECLARATION HIDES AN OUTER
-- DECLARATION OF A HOMOGRAPH. ALSO CHECK THAT THE OUTER DECLARATION
-- IS DIRECTLY VISIBLE IN BOTH DECLARATIVE REGIONS BEFORE THE
-- DECLARATION OF THE INNER HOMOGRAPH AND THE OUTER DECLARATION IS
-- VISIBLE BY SELECTION AFTER THE INNER HOMOGRAPH DECLARATION.
-- HISTORY:
-- BCB 09/02/88 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE C83027A IS
GENERIC
TYPE T IS PRIVATE;
X : T;
FUNCTION GEN_FUN RETURN T;
FUNCTION GEN_FUN RETURN T IS
BEGIN
RETURN X;
END GEN_FUN;
BEGIN
TEST ("C83027A", "CHECK THAT A DECLARATION IN A RECORD " &
"DECLARATION HIDES AN OUTER DECLARATION OF " &
"A HOMOGRAPH");
ONE:
DECLARE
A : INTEGER := IDENT_INT(2);
OBJ : INTEGER := IDENT_INT(3);
TYPE INNER2 (A : INTEGER := IDENT_INT(3)) IS RECORD
C : INTEGER := ONE.A;
D : INTEGER := A;
END RECORD;
E : INTEGER := A;
RECVAR : INNER2;
BEGIN -- ONE
IF A /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 1");
END IF;
IF RECVAR.A /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 2");
END IF;
IF E /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 3");
END IF;
IF RECVAR.C /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 4");
END IF;
IF RECVAR.D /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 5");
END IF;
IF EQUAL(1,1) THEN
OBJ := RECVAR.A;
ELSE
OBJ := 1;
END IF;
IF OBJ /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE PASSED OUT - 6");
END IF;
END ONE;
TWO:
DECLARE
GENERIC
A : INTEGER := IDENT_INT(2);
B : INTEGER := A;
PACKAGE P IS
TYPE INNER (C : INTEGER := A;
A : INTEGER := IDENT_INT(3)) IS RECORD
D : INTEGER := A;
END RECORD;
END P;
PACKAGE BODY P IS
RECVAR : INNER;
BEGIN
IF RECVAR.A /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 10");
END IF;
IF A /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 11");
END IF;
IF B /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 12");
END IF;
IF RECVAR.C /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 13");
END IF;
IF RECVAR.D /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 14");
END IF;
END P;
PACKAGE PACK IS NEW P;
BEGIN -- TWO
NULL;
END TWO;
THREE:
DECLARE
A : INTEGER := IDENT_INT(2);
OBJ : INTEGER := IDENT_INT(3);
TYPE INNER4 (C : INTEGER := A;
A : INTEGER := IDENT_INT(3);
X : INTEGER := THREE.A) IS RECORD
D : INTEGER := A;
END RECORD;
RECVAR : INNER4;
BEGIN -- THREE
IF A /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 20");
END IF;
IF RECVAR.A /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 21");
END IF;
IF RECVAR.C /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 22");
END IF;
IF RECVAR.D /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 23");
END IF;
IF RECVAR.X /= IDENT_INT(2) THEN
FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 24");
END IF;
IF EQUAL(1,1) THEN
OBJ := RECVAR.A;
ELSE
OBJ := 1;
END IF;
IF OBJ /= IDENT_INT(3) THEN
FAILED ("INCORRECT VALUE PASSED OUT - 25");
END IF;
END THREE;
RESULT;
END C83027A;
|
1-base/lace/applet/demo/event/distributed/launch_simple_chat_registrar.adb | charlie5/lace | 20 | 14085 | <filename>1-base/lace/applet/demo/event/distributed/launch_simple_chat_registrar.adb
with
chat.Registrar,
ada.Exceptions,
ada.Characters.latin_1,
ada.Text_IO;
procedure launch_simple_chat_Registrar
--
-- Launches the chat registrar.
--
is
use ada.Text_IO;
begin
loop
declare
Command : constant String := get_Line;
begin
exit when Command = "q";
end;
end loop;
put_Line ("Shutting down.");
chat.Registrar.shutdown;
exception
when E : others =>
new_Line;
put_Line ("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
put_Line ("Unhandled exception, aborting. Please report the following to developer.");
put_Line ("________________________________________________________________________");
put_Line (ada.Exceptions.exception_Information (E));
put (ada.Characters.latin_1.ESC & "[1A"); -- Move cursor up.
put_Line ("________________________________________________________________________");
new_Line;
end launch_simple_chat_Registrar;
|
Examples/template_p81.asm | sparks-c16/zasm | 43 | 175442 | ; ================================================================
; Example source with target 'p' or '81'
; ZX81 tape file / snapshot
; Copyright (c) <NAME> 1994 - 2017
; mailto:<EMAIL>
; ================================================================
; #target p / #target 81
;
; "p" and "81" files are the same and used when saving ZX81 programs.
; The file consist of the raw ram data as saved by the ZX81 tape saving routine WITHOUT the filename.
; The file can only store one program, not a whole tape with multiple programs.
; The data is save from and loaded back to address $4009++.
;
; #target p81
;
; ".p81" files consist of the raw data as saved by the ZX81 tape saving routine INCLUDING the filename.
; This format can store multiple programs.
; "p81" files are like "p" and "81" files preceded with the program's name.
; The file start with the 1..127 bytes filename, last byte ORed with $80,
; which is exactly what is actually saved by the ZX81 tape saving routine.
;
; --------------------------------------------------------------------
; A ZX81 program is stored like this on a real audio tape:
;
; x seconds video noise
; 5 seconds silence
; 1-127 bytes filename (bit 7 set in last char)
; LEN bytes data, loaded to address $4009, LEN = ($4014)-$4009.
; 1 pulse video retrace signal if display was enabled
; x seconds silence / video noise
;
; --------------------------------------------------------------------
; Notes:
; The data contains system area, basic program, video memory, VARS.
; the last byte of a (clean) file should be $80 (the last byte of VARS)
;
; $4014 defines the end address (used to calculate the file length)
; $4029 points to the next executed (autostarted) BASIC line
; $403B indicates if program runs in SLOW or FAST mode (bit 6)
; $403C++ may be misused for whatever purpose,
; video memory must contain 25 HALT opcodes if the file was saved in SLOW mode.
;
; While loading, the data at address $4014/4015 (E_LINE) is overwritten. After this they contain
; the real data end address of the data loaded and define when loading will stop. :-)
;
; Files should usually not exceed 16 kBytes.
; The memory detection procedure in both ZX80 and ZX81 stops after 16 kBytes (at $8000)
;
;
; ---------------------------------------------------------------
; Character Set
; ---------------------------------------------------------------
;
; $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C $0D $0E $0F
; spc gra gra gra gra gra gra gra gra gra gra " £ $ : ?
;
; $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $1A $1B $1C $1D $1E $1F
; ( ) > < = + - * / ; , . 0 1 2 3
;
; $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $2A $2B $2C $2D $2E $2F
; 4 5 6 7 8 9 A B C D E F G H I J
;
; $30 $31 $32 $33 $34 $35 $36 $37 $38 $39 $3A $3B $3C $3D $3E $3F
; K L M N O P Q R S T U V W X Y Z
;
;
; ---------------------------------------------------------------
; Memory Map
; ---------------------------------------------------------------
;
; 16509 - (D_FILE) Basic Program
; (D_FILE) - (VARS) Display File (Screen)
; (VARS) - (E_LINE) Basic Variables; last byte at (E_LINE)-1 = $80
; (E_LINE) - (STKBOT) Line being typed and work space
; (STKBOT) - (STKEND) Calculator Stack
; (STKEND) - (ERR_SP) Spare space and Z80 Machine Stack (sp)
; (ERR_SP) - (RAMTOP) Gosub Stack
; (RAMTOP) End of memory (address of last byte (incl.))
;
; value of RAMTOP:
; $43FF = 17407 For 1k internal ram (ZX81)
; $47FF = 18431 For 2k internal ram (TS1000)
; $7fff = 32767 for 16k Ram Pack
; $bfff = 49151 for 32k Ram Pack
; $ffff = 65535 for 64k Ram Pack
;#target p
;#target 81
#target p81
#charset ZX81
; only if target p81:
#if target(p81)
#code _PROGNAME
dm "PROGNAME" | $80 ; this will be translated by zasm into the ZX81 character set!
#endif
; ---------------------------------------------------------------
; THE SYSTEM VARIABLES
; Source: ZX81 BASIC Programming by <NAME>, (c) Sinclair Research Limited
; ---------------------------------------------------------------
;
; SYSVARS $4000 - $4008 which are not saved to tape by the ZX81:
#data SYSVARS_NOT_SAVED, $4000, 9
ERR_NR: db 0 ; 4000 1 less than the report code. Starts off at 255 (for -1), so PEEK 16384, if it works at all, gives 255.
; POKE 16384,n can be used to force an error halt: 0 … 14 gives one of the usual reports,
; 15 … 34 or 99 … 127 gives a nonstandard report, and 35 … 98 is likely to mess up the display file.
FLAGS: db 0 ; 4001 X Various flags to control the BASIC system.
ERR_SP: dw 0 ; 4002 X Address of first item on machine stack (after GOSUB returns).
RAMTOP: dw 0 ; 4004 Address of first byte above BASIC system area. You can poke this to make NEW reserve space above
; that area (see Chapter 26) or to fool CLS into setting up a minimal display file.
; Poking RAMTOP has no effect until one of these two is executed.
MODE: db 0 ; 4006 N Specifies K, L, F or G cursor.
PPC: dw 0 ; 4007 N Line number of statement currently being executed.
; Poking this has no lasting effect except in the last line of the program.
; SYSVARS $4009 - $403B which are saved in the tape file:
#code SYSVARS, $4009, $407D-$4009
VERSN: db 0 ; 4009 0 identifies 8K ZX81 Basic in saved programs.
E_PPC: dw 0 ; 400A Number of current line (with program cursor).
D_FILE: dw _DFILE ; 400C X Address of Display File (screen data) in memory.
DF_CC: dw 0 ; 400E Address of PRINT position in display file. Can be poked so that PRINT output is sent elsewhere.
VARS: dw _VARS ; 4010 X Address of user program variables in memory.
DEST: dw 0 ; 4012 N Address of variable in assignment.
E_LINE: dw _E_LINE ; 4014 X Address of line being edited in memory.
CH_ADD: dw 0 ; 4016 X Address of the next character to be interpreted: the character after the argument of PEEK,
; or the ENTER/NEWLINE at the end of a POKE statement.
X_PTR: dw 0 ; 4018 Address of the character preceding the [S] marker.
STKBOT: dw 0 ; 401A X Address of the Calculator stack in memory. This is where Basic does the math calculations.
STKEND: dw 0 ; 401C X End of the Calculator stack.
BREG: db 0 ; 401E N Calculator’s b register.
MEM: dw 0 ; 401F N Address of area used for calculator’s memory. (Usually MEMBOT but not always.)
db 0 ; 4021 not used
DF_SZ: db 0 ; 4022 X The number of lines (including one blank line) in the lower part of the screen.
S_TOP: dw 0 ; 4023 The number of the top program line in automatic listings.
LAST_K: dw 0 ; 4025 N Shows which keys pressed
db 0 ; 4027 N Debounce status of keyboard.
MARGIN: db 0 ; 4028 N Number of blank lines above or below picture: 55 in Britain (50Hz), 31 in America (60Hz).
NXTLIN: dw 0 ; 4029 X Address of next program line to be executed.
OLDPPC: dw 0 ; 402B Line number to which CONT jumps.
FLAGX: db 0 ; 402D N Various flags.
STRLEN: dw 0 ; 402E N Length of string type designation in assignment.
T_ADDR: dw 0 ; 4030 N Address of next item in syntax table.
SEED: dw 0 ; 4032 The seed for RND. This is the variable that is set by RAND.
FRAMES: dw $8000 ; 4034 Counts the frames displayed on the television. Bit 15 is 1. Bits 0 to 14 are decremented for each frame
; sent to the television. This can be used for timing, but PAUSE also uses it. PAUSE resets bit 15 to 0 and
; puts in bits 0 to 14 the length of the pause. When these have been counted down to zero, the pause stops.
; If the pause stops because of a key depression, bit 15 is set to 1 again.
COORDS: db 0 ; 4036 x-coordinate of last pointed PLOTted.
db 0 ; 4037 y-coordinate of last pointed PLOTted.
PR_CC: db 0 ; 4038 Less significant byte of address of next position for LPRINT to print at (in PRBUFF).
S_POSN: db 0 ; 4039 X Column number for PRINT position.
db 0 ; 403A X Line number for PRINT position.
CDFLAG: db $80 ; 403B Various flags. Bit 7 is set during compute and display (SLOW) mode.
PRBUFF: ds 33 ; 403C Printer buffer (33rd character is ENTER/NEWLINE).
MEMBOT: ds 30 ; 405D N Calculator’s memory area; used to store numbers that cannot conveniently be put on the calculator stack.
dw 0 ; 407B not used
; X = The variable should not be poked because the system might crash.
; N = Poking the variable will have no lasting effect.
#assert $ == $407D
; --------------------------------------
; BASIC code and variables, Machine code
; --------------------------------------
#code _BASIC
; add code for Basic starter here
; add basic program and/or machine code here
; The machine code must be hidden somehow in the basic program or in the variables
#code _DFILE
; if saved in slow mode (CDFLAG bit 7 set) the display file must contain valid data
#if 0
; collapsed dfile:
ds 25, opcode(halt)
#else
; inflated dfile:
db opcode(halt)
rept 24
ds 32,' ' ; note: or use $00: ' ' is charset translated to $00 by zasm
db opcode(halt)
endm
#endif
#code _VARS
; add basic variables and/or machine code here
; if less than 16k are installed then the variables will be moved up and down
; as text is printed to the screen!
db $80 ; end-of-variables indicator
_E_LINE:
; unsaved areas:
; (E_LINE) - (STKBOT) Line being typed and work space
; (STKBOT) - (STKEND) Calculator Stack
; (STKEND) - (ERR_SP) Spare space and Z80 Machine Stack (sp)
; (ERR_SP) - (RAMTOP) Gosub Stack
; (RAMTOP) End of memory (address of last byte (incl.))
#end
|
oeis/152/A152624.asm | neoneye/loda-programs | 11 | 96972 | ; A152624: Decimal expansion of 7/2.
; Submitted by <NAME>
; 3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mul $0,2
min $0,4
add $0,10
mod $0,7
|
oeis/142/A142999.asm | neoneye/loda-programs | 11 | 160434 | <reponame>neoneye/loda-programs
; A142999: a(0) = 0, a(1) = 1; for n>1, a(n+1) = (2*n+1)*a(n) + n^4*a(n-1).
; Submitted by <NAME>
; 0,1,3,31,460,12076,420336,21114864,1325949696,109027627776,10771080883200,1316468976307200,187978181665996800,31997755234356019200,6232784237890147123200,1409976507981835100160000,359243973790625586216960000,104259271562188189469245440000,33653490439643426217850306560000,12189900437779074147783970652160000,4861162644658154839900044656640000000,2149691738475636212081337135267840000000,1037840517050214968538098081684520960000000,550281011155608310081540125635106570240000000
mov $2,1
lpb $0
mov $1,$0
sub $0,1
pow $1,2
mul $3,$1
div $3,-1
add $3,$2
mul $2,$1
lpe
mov $0,$3
|
programs/oeis/152/A152621.asm | jmorken/loda | 1 | 100541 | ; A152621: a(n)=8*a(n-1)-6*a(n-2), n>1 ; a(0)=1, a(1)=2.
; 1,2,10,68,484,3464,24808,177680,1272592,9114656,65281696,467565632,3348834880,23985285248,171789272704,1230402470144,8812484124928,63117458178560,452064760678912,3237813336359936,23190118126806016
mov $2,$0
lpb $2
sub $2,1
mul $3,6
add $3,$1
add $3,6
add $1,$3
lpe
div $1,6
add $1,1
|
scripts/route15gate.asm | adhi-thirumala/EvoYellow | 16 | 87361 | Route15GateScript:
jp EnableAutoTextBoxDrawing
Route15GateTextPointers:
dw Route15GateText1
Route15GateText1:
TX_FAR _Route15GateText1
db "@"
|
src/main/java/net/aeronica/libs/mml/core/MML.g4 | Aeronica/fourteen | 0 | 5396 | /** This is one possible grammar for Mabinogi's MML implementation.
* I'm unsure if the Listener or Visitor pattern will be more useful
* at this time. I'll try each and see how those patterns fit my needs.
*
* antlr4 -encoding US-ASCII MML.g4
*/
grammar MML;
@header {
package net.aeronica.libs.mml.core;
}
// Parser rules
band : (inst)+ EOF; // support appended MML files
inst : begin // treat each as a separate instrument
( rest
| anote
| tied
| octave
| part
| cmd
| len
)* end
;
test : begin* (mono|part)+ end* EOF; // parse testing: ignore MML@ and ; tokens
mono :
( rest
| anote
| tied
| octave
| cmd
| len
| begin // for ArcheAge we'll allow silly things
| end // for ArcheAge we'll allow silly things
)+
;
rest : REST // Possible rest formats
| REST INT
| REST DOT+
| REST INT DOT+
| REST ACC // for ArcheAge we'll allow silly things
| REST ACC INT // for ArcheAge we'll allow silly things
| REST ACC DOT+ // for ArcheAge we'll allow silly things
| REST ACC INT DOT+ // for ArcheAge we'll allow silly things
;
note : NOTE // possible note formats
| NOTE ACC
| NOTE INT
| NOTE DOT+
| NOTE INT DOT+
| NOTE ACC INT
| NOTE ACC DOT+
| NOTE ACC INT DOT+
;
midi : MIDI INT // match MIDI note
| MIDI {notifyErrorListeners("midi note missing value");}
;
anote : (note|midi) ;
tied : anote ((cmd|len|octave|rest|begin|part|end)* TIE (TIE|cmd|len|octave|rest|begin|part|end)* anote)+ // match tied note
;
octave : OCTAVE ;
cmd : CMD INT
| CMD {notifyErrorListeners("[Octave|Perform|Sustain|Tempo|Volume] missing value");}
;
len : LEN INT
| LEN INT DOT+
| LEN {notifyErrorListeners("length missing value");}
;
begin : BEGIN ;
part : PART ;
end : END ;
// Lexer rules
CMD : [iopstvIOPSTV] ; // MML commands Instrument, Octave, Perform, Sustain, Tempo, Volume
LEN : [lL] ; // MML Length command
OCTAVE : [<>] ; // Octave down/up
NOTE : [a-gA-G] ; // Notes
ACC : [+#-] ; // Accidental
MIDI : [nN] ; // MIDI note
DOT : '.' ; // dotted
TIE : '&' ; // Tie
REST : [rR] ; // Rests
INT : [0-9]+ ; // match integers
BEGIN : 'MML@' ; // MML File Begin
PART : ',' ; // Part separator
END : ';' ; // MML File End
WS : [ \t\r\n]+ -> skip ; // toss out whitespace
JUNK : [\u0000-~] -> skip ; // anything leftover |
programs/oeis/120/A120201.asm | karttu/loda | 0 | 97908 | ; A120201: a(1)=8; a(n)=floor((71+sum(a(1) to a(n-1)))/8).
; 8,9,11,12,13,15,17,19,21,24,27,30,34,38,43,49,55,62,69,78,88,99,111,125,141,158,178,200,225,253,285,321,361,406,457,514,578,650,731,823,926,1041,1172,1318,1483,1668,1877,2111,2375,2672,3006,3382,3805,4280,4815,5417,6094,6856,7713,8677,9762,10982,12355,13899,15636,17591,19790,22264,25047,28177,31700,35662,40120,45135,50777,57124,64264,72297,81334,91501,102939,115806,130282,146567,164888,185499,208686,234772,264119,297134,334275,376060,423067,475951,535444,602375,677672,762381,857678,964888,1085499,1221187,1373835,1545564,1738760,1956105,2200618,2475695,2785157,3133302,3524964,3965585,4461283,5018943,5646311,6352100,7146113,8039377,9044299,10174836,11446691,12877527,14487218,16298120,18335385,20627308,23205722,26106437,29369742,33040960,37171080,41817465,47044648,52925229,59540882,66983493,75356429,84775983,95372981,107294603,120706429,135794732,152769074,171865208,193348359,217516904,244706517,275294832,309706686,348420021,391972524,440969089,496090226,558101504,627864192,706347216,794640618,893970695,1005717032,1131431661,1272860619,1431968196,1610964220,1812334748,2038876591,2293736165,2580453186,2903009834,3265886063,3674121821,4133387049,4650060430,5231317984,5885232732,6620886823,7448497676,8379559886,9427004871,10605380480,11931053040,13422434670,15100239004,16987768880,19111239990,21500144988,24187663112,27211121001,30612511126,34439075017,38743959394,43586954318,49035323608,55164739059,62060331441,69817872871,78545106980,88363245353,99408651022,111834732400,125814073950,141540833193,159233437342,179137617010,201529819136,226721046528,255061177344,286943824512,322811802576,363163277898,408558687636,459628523590,517082089039,581717350169,654432018940,736236021307,828265523971,931798714467,1048273553776,1179307747998,1326721216497,1492561368559,1679131539629,1889022982083,2125150854843,2390794711699,2689644050661,3025849556994,3404080751618,3829590845570,4308289701266,4846825913925,5452679153165,6134264047311,6901047053225,7763677934878,8734137676738,9825904886330,11054142997121,12435910871761,13990399730731,15739199697073,17706599659207,19919924616608,22409915193684,25211154592894,28362548917006,31907867531632,35896350973086,40383394844722,45431319200312
mov $24,$0
mov $26,$0
add $26,1
lpb $26,1
mov $0,$24
sub $26,1
sub $0,$26
mov $20,$0
mov $22,2
lpb $22,1
mov $0,$20
sub $22,1
add $0,$22
sub $0,1
mov $16,$0
mov $18,2
lpb $18,1
clr $0,16
mov $0,$16
sub $18,1
add $0,$18
add $0,1
lpb $0,1
add $1,7
mov $2,$0
sub $0,1
mov $3,$2
lpb $3,1
trn $0,1
add $0,1
mov $4,$1
div $1,8
add $1,$4
add $1,1
mov $3,$4
trn $3,$1
lpe
mov $2,$1
lpe
mul $2,3
lpb $1,1
mov $1,$3
mov $4,$2
lpe
mov $1,$4
mov $19,$18
lpb $19,1
mov $17,$1
sub $19,1
lpe
lpe
lpb $16,1
mov $16,0
sub $17,$1
lpe
mov $1,$17
mov $23,$22
lpb $23,1
mov $21,$1
sub $23,1
lpe
lpe
lpb $20,1
mov $20,0
sub $21,$1
lpe
mov $1,$21
sub $1,3
div $1,3
add $1,1
add $25,$1
lpe
mov $1,$25
|
programs/oeis/278/A278417.asm | neoneye/loda | 22 | 84947 | ; A278417: a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.
; 0,2,14,78,388,1810,8106,35294,150536,632034,2620870,10759342,43804812,177105266,711809378,2846259390,11330543632,44929049794,177540878718,699402223118,2747583822740,10766828545746,42095796462874,164244726238366,639620518118424,2486558615814050,9651161613824822,37403957244654702,144763597316784796,559560282425278258,2160318004043512530,8331163769982715262,32095304749163937824,123524473883545449858,474969297739230927598,1824745126233358110670,7004614136879907849636,26867730730869118775954,102981783095242242871946,394447279575099709694814,1509843372596510348221480,5775682482451356835464802,22080875606379223850418342,84369019868106350841057326,322192014517039121756425388,1229765080878981092880253170,4691535669063616134304408642,17889680992955476025801057854,68185734533013527410214707248,259774138662539598798853632578,989275799980653489079068384350,3765868099190667877509098288526,14329987768640883479630169743284,54508708624877734355711282195026,207267558157030661743340920104954,787857744058382475503456540986910,2993785586870888884013575853823032,11372477058547594072637405171464482,43187270299014781811139187410691606,163956002289170289778245356488769518,622263183812606109322543144035600060
mov $1,$0
lpb $1
sub $1,1
add $2,$0
add $0,$2
add $2,$0
lpe
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c48009a.ada | best08618/asylo | 7 | 10730 | -- C48009A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- FOR ALLOCATORS OF THE FORM "NEW T'(X)", CHECK THAT CONSTRAINT_ERROR
-- IS RAISED IF T IS A SCALAR SUBTYPE AND X IS OUTSIDE THE RANGE OF T,
-- OR IS WITHIN T'S RANGE AND OUTSIDE OF THE RANGE OF VALUES PERMITTED
-- FOR OBJECTS DESIGNATED BY VALUES OF THE ALLOCATOR'S BASE TYPE.
-- RM 01/08/80
-- NL 10/13/81
-- SPS 10/26/82
-- JBG 03/02/83
-- EG 07/05/84
-- EDS 12/01/97 ADDED IDENT_INT TO MAKE EXPRESSION NON-STATIC.
WITH REPORT;
PROCEDURE C48009A IS
USE REPORT;
BEGIN
TEST( "C48009A" , "FOR ALLOCATORS OF THE FORM 'NEW T'(X)', CHECK" &
" THAT CONSTRAINT_ERROR IS RAISED WHEN" &
" APPROPRIATE - SCALAR TYPES");
DECLARE -- A1
SUBTYPE TA IS INTEGER RANGE 1..7;
TYPE ATA IS ACCESS TA;
VA : ATA;
BEGIN
VA := NEW TA'( IDENT_INT(0) );
FAILED ("NO EXCEPTION RAISED - 1");
EXCEPTION
WHEN CONSTRAINT_ERROR => NULL;
WHEN OTHERS => FAILED ( "WRONG EXCEPTION RAISED - 1" );
END; -- A1
DECLARE -- A2
SUBTYPE T1_7 IS INTEGER RANGE 1..7;
TYPE AT2_6 IS ACCESS INTEGER RANGE 2..6;
VAT2_6 : AT2_6;
BEGIN
BEGIN
VAT2_6 := NEW T1_7'(1);
FAILED ("NO EXCEPTION RAISED - 2");
EXCEPTION
WHEN CONSTRAINT_ERROR => NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 2");
END;
BEGIN
VAT2_6 := NEW T1_7'(7);
FAILED ("NO EXCEPTION RAISED - 3");
EXCEPTION
WHEN CONSTRAINT_ERROR => NULL;
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED - 3");
END;
END; -- A2
RESULT;
END C48009A;
|
libsrc/math/zxmath/log10.asm | andydansby/z88dk-mk2 | 1 | 84247 | <filename>libsrc/math/zxmath/log10.asm
;
;
; ZX Maths Routines
;
; 10/12/02 - <NAME>
;
; $Id: log10.asm,v 1.2 2009/06/22 21:44:17 dom Exp $
;
;double log10(double) -- 1/ln(10)
;Number in FA..
IF FORzx
INCLUDE "zxfp.def"
ELSE
INCLUDE "81fp.def"
ENDIF
XLIB log10
LIB fsetup1
LIB stkequ
.log10
call fsetup1
defb ZXFP_STK_TEN
defb ZXFP_LN
defb ZXFP_STK_ONE
defb ZXFP_DIVISION
defb ZXFP_END_CALC
jp stkequ
|
syntax/corelang/CoreTerminals.g4 | npillmayer/gotype | 5 | 615 | /*
----------------------------------------------------------------------
BSD License
Copyright (c) 2017, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Norbert Pillmayer nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
This is a sub-grammar defining the lexical tokens of the core
expression language grammar.
*/
lexer grammar CoreTerminals;
ASSIGN : ':=' ;
EQUALS : '=' ;
COLON : ':' ;
SEMIC : ';' ;
COMMA : ',' ;
LPAREN : '(' ;
RPAREN : ')' ;
LBRACKET : '[' ;
RBRACKET : ']' ;
PLUS : '+' ;
MINUS : '-' ;
TIMES : '*' ;
OVER : '/' ;
PARALLEL : '||' ;
PERPENDIC : '|-' ;
CONGRUENT : '~' ;
PATHJOIN : ('--' | '..' | '&' ) ;
UNIT : ( 'bp' | 'mm' | 'cm' | 'in' | 'pt' | 'pc' ) ;
LAMBDAARG : '@' ;
BEGINGROUP : 'begingroup' ;
ENDGROUP : 'endgroup' ;
LOCAL : 'local' ;
VARDEF : 'vardef' ;
TYPE : 'numeric' | 'pair' | 'path' | 'transform' ;
PAIRPART : 'xpart' | 'ypart' ;
EDGECONSTR : 'top' | 'left' | 'right' | 'bottom' ;
EDGE : 'edge' ;
FRAME : 'frame' ;
BOX : 'box' ;
MATHFUNC : ( 'distance' | 'length' | 'floor' | 'ceil' | 'sqrt' | 'dir') | LUAFUNC ;
SUBPATH : 'subpath' ;
REVERSE : 'reverse' ;
WITH : 'with' ;
POINT : 'point' ;
OF : 'of' ;
TO : 'to' ;
TRANSFORM : 'scaled' | 'shifted' | 'rotated' | 'transformed' ;
CYCLE : 'cycle' ;
PATHCLIPOP : 'union' | 'intersection' | 'difference' ;
PROOF : 'proof' ;
SAVE : 'save' ;
SHOW : 'show' ;
LET : 'let' ;
fragment
LUAFUNC : '@' [a-zA-Z]+ ;
TAG : [a-zA-Z]+ ;
MIXEDTAG : '.'? [a-zA-Z] [.a-zA-Z0-9]* ;
DECIMALTOKEN : '0'..'9'+ ( DOT '0'..'9'+ )? '%'? ;
DOT : '.' ;
LABEL : '"' [a-zA-Z][a-zA-Z0-9 \-_]+ '"' ;
fragment
LINECOMMENT
: '//' .*? '\r'? '\n' // line comment
;
WS
: ( [ \r\n\t]+ | LINECOMMENT ) -> skip
;
|
unittests/ASM/TwoByte/0F_C2.asm | cobalt2727/FEX | 628 | 7133 | <reponame>cobalt2727/FEX
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xFFFFFFFFFFFFFFFF", "0x0"],
"XMM1": ["0x0", "0xFFFFFFFF00000000"],
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFF00000000"],
"XMM3": ["0xFFFFFFFF00000000", "0xFFFFFFFFFFFFFFFF"],
"XMM4": ["0x0", "0xFFFFFFFFFFFFFFFF"],
"XMM5": ["0xFFFFFFFFFFFFFFFF", "0x00000000FFFFFFFF"],
"XMM6": ["0x0000000000000000", "0x00000000FFFFFFFF"],
"XMM7": ["0x00000000FFFFFFFF", "0x0000000000000000"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x3f80000040000000
mov [rdx + 8 * 0], rax
mov rax, 0x4000000040800000
mov [rdx + 8 * 1], rax
mov rax, 0x3f80000040000000
mov [rdx + 8 * 2], rax
mov rax, 0x40a000003f800000
mov [rdx + 8 * 3], rax
movapd xmm0, [rdx + 8 * 0]
movapd xmm1, [rdx + 8 * 0]
movapd xmm2, [rdx + 8 * 0]
movapd xmm3, [rdx + 8 * 0]
movapd xmm4, [rdx + 8 * 0]
movapd xmm5, [rdx + 8 * 0]
movapd xmm6, [rdx + 8 * 0]
movapd xmm7, [rdx + 8 * 0]
movapd xmm8, [rdx + 8 * 2]
cmpps xmm0, xmm8, 0x00 ; EQ
cmpps xmm1, xmm8, 0x01 ; LT
cmpps xmm2, xmm8, 0x02 ; LTE
cmpps xmm4, xmm8, 0x04 ; NEQ
cmpps xmm5, xmm8, 0x05 ; NLT
cmpps xmm6, xmm8, 0x06 ; NLTE
; Unordered and Ordered tests need to be special cased
mov rax, 0x0000000000000000
mov [rdx + 8 * 0], rax
mov rax, 0x7FC000007FC00000
mov [rdx + 8 * 1], rax
mov rax, 0x7FC0000000000000
mov [rdx + 8 * 2], rax
mov rax, 0x7FC0000000000000
mov [rdx + 8 * 3], rax
movapd xmm3, [rdx + 8 * 0]
movapd xmm7, [rdx + 8 * 0]
movapd xmm8, [rdx + 8 * 2]
; Unordered will return true when either input is nan
; [0.0, 0.0, nan, nan] unord [0.0, nan, 0.0, nan] = [0, 1, 1, 1]
cmpps xmm3, xmm8, 0x03 ; Unordered
; Ordered will return true when both inputs are NOT nan
; [0.0, 0.0, nan, nan] ord [0.0, nan, 0.0, nan] = [1, 0, 0, 0]
cmpps xmm7, xmm8, 0x07 ; Ordered
hlt
hlt
|
java-api/src/main/antlr4/it/cnr/istc/oratio/riddle/riddle.g4 | pstlab/oRatio | 6 | 2985 | grammar riddle;
compilation_unit: (
type_declaration
| method_declaration
| predicate_declaration
| statement
)* EOF;
type_declaration:
typedef_declaration
| enum_declaration
| class_declaration;
typedef_declaration:
'typedef' primitive_type expr name = ID ';';
enum_declaration:
'enum' name = ID enum_constants ('|' enum_constants)* ';';
enum_constants:
'{' StringLiteral (',' StringLiteral)* '}'
| type;
class_declaration:
'class' name = ID (':' type_list)? '{' member* '}';
member:
field_declaration
| method_declaration
| constructor_declaration
| predicate_declaration
| type_declaration;
field_declaration: type variable_dec (',' variable_dec)* ';';
variable_dec: name = ID ('=' expr)?;
method_declaration:
'void' name = ID '(' typed_list? ')' '{' block '}' # void_method_declaration
| type name = ID '(' typed_list? ')' '{' block '}' # type_method_declaration;
constructor_declaration:
name = ID '(' typed_list? ')' (
':' initializer_element (',' initializer_element)*
)? '{' block '}';
initializer_element: name = ID '(' expr_list? ')';
predicate_declaration:
'predicate' name = ID '(' typed_list? ')' (
':' predicate_list
)? '{' block '}';
statement:
assignment_statement
| local_variable_statement
| expression_statement
| disjunction_statement
| formula_statement
| return_statement
| '{' block '}';
block: statement*;
assignment_statement: (object = qualified_id '.')? field = ID '=' value = expr ';';
local_variable_statement:
type variable_dec (',' variable_dec)* ';';
expression_statement: expr ';';
disjunction_statement: conjunction ('or' conjunction)+;
conjunction: '{' block '}' ('[' cost = expr ']')?;
formula_statement: (goal = 'goal' | fact = 'fact') name = ID '=' 'new' (
object = qualified_id '.'
)? predicate = ID '(' assignment_list? ')' ';';
return_statement: 'return' expr ';';
assignment_list: assignment (',' assignment)*;
assignment: field = ID ':' value = expr;
expr:
literal # literal_expression
| '(' expr ')' # parentheses_expression
| expr ('*' expr)+ # multiplication_expression
| expr '/' expr # division_expression
| expr ('+' expr)+ # addition_expression
| expr ('-' expr)+ # subtraction_expression
| '+' expr # plus_expression
| '-' expr # minus_expression
| '!' expr # not_expression
| qualified_id # qualified_id_expression
| (object = qualified_id '.')? function_name = ID '(' expr_list? ')' # function_expression
| '(' type ')' expr # cast_expression
| '[' min = expr ',' max = expr ']' # range_expression
| 'new' type '(' expr_list? ')' # constructor_expression
| expr '==' expr # eq_expression
| expr '>=' expr # geq_expression
| expr '<=' expr # leq_expression
| expr '>' expr # gt_expression
| expr '<' expr # lt_expression
| expr '!=' expr # neq_expression
| expr '->' expr # implication_expression
| expr ('|' expr)+ # disjunction_expression
| expr ('&' expr)+ # conjunction_expression
| expr ('^' expr)+ # extc_one_expression;
expr_list: expr (',' expr)*;
literal:
numeric = NumericLiteral
| string = StringLiteral
| t = 'true'
| f = 'false';
qualified_id: (t = 'this' | ID) ('.' ID)*;
type: class_type | primitive_type;
class_type: ID ('.' ID)*;
primitive_type: 'real' | 'bool' | 'string';
type_list: type (',' type)*;
typed_list: type ID (',' type ID)*;
qualified_predicate: (class_type '.')? ID;
predicate_list: qualified_predicate (',' qualified_predicate)*;
TYPE_DEF: 'typedef';
REAL: 'real';
BOOL: 'bool';
STRING: 'string';
ENUM: 'enum';
CLASS: 'class';
GOAL: 'goal';
FACT: 'fact';
PREDICATE: 'predicate';
NEW: 'new';
OR: 'or';
THIS: 'this';
VOID: 'void';
TRUE: 'true';
FALSE: 'false';
RETURN: 'return';
DOT: '.';
COMMA: ',';
COLON: ':';
SEMICOLON: ';';
LPAREN: '(';
RPAREN: ')';
LBRACKET: '[';
RBRACKET: ']';
LBRACE: '{';
RBRACE: '}';
PLUS: '+';
MINUS: '-';
STAR: '*';
SLASH: '/';
AMP: '&';
BAR: '|';
EQUAL: '=';
GT: '>';
LT: '<';
BANG: '!';
EQEQ: '==';
LTEQ: '<=';
GTEQ: '>=';
BANGEQ: '!=';
IMPLICATION: '->';
CARET: '^';
ID: ('a' ..'z' | 'A' ..'Z' | '_') (
'a' ..'z'
| 'A' ..'Z'
| '0' ..'9'
| '_'
)*;
NumericLiteral: [0-9]+ ('.' [0-9]+)? | '.' [0-9]+;
StringLiteral: '"' (ESC | .)*? '"';
fragment ESC: '\\"' | '\\\\';
LINE_COMMENT: '//' .*? '\r'? '\n' -> skip;
COMMENT: '/*' .*? '*/' -> skip;
WS: [ \r\t\u000C\n]+ -> skip; |
scripts/trash-back.scpt | opprDev/trash-back | 2 | 2112 | <reponame>opprDev/trash-back<filename>scripts/trash-back.scpt<gh_stars>1-10
tell application "System Events"
tell process "Finder"
repeat 100 times
tell application "Finder" to open trash
tell application "Finder" to activate
key code 126
key down command
key code 51
key up command
delay 0.2 -- adjust delay as needed
end repeat
end tell
end tell
|
libc/_syscall.asm | Moldytzu/mOS | 0 | 27370 | bits 64
global _syscall
_syscall:
mov r9, r8
mov r8, rcx
syscall
ret |
applescript/set_frontmost_process.scpt | 86dh/DevOps-Bash-tools | 7 | 1362 | <gh_stars>1-10
#!/usr/bin/env osascript
# vim:ts=4:sts=4:sw=4:et
#
# Author: <NAME>
# Date: 2022-02-28 13:05:26 +0000 (Mon, 28 Feb 2022)
#
# https://github.com/HariSekhon/DevOps-Bash-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
on run argv
tell application "System Events"
set frontmost of application process (item 1 of argv) to true
end tell
end run
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_488_753.asm | ljhsiun2/medusa | 9 | 620 | <filename>Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_488_753.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xc97e, %rsi
lea addresses_UC_ht+0x1e666, %rdi
nop
nop
nop
xor %rbp, %rbp
mov $7, %rcx
rep movsl
nop
nop
nop
nop
and %r15, %r15
lea addresses_WT_ht+0x1e066, %rsi
lea addresses_A_ht+0x9bfe, %rdi
nop
nop
nop
nop
and $17701, %r14
mov $78, %rcx
rep movsw
nop
sub %r14, %r14
lea addresses_D_ht+0x10c66, %r15
nop
nop
nop
sub $14429, %r8
mov (%r15), %rbp
dec %r8
lea addresses_A_ht+0x466, %r15
nop
inc %r8
mov (%r15), %esi
nop
nop
nop
nop
nop
sub $38695, %rdi
lea addresses_WT_ht+0x1e240, %r15
nop
nop
xor %rsi, %rsi
vmovups (%r15), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rcx
nop
nop
and $12252, %r8
lea addresses_A_ht+0x12566, %rsi
lea addresses_UC_ht+0x6425, %rdi
nop
nop
sub $36780, %r14
mov $121, %rcx
rep movsw
nop
nop
nop
nop
cmp $17381, %r8
lea addresses_UC_ht+0x43f6, %r15
nop
nop
nop
nop
nop
dec %rcx
mov (%r15), %r14d
nop
nop
sub $55055, %r14
lea addresses_D_ht+0x12a66, %rsi
and $5202, %r8
mov $0x6162636465666768, %r15
movq %r15, %xmm1
vmovups %ymm1, (%rsi)
nop
nop
and $4300, %r14
lea addresses_D_ht+0x466, %rsi
lea addresses_normal_ht+0x14966, %rdi
nop
nop
nop
nop
xor %r9, %r9
mov $107, %rcx
rep movsq
nop
nop
nop
nop
cmp $13750, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %rbp
push %rbx
push %rdi
push %rdx
// Store
lea addresses_A+0x15a66, %r15
nop
nop
nop
add %rbp, %rbp
movb $0x51, (%r15)
nop
nop
nop
nop
inc %rdx
// Load
lea addresses_WC+0x1b6e6, %rdi
clflush (%rdi)
sub %rbx, %rbx
vmovaps (%rdi), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %rdx
nop
nop
and %rbx, %rbx
// Store
lea addresses_WC+0x1d4c2, %r15
nop
nop
nop
sub %rdx, %rdx
movw $0x5152, (%r15)
cmp $29093, %rbx
// Faulty Load
lea addresses_WT+0x3466, %rdx
nop
nop
nop
cmp %rbx, %rbx
mov (%rdx), %bp
lea oracles, %r11
and $0xff, %rbp
shlq $12, %rbp
mov (%r11,%rbp,1), %rbp
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_WC', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 2}}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': True}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': True, 'same': True, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'39': 488}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
|
oeis/041/A041097.asm | neoneye/loda-programs | 11 | 5263 | <filename>oeis/041/A041097.asm
; A041097: Denominators of continued fraction convergents to sqrt(56).
; Submitted by <NAME>
; 1,2,29,60,869,1798,26041,53880,780361,1614602,23384789,48384180,700763309,1449910798,20999514481,43448939760,629284671121,1302018282002,18857540619149,39017099520300,565096933903349,1169210967326998,16934050476481321,35037311920289640,507456417360536281,1049950146641362202,15206758470339607109,31463467087320576420,455695297692827676989,942854062472975930398,13655652172314490702561,28254158407101957335520,409213869871741893399841,846681898150585744135202,12262760443979942311292669
add $0,1
mov $3,4
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
dif $2,4
dif $2,7
mul $2,28
add $3,$2
lpe
mov $0,$2
div $0,28
|
agda-stdlib/src/Algebra/Properties/CommutativeSemigroup.agda | DreamLinuxer/popl21-artifact | 5 | 15825 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Some theory for commutative semigroup
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra using (CommutativeSemigroup)
module Algebra.Properties.CommutativeSemigroup
{a ℓ} (CS : CommutativeSemigroup a ℓ)
where
open CommutativeSemigroup CS
open import Relation.Binary.Reasoning.Setoid setoid
------------------------------------------------------------------------------
-- Re-export the contents of semigroup
open import Algebra.Properties.Semigroup semigroup public
------------------------------------------------------------------------------
-- Permutation laws for _∙_ for three factors.
------------------------------------------------------------------------------
-- Partitions (1,1).
-- There are five nontrivial permutations.
------------------------------------------------------------------------------
x∙yz≈y∙xz : ∀ x y z → x ∙ (y ∙ z) ≈ y ∙ (x ∙ z)
x∙yz≈y∙xz x y z = begin
x ∙ (y ∙ z) ≈⟨ sym (assoc x y z) ⟩
(x ∙ y) ∙ z ≈⟨ ∙-congʳ (comm x y) ⟩
(y ∙ x) ∙ z ≈⟨ assoc y x z ⟩
y ∙ (x ∙ z) ∎
x∙yz≈z∙yx : ∀ x y z → x ∙ (y ∙ z) ≈ z ∙ (y ∙ x)
x∙yz≈z∙yx x y z = begin
x ∙ (y ∙ z) ≈⟨ ∙-congˡ (comm y z) ⟩
x ∙ (z ∙ y) ≈⟨ x∙yz≈y∙xz x z y ⟩
z ∙ (x ∙ y) ≈⟨ ∙-congˡ (comm x y) ⟩
z ∙ (y ∙ x) ∎
x∙yz≈x∙zy : ∀ x y z → x ∙ (y ∙ z) ≈ x ∙ (z ∙ y)
x∙yz≈x∙zy _ y z = ∙-congˡ (comm y z)
x∙yz≈y∙zx : ∀ x y z → x ∙ (y ∙ z) ≈ y ∙ (z ∙ x)
x∙yz≈y∙zx x y z = begin
x ∙ (y ∙ z) ≈⟨ comm x _ ⟩
(y ∙ z) ∙ x ≈⟨ assoc y z x ⟩
y ∙ (z ∙ x) ∎
x∙yz≈z∙xy : ∀ x y z → x ∙ (y ∙ z) ≈ z ∙ (x ∙ y)
x∙yz≈z∙xy x y z = begin
x ∙ (y ∙ z) ≈⟨ sym (assoc x y z) ⟩
(x ∙ y) ∙ z ≈⟨ comm _ z ⟩
z ∙ (x ∙ y) ∎
------------------------------------------------------------------------------
-- Partitions (1,2).
-- These permutation laws are proved by composing the proofs for
-- partitions (1,1) with \p → trans p (sym (assoc _ _ _)).
------------------------------------------------------------------------------
x∙yz≈yx∙z : ∀ x y z → x ∙ (y ∙ z) ≈ (y ∙ x) ∙ z
x∙yz≈yx∙z x y z = trans (x∙yz≈y∙xz x y z) (sym (assoc y x z))
x∙yz≈zy∙x : ∀ x y z → x ∙ (y ∙ z) ≈ (z ∙ y) ∙ x
x∙yz≈zy∙x x y z = trans (x∙yz≈z∙yx x y z) (sym (assoc z y x))
x∙yz≈xz∙y : ∀ x y z → x ∙ (y ∙ z) ≈ (x ∙ z) ∙ y
x∙yz≈xz∙y x y z = trans (x∙yz≈x∙zy x y z) (sym (assoc x z y))
x∙yz≈yz∙x : ∀ x y z → x ∙ (y ∙ z) ≈ (y ∙ z) ∙ x
x∙yz≈yz∙x x y z = trans (x∙yz≈y∙zx _ _ _) (sym (assoc y z x))
x∙yz≈zx∙y : ∀ x y z → x ∙ (y ∙ z) ≈ (z ∙ x) ∙ y
x∙yz≈zx∙y x y z = trans (x∙yz≈z∙xy x y z) (sym (assoc z x y))
------------------------------------------------------------------------------
-- Partitions (2,1).
-- Their laws are proved by composing proofs for partitions (1,1) with
-- trans (assoc x y z).
------------------------------------------------------------------------------
xy∙z≈y∙xz : ∀ x y z → (x ∙ y) ∙ z ≈ y ∙ (x ∙ z)
xy∙z≈y∙xz x y z = trans (assoc x y z) (x∙yz≈y∙xz x y z)
xy∙z≈z∙yx : ∀ x y z → (x ∙ y) ∙ z ≈ z ∙ (y ∙ x)
xy∙z≈z∙yx x y z = trans (assoc x y z) (x∙yz≈z∙yx x y z)
xy∙z≈x∙zy : ∀ x y z → (x ∙ y) ∙ z ≈ x ∙ (z ∙ y)
xy∙z≈x∙zy x y z = trans (assoc x y z) (x∙yz≈x∙zy x y z)
xy∙z≈y∙zx : ∀ x y z → (x ∙ y) ∙ z ≈ y ∙ (z ∙ x)
xy∙z≈y∙zx x y z = trans (assoc x y z) (x∙yz≈y∙zx x y z)
xy∙z≈z∙xy : ∀ x y z → (x ∙ y) ∙ z ≈ z ∙ (x ∙ y)
xy∙z≈z∙xy x y z = trans (assoc x y z) (x∙yz≈z∙xy x y z)
------------------------------------------------------------------------------
-- Partitions (2,2).
-- These proofs are by composing with the proofs for (2,1).
------------------------------------------------------------------------------
xy∙z≈yx∙z : ∀ x y z → (x ∙ y) ∙ z ≈ (y ∙ x) ∙ z
xy∙z≈yx∙z x y z = trans (xy∙z≈y∙xz _ _ _) (sym (assoc y x z))
xy∙z≈zy∙x : ∀ x y z → (x ∙ y) ∙ z ≈ (z ∙ y) ∙ x
xy∙z≈zy∙x x y z = trans (xy∙z≈z∙yx x y z) (sym (assoc z y x))
xy∙z≈xz∙y : ∀ x y z → (x ∙ y) ∙ z ≈ (x ∙ z) ∙ y
xy∙z≈xz∙y x y z = trans (xy∙z≈x∙zy x y z) (sym (assoc x z y))
xy∙z≈yz∙x : ∀ x y z → (x ∙ y) ∙ z ≈ (y ∙ z) ∙ x
xy∙z≈yz∙x x y z = trans (xy∙z≈y∙zx x y z) (sym (assoc y z x))
xy∙z≈zx∙y : ∀ x y z → (x ∙ y) ∙ z ≈ (z ∙ x) ∙ y
xy∙z≈zx∙y x y z = trans (xy∙z≈z∙xy x y z) (sym (assoc z x y))
|
libsrc/_DEVELOPMENT/l/sccz80/5-z80/i32/l_long_div.asm | ahjelm/z88dk | 640 | 91885 | ;
; Small C+ Long Library Functions
;
; Divide 2 32 bit numbers
;
; Hopefully this routine does work!
;
; I think the use of ix is unavoidable in this case..unless you know
; otherwise!
;
; Replaced use of ix with bcbc'
SECTION code_clib
SECTION code_l_sccz80
PUBLIC l_long_div
PUBLIC l_long_mod
EXTERN l_divs_32_32x32
l_long_mod:
and a
jr common
l_long_div:
scf
common:
; dehl = divisor
; stack = dividend, ret
exx
pop bc
pop hl
pop de
push bc
exx
jp c,l_divs_32_32x32
call l_divs_32_32x32
exx
ret
|
programs/oeis/017/A017438.asm | karttu/loda | 1 | 96966 | <reponame>karttu/loda
; A017438: a(n) = (11*n + 4)^2.
; 16,225,676,1369,2304,3481,4900,6561,8464,10609,12996,15625,18496,21609,24964,28561,32400,36481,40804,45369,50176,55225,60516,66049,71824,77841,84100,90601,97344,104329,111556,119025,126736,134689,142884,151321,160000,168921,178084,187489,197136,207025,217156,227529,238144,249001,260100,271441,283024,294849,306916,319225,331776,344569,357604,370881,384400,398161,412164,426409,440896,455625,470596,485809,501264,516961,532900,549081,565504,582169,599076,616225,633616,651249,669124,687241,705600,724201,743044,762129,781456,801025,820836,840889,861184,881721,902500,923521,944784,966289,988036,1010025,1032256,1054729,1077444,1100401,1123600,1147041,1170724,1194649,1218816,1243225,1267876,1292769,1317904,1343281,1368900,1394761,1420864,1447209,1473796,1500625,1527696,1555009,1582564,1610361,1638400,1666681,1695204,1723969,1752976,1782225,1811716,1841449,1871424,1901641,1932100,1962801,1993744,2024929,2056356,2088025,2119936,2152089,2184484,2217121,2250000,2283121,2316484,2350089,2383936,2418025,2452356,2486929,2521744,2556801,2592100,2627641,2663424,2699449,2735716,2772225,2808976,2845969,2883204,2920681,2958400,2996361,3034564,3073009,3111696,3150625,3189796,3229209,3268864,3308761,3348900,3389281,3429904,3470769,3511876,3553225,3594816,3636649,3678724,3721041,3763600,3806401,3849444,3892729,3936256,3980025,4024036,4068289,4112784,4157521,4202500,4247721,4293184,4338889,4384836,4431025,4477456,4524129,4571044,4618201,4665600,4713241,4761124,4809249,4857616,4906225,4955076,5004169,5053504,5103081,5152900,5202961,5253264,5303809,5354596,5405625,5456896,5508409,5560164,5612161,5664400,5716881,5769604,5822569,5875776,5929225,5982916,6036849,6091024,6145441,6200100,6255001,6310144,6365529,6421156,6477025,6533136,6589489,6646084,6702921,6760000,6817321,6874884,6932689,6990736,7049025,7107556,7166329,7225344,7284601,7344100,7403841,7463824,7524049
mul $0,11
add $0,4
pow $0,2
mov $1,$0
|
conway.asm | tcanozer/x86-Newman-Conway-Sequence | 0 | 247873 | ;<NAME>021
myss SEGMENT PARA STACK 's'
DW 200 DUP(?)
myss ENDS
myds SEGMENT PARA 'd'
myds ENDS
mycs SEGMENT PARA 'c'
ASSUME CS:mycs, DS:myds, SS:myss
;===============================================================================
main proc far
; init program
push ds
xor ax, ax
push ax
mov ax, myds
mov ds, ax
; compute and print a(10)
mov ax, 10 ; set input parameter
push ax ; put input parameter on stack
call far ptr CONWAY ; compute a(10) on stack
pop ax ; AX = a(10)
call PRINTINT ; print number in AX
retf
main endp
;===============================================================================
; CONWAY far subroutine
CONWAY proc far
; store modified registers
push ax
push bx
push cx
push bp
; get input parameter n from stack
mov bp, sp ; get stack pointer
add bp, 12 ; skip 8 bytes from pushes and 4 bytes of far return address
mov ax, [bp] ; AX = n
; case for n = 0
cmp ax, 0 ; check for n = 0
ja conway1
mov ax, 0 ; return 0
jmp conway_done
; case for n = 1 or 2
conway1:
cmp ax, 2 ; check for n = 1 or 2
ja conway3
mov ax, 1 ; return 1
jmp conway_done
; case for n >= 3
conway3:
dec ax ; AX = n - 1
push ax ; put n - 1 on stack
call far ptr CONWAY ; compute a(n - 1) on stack
pop bx ; BX = a(n - 1)
push bx ; put a(n - 1) on stack
call far ptr CONWAY ; compute a(a(n - 1)) on stack
pop cx ; CX = a(a(n - 1))
inc ax ; AX = n
sub ax, bx ; AX = n - a(n - 1)
push ax ; put n - a(n - 1) on stack
call far ptr CONWAY ; compute a(n - a(n - 1)) on stack
pop ax ; AX = a(n - a(n - 1))
add ax, cx ; AX = a(a(n - 1)) + a(n - a(n - 1))
conway_done:
mov [bp], ax ; put return value on stack
; restore modified registers
pop bp
pop cx
pop bx
pop ax
retf ; far return from subroutine
CONWAY endp
;===============================================================================
; subroutine to print number in AX
PRINTINT proc
cmp ax, 0 ; check for zero
jne PRINTINT_r ; use recursive version if not zero
push ax ; store register
mov al, '0' ; print zero
mov ah, 0eh ; teletype output
int 10h ; BIOS interrupt
pop ax ; restore register
ret ; return from subroutine
PRINTINT_r:
; store modified registers
push ax
push bx
push dx
mov dx, 0 ; convert word in AX to double word in DX:AX
cmp ax, 0 ; check for zero
je PRINTINT_done ; printing done
mov bx, 10 ; decimal base
div bx ; set AX to quotient and DX to remainder
call PRINTINT_r ; recursively print the quotient
mov ax, dx ; set AX to remainder
add al, '0' ; convert number to symbol
mov ah, 0eh ; teletype output
int 10h ; BIOS interrupt
PRINTINT_done:
; restore modified registers
pop dx
pop bx
pop ax
ret ; return from subroutine
PRINTINT endp
;===============================================================================
mycs ENDS
END main
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c45210a.ada | best08618/asylo | 7 | 30730 | -- C45210A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT AN ENUMERATION IMPOSING AN "UNNATURAL" ORDER ON ALPHABETIC
-- CHARACTERS CORRECTLY EVALUATES THE ORDERING OPERATORS.
-- RM 15 OCTOBER 1980
-- JWC 7/8/85 RENAMED TO -AB
WITH REPORT ;
PROCEDURE C45210A IS
USE REPORT;
TYPE T IS ( 'S' , 'P' , 'M' , 'R' );
MVAR : T := T'('M') ;
PVAR : T := T'('P') ;
RVAR : T := T'('R') ;
SVAR : T := T'('S') ;
ERROR_COUNT : INTEGER := 0 ; -- INITIAL VALUE ESSENTIAL
PROCEDURE BUMP IS
BEGIN
ERROR_COUNT := ERROR_COUNT +1 ;
END BUMP ;
BEGIN
TEST( "C45210A" , "CHECK THAT AN ENUMERATION IMPOSING" &
" AN ""UNNATURAL"" ORDER ON ALPHABETIC" &
" CHARACTERS CORRECTLY EVALUATES THE " &
" ORDERING OPERATORS" ) ;
-- 256 CASES ( 4 * 4 ORDERED PAIRS OF OPERAND VALUES,
-- 4 ORDERING OPERATORS: '<' , '<=' , '>' , '>='
-- (IN THE TABLE: A , B , C , D )
-- 4 VARIABLE/LITERAL FOR LEFT OPERAND,
-- VARIABLE/LITERAL FOR RIGHT OPERAND,
-- (IN THE TABLE: VV = ALPHA ,
-- VL = BETA ,
-- LV = GAMMA ,
-- LL = DELTA ) RANDOMIZED
-- INTO 16 (ONE FOR EACH PAIR OF VALUES) ACCORDING TO THE FOL-
-- LOWING GRAECO-LATIN SQUARE (WITH ADDITIONAL PROPERTIES):
-- RIGHT OPERAND: 'S' 'P' 'M' 'R'
-- LEFT
-- OPERAND:
-- 'S' A-ALPHA B-BETA C-GAMMA D-DELTA
-- 'P' C-DELTA D-GAMMA A-BETA B-ALPHA
-- 'M' D-BETA C-ALPHA B-DELTA A-GAMMA
-- 'R' B-GAMMA A-DELTA D-ALPHA C-BETA
-- (BOTH THE LATIN DIAGONAL AND THE GREEK DIAGONAL CONTAIN 4
-- DISTINCT LETTERS, NON-TRIVIALLY PERMUTED.)
-- THE ABOVE DESCRIBES PART 1 OF THE TEST. PART 2 PERFORMS AN
-- EXHAUSTIVE VERIFICATION OF THE 'VARIABLE VS. VARIABLE' CASE
-- ( VV , ALPHA ) FOR ALL 4 OPERATORS.
-----------------------------------------------------------------
-- PART 1
-- 'BUMP' MEANS 'BUMP THE ERROR COUNT'
IF T'(SVAR) < T'(SVAR) THEN BUMP ; END IF;
IF T'(SVAR) <= T'('P' ) THEN NULL; ELSE BUMP ; END IF;
IF T'('S' ) > T'(MVAR) THEN BUMP ; END IF;
IF T'('S' ) >= T'('R' ) THEN BUMP ; END IF;
IF T'('P' ) > T'('S' ) THEN NULL; ELSE BUMP ; END IF;
IF T'('P' ) >= T'(PVAR) THEN NULL; ELSE BUMP ; END IF;
IF T'(PVAR) < T'('M' ) THEN NULL; ELSE BUMP ; END IF;
IF T'(PVAR) <= T'(RVAR) THEN NULL; ELSE BUMP ; END IF;
IF T'(MVAR) >= T'('S' ) THEN NULL; ELSE BUMP ; END IF;
IF T'(MVAR) > T'(PVAR) THEN NULL; ELSE BUMP ; END IF;
IF T'('M' ) <= T'('M' ) THEN NULL; ELSE BUMP ; END IF;
IF T'('M' ) < T'(RVAR) THEN NULL; ELSE BUMP ; END IF;
IF T'('R' ) <= T'(SVAR) THEN BUMP ; END IF;
IF T'('R' ) < T'('P' ) THEN BUMP ; END IF;
IF T'(RVAR) >= T'(MVAR) THEN NULL; ELSE BUMP ; END IF;
IF T'(RVAR) > T'('R' ) THEN BUMP ; END IF;
IF ERROR_COUNT /= 0 THEN
FAILED( """UNNATURAL"" ORDER ON CHARACTER TYPES - FAILURE1" );
END IF;
-----------------------------------------------------------------
-- PART 2
-- 'BUMP' MEANS 'INCREASE THE COUNT FOR THE NUMBER OF <TRUE>S'
ERROR_COUNT := 0 ;
FOR AVAR IN T'FIRST..T'LAST LOOP -- 4 VALUES
FOR BVAR IN T'FIRST..T'('P') LOOP -- 2 VALUES
IF AVAR < BVAR THEN BUMP ; END IF; -- COUNT +:= 1
END LOOP;
END LOOP;
IF ERROR_COUNT /= 1 THEN -- THIS IS A PLAIN COUNT, NOT AN
-- ERROR COUNT
FAILED( """UNNATURAL"" ORDER ON CHARACTER TYPES - FAILURE2" );
END IF;
ERROR_COUNT := 0 ;
FOR AVAR IN T'FIRST..T'LAST LOOP -- 4 VALUES
FOR BVAR IN T'FIRST..T'('P') LOOP -- 2 VALUES
IF AVAR <= BVAR THEN BUMP ; END IF; -- COUNT +:= 3
END LOOP;
END LOOP;
IF ERROR_COUNT /= 3 THEN -- THIS IS A PLAIN COUNT, NOT AN
-- ERROR COUNT
FAILED( """UNNATURAL"" ORDER ON CHARACTER TYPES - FAILURE3" );
END IF;
ERROR_COUNT := 0 ;
FOR AVAR IN T'FIRST..T'LAST LOOP -- 4 VALUES
FOR BVAR IN T'FIRST..T'('P') LOOP -- 2 VALUES
IF AVAR > BVAR THEN BUMP ; END IF; -- COUNT +:= 5
END LOOP;
END LOOP;
IF ERROR_COUNT /= 5 THEN -- THIS IS A PLAIN COUNT, NOT AN
-- ERROR COUNT
FAILED( """UNNATURAL"" ORDER ON CHARACTER TYPES - FAILURE4" );
END IF;
ERROR_COUNT := 0 ;
FOR AVAR IN T'FIRST..T'LAST LOOP -- 4 VALUES
FOR BVAR IN T'FIRST..T'('P') LOOP -- 2 VALUES
IF AVAR >= BVAR THEN BUMP ; END IF; -- COUNT +:= 7
END LOOP;
END LOOP;
IF ERROR_COUNT /= 7 THEN -- THIS IS A PLAIN COUNT, NOT AN
-- ERROR COUNT
FAILED( """UNNATURAL"" ORDER ON CHARACTER TYPES - FAILURE5" );
END IF;
RESULT;
END C45210A;
|
examples/GUIgeneric/GUIExample.agda | stephanadls/state-dependent-gui | 2 | 5360 | open import Data.Bool
module GUIgeneric.GUIExample where
open import GUIgeneric.Prelude renaming (inj₁ to secondBtn; inj₂ to firstBtn; WxColor to Color) hiding (addButton; _>>_)
open import GUIgeneric.GUIDefinitions renaming (add to add'; add' to add)
open import GUIgeneric.GUI
open import GUIgeneric.GUIExampleLib renaming (addButton to addButton')
open import Data.Product
addButton : String → Frame → Frame
addButton str fr = addButton' str fr optimized
addTxtBox : String → Frame → Frame
addTxtBox str fr = addTxtBox' str fr optimized
oneBtnGUI : Frame
oneBtnGUI = addButton "OK" create-frame
twoBtnGUI : Frame
twoBtnGUI = addButton "Cancel" oneBtnGUI
-- Attributes
--
Cols = ℕ
Margin = ℕ
HSpace = ℕ
VSpace = ℕ
oneColumnLayout : Cols × Margin × HSpace × VSpace
oneColumnLayout = (1 , 10 , 2 , 2)
black : Color
black = rgb 0 0 0
propOneBtn : properties oneBtnGUI
propOneBtn = black , oneColumnLayout
propTwoBtn : properties twoBtnGUI
propTwoBtn = black , black , oneColumnLayout
putStr' : {A : Set} → String → (f : IO GuiLev1Interface ∞ A) →
IO GuiLev1Interface ∞ A
putStr' s f = do (putStrLn s) (λ _ → f)
syntax putStr' s f = putStrLn s >> f
keepGUI : {j : Size} → HandlerObject j twoBtnGUI →
IO GuiLev1Interface ∞
(Σ-syntax (returnType twoBtnGUI)
(λ r →
IOObjectˢ GuiLev1Interface handlerInterface j
(nextStateFrame twoBtnGUI r)))
keepGUI = λ obj → return (noChange , obj)
changeGUI : ∀ {j} (g : CompEls frame) {g'} (prop : properties g) obj →
IO GuiLev1Interface ∞ (Σ (returnType g') (\r -> IOObjectˢ GuiLev1Interface handlerInterface j (nextStateFrame g' r)))
changeGUI = λ g prop obj → return (changedGUI g prop , obj)
mutual
objTwoBtnGUI' : ∀ i → HandlerObject i twoBtnGUI
objTwoBtnGUI' i .method {j} (secondBtn bt) =
putStrLn "Cancel Fired! NO GUI Change." >>
keepGUI (objTwoBtnGUI' j)
objTwoBtnGUI' i .method {j} (firstBtn bt) =
putStrLn "OK Fired! Redefining GUI." >>
changeGUI oneBtnGUI propOneBtn (objOneBtnGUI' j)
objOneBtnGUI' : ∀ i → HandlerObject i oneBtnGUI
objOneBtnGUI' i .method {j} bt =
putStrLn "OK Fired! Redefining GUI." >>
changeGUI twoBtnGUI propTwoBtn (objTwoBtnGUI' j)
obj2Btn : ∀ {i} → HandlerObject i twoBtnGUI
obj2Btn .method (firstBtn bt) =
putStrLn "OK fired! Redefining GUI." >>
changeGUI oneBtnGUI propOneBtn obj1Btn
obj2Btn .method (secondBtn bt) =
putStrLn "Cancel fired! No GUI change." >>
keepGUI obj2Btn
obj1Btn : ∀ {i} → HandlerObject i oneBtnGUI
obj1Btn .method bt =
putStrLn "OK fired! Redefining GUI." >>
changeGUI twoBtnGUI propTwoBtn obj2Btn
main : NativeIO Unit
main = compileProgram twoBtnGUI propTwoBtn
(obj2Btn {∞})
|
libsrc/_DEVELOPMENT/arch/sms/SMSlib/z80/asm_SMSlib_getHCount.asm | jpoikela/z88dk | 640 | 8599 | ; **************************************************
; SMSlib - C programming library for the SMS/GG
; ( part of devkitSMS - github.com/sverx/devkitSMS )
; **************************************************
INCLUDE "SMSlib_private.inc"
SECTION code_clib
SECTION code_SMSlib
PUBLIC asm_SMSlib_getHCount
asm_SMSlib_getHCount:
; unsigned char SMS_getHCount (void)
;
; uses : af, l
in a,(VDPHCounterPort)
ld l,a
ret
|
libsrc/_DEVELOPMENT/stdio/c/sdcc_ix/fputs_unlocked.asm | meesokim/z88dk | 0 | 170160 |
; int fputs_unlocked(const char *s, FILE *stream)
SECTION code_stdio
PUBLIC _fputs_unlocked
EXTERN l0_fputs_unlocked_callee
_fputs_unlocked:
pop af
pop hl
pop bc
push bc
push hl
push af
jp l0_fputs_unlocked_callee
|
Lab/hw3/Sources/main.asm | asheemchhetri/ECE362 | 0 | 15890 | <reponame>asheemchhetri/ECE362
org $800
ldaa #$88
ldab #$FA
MUL
ADCA #0 |
pwnlib/shellcraft/templates/i386/infloop.asm | DrKeineLust/pwntools | 8,966 | 14025 | <%docstring>A two-byte infinite loop.</%docstring>
jmp $
|
05_arraylistvsarray/Seq2ListAccess10.asm | arnaudroger/blog_samples | 0 | 101029 | # JMH version: 1.19
# VM version: JDK 1.8.0_131, VM 25.131-b11
# VM invoker: /usr/lib/jvm/java-8-oracle/jre/bin/java
# VM options: <none>
# Warmup: 20 iterations, 1 s each
# Measurement: 20 iterations, 1 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: com.github.arnaudroger.Seq2ListAccess.testIndexed
# Parameters: (size = 10)
# Run progress: 0.00% complete, ETA 00:00:40
# Fork: 1 of 1
# Preparing profilers: LinuxPerfAsmProfiler
# Profilers consume stdout and stderr from target VM, use -v EXTRA to copy to console
# Warmup Iteration 1: 13.387 ns/op
# Warmup Iteration 2: 12.024 ns/op
# Warmup Iteration 3: 11.492 ns/op
# Warmup Iteration 4: 11.512 ns/op
# Warmup Iteration 5: 11.513 ns/op
# Warmup Iteration 6: 11.567 ns/op
# Warmup Iteration 7: 11.570 ns/op
# Warmup Iteration 8: 11.493 ns/op
# Warmup Iteration 9: 11.522 ns/op
# Warmup Iteration 10: 11.659 ns/op
# Warmup Iteration 11: 11.569 ns/op
# Warmup Iteration 12: 11.550 ns/op
# Warmup Iteration 13: 11.578 ns/op
# Warmup Iteration 14: 11.528 ns/op
# Warmup Iteration 15: 11.500 ns/op
# Warmup Iteration 16: 11.532 ns/op
# Warmup Iteration 17: 11.549 ns/op
# Warmup Iteration 18: 11.523 ns/op
# Warmup Iteration 19: 11.488 ns/op
# Warmup Iteration 20: 11.510 ns/op
Iteration 1: 11.578 ns/op
Iteration 2: 11.607 ns/op
Iteration 3: 11.513 ns/op
Iteration 4: 11.559 ns/op
Iteration 5: 11.504 ns/op
Iteration 6: 11.552 ns/op
Iteration 7: 11.542 ns/op
Iteration 8: 11.564 ns/op
Iteration 9: 11.483 ns/op
Iteration 10: 11.504 ns/op
Iteration 11: 11.499 ns/op
Iteration 12: 11.539 ns/op
Iteration 13: 11.489 ns/op
Iteration 14: 11.506 ns/op
Iteration 15: 11.536 ns/op
Iteration 16: 11.499 ns/op
Iteration 17: 11.534 ns/op
Iteration 18: 11.481 ns/op
Iteration 19: 11.471 ns/op
Iteration 20: 11.489 ns/op
# Processing profiler results: LinuxPerfAsmProfiler
Result "com.github.arnaudroger.Seq2ListAccess.testIndexed":
11.522 ±(99.9%) 0.032 ns/op [Average]
(min, avg, max) = (11.471, 11.522, 11.607), stdev = 0.037
CI (99.9%): [11.491, 11.554] (assumes normal distribution)
Secondary result "com.github.arnaudroger.Seq2ListAccess.testIndexed:·asm":
PrintAssembly processed: 167968 total address lines.
Perf output processed (skipped 23.270 seconds):
Column 1: cycles (20519 events)
Column 2: instructions (20511 events)
Hottest code regions (>10.00% "cycles" events):
....[Hottest Region 1]..............................................................................
C2, level 4, com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub, version 513 (429 bytes)
; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@30 (line 234)
; implicit exception: dispatches to 0x00007f8e687c5cbd
0x00007f8e687c5879: test %r11d,%r11d
0x00007f8e687c587c: jne 0x00007f8e687c5a80 ;*ifeq
; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@33 (line 234)
0x00007f8e687c5882: mov $0x1,%ebp
╭ 0x00007f8e687c5887: jmp 0x00007f8e687c58c0
│↗ 0x00007f8e687c5889: xor %edx,%edx ;*if_icmpge
││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@18 (line 62)
││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.37% 0.48% ││ ↗ ↗ 0x00007f8e687c588b: mov %r14,0x68(%rsp)
0.04% 0.02% ││ │ │ 0x00007f8e687c5890: mov %r13,0x60(%rsp)
1.44% 2.15% ││ │ │ 0x00007f8e687c5895: mov 0x10(%rsp),%rsi
0.40% 0.49% ││ │ │ 0x00007f8e687c589a: nop
0.34% 0.57% ││ │ │ 0x00007f8e687c589b: callq 0x00007f8e685ea020 ; OopMap{[96]=Oop [104]=Oop [112]=Oop [16]=Oop off=512}
││ │ │ ;*invokevirtual consume
││ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@20 (line 232)
││ │ │ ; {optimized virtual_call}
3.92% 6.01% ││ │ │ 0x00007f8e687c58a0: mov 0x68(%rsp),%r14
0.38% 0.51% ││ │ │ 0x00007f8e687c58a5: movzbl 0x94(%r14),%r11d ;*getfield isDone
││ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@30 (line 234)
0.13% 0.16% ││ │ │ 0x00007f8e687c58ad: add $0x1,%rbp ; OopMap{r14=Oop [96]=Oop [112]=Oop [16]=Oop off=529}
││ │ │ ;*ifeq
││ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@33 (line 234)
1.97% 2.57% ││ │ │ 0x00007f8e687c58b1: test %eax,0x15e04749(%rip) # 0x00007f8e7e5ca000
││ │ │ ; {poll}
0.31% 0.43% ││ │ │ 0x00007f8e687c58b7: test %r11d,%r11d
││ │ │ 0x00007f8e687c58ba: jne 0x00007f8e687c5a85 ;*aload
││ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@13 (line 232)
0.05% 0.07% ↘│ │ │ 0x00007f8e687c58c0: mov 0x60(%rsp),%r13
0.19% 0.18% │ │ │ 0x00007f8e687c58c5: mov 0x10(%r13),%r11d ;*getfield data
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@1 (line 59)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.83% 2.47% │ │ │ 0x00007f8e687c58c9: mov 0x10(%r12,%r11,8),%r9d ;*getfield size
│ │ │ ; - java.util.ArrayList::size@1 (line 278)
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@6 (line 60)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
│ │ │ ; implicit exception: dispatches to 0x00007f8e687c5c71
2.57% 3.07% │ │ │ 0x00007f8e687c58ce: test %r9d,%r9d
╰ │ │ 0x00007f8e687c58d1: jle 0x00007f8e687c5889 ;*if_icmpge
│ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@18 (line 62)
│ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
2.11% 2.49% │ │ 0x00007f8e687c58d3: mov 0x14(%r12,%r11,8),%ecx ;*getfield elementData
│ │ ; - java.util.ArrayList::elementData@1 (line 418)
│ │ ; - java.util.ArrayList::get@7 (line 431)
│ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.01% │ │ 0x00007f8e687c58d8: mov 0xc(%r12,%rcx,8),%r8d ;*aaload
│ │ ; - java.util.ArrayList::elementData@5 (line 418)
│ │ ; - java.util.ArrayList::get@7 (line 431)
│ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
│ │ ; implicit exception: dispatches to 0x00007f8e687c5aaf
9.05% 11.97% │ │ 0x00007f8e687c58dd: test %r8d,%r8d
│ │ 0x00007f8e687c58e0: jbe 0x00007f8e687c5aaf
2.13% 3.66% │ │ 0x00007f8e687c58e6: mov %r9d,%r10d
│ │ 0x00007f8e687c58e9: dec %r10d
│ │ 0x00007f8e687c58ec: cmp %r8d,%r10d
│ │ 0x00007f8e687c58ef: jae 0x00007f8e687c5aaf
2.12% 3.24% │ │ 0x00007f8e687c58f5: mov $0x1,%r8d
0.00% │ │ 0x00007f8e687c58fb: cmp %r9d,%r8d
│ │ 0x00007f8e687c58fe: mov $0x1,%r10d
│ │ 0x00007f8e687c5904: cmovg %r9d,%r10d
2.31% 2.88% │ │ 0x00007f8e687c5908: shl $0x3,%rcx
│ │ 0x00007f8e687c590c: xor %r8d,%r8d
│ │ 0x00007f8e687c590f: xor %edx,%edx ;*lload_3
│ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@21 (line 63)
│ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
2.18% 2.62% ↗ │ │ 0x00007f8e687c5911: cmp %r9d,%r8d
│ │ │ 0x00007f8e687c5914: jge 0x00007f8e687c5ae5 ;*if_icmplt
│ │ │ ; - java.util.ArrayList::rangeCheck@5 (line 652)
│ │ │ ; - java.util.ArrayList::get@2 (line 429)
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.01% 0.00% │ │ │ 0x00007f8e687c591a: mov 0x10(%rcx,%r8,4),%edi
0.00% │ │ │ 0x00007f8e687c591f: mov 0x8(%r12,%rdi,8),%ebx ; implicit exception: dispatches to 0x00007f8e687c5a4c
7.88% 7.01% │ │ │ 0x00007f8e687c5924: lea (%r12,%rdi,8),%rax ;*aaload
│ │ │ ; - java.util.ArrayList::elementData@5 (line 418)
│ │ │ ; - java.util.ArrayList::get@7 (line 431)
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.00% 0.00% │ │ │ 0x00007f8e687c5928: cmp $0xf80022ae,%ebx ; {metadata('java/lang/Long')}
│ │ │ 0x00007f8e687c592e: jne 0x00007f8e687c5c3f ;*checkcast
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
2.19% 1.86% │ │ │ 0x00007f8e687c5934: add 0x10(%rax),%rdx ;*ladd
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.65% 1.14% │ │ │ 0x00007f8e687c5938: inc %r8d ;*iinc
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@36 (line 62)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
│ │ │ 0x00007f8e687c593b: cmp %r10d,%r8d
╰ │ │ 0x00007f8e687c593e: jl 0x00007f8e687c5911 ;*if_icmpge
│ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@18 (line 62)
│ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
│ │ 0x00007f8e687c5940: mov %r9d,%edi
0.61% 0.43% │ │ 0x00007f8e687c5943: add $0xfffffffd,%edi
1.68% 1.38% │ │ 0x00007f8e687c5946: cmp %edi,%r9d
│ │ 0x00007f8e687c5949: mov $0x80000000,%r10d
0.00% │ │ 0x00007f8e687c594f: cmovl %r10d,%edi
2.29% 2.19% │ │ 0x00007f8e687c5953: cmp %edi,%r8d
╭ │ │ 0x00007f8e687c5956: jge 0x00007f8e687c59fe
0.00% │ │ │ 0x00007f8e687c595c: nopl 0x0(%rax) ;*lload_3
│ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@21 (line 63)
│ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.64% 0.66% │ ↗│ │ 0x00007f8e687c5960: mov 0x10(%rcx,%r8,4),%ebx
0.57% 0.22% │ ││ │ 0x00007f8e687c5965: mov 0x8(%r12,%rbx,8),%r10d ; implicit exception: dispatches to 0x00007f8e687c5a4c
2.05% 1.25% │ ││ │ 0x00007f8e687c596a: lea (%r12,%rbx,8),%rax ;*aaload
│ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
│ ││ │ ; - java.util.ArrayList::get@7 (line 431)
│ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.58% 0.63% │ ││ │ 0x00007f8e687c596e: cmp $0xf80022ae,%r10d ; {metadata('java/lang/Long')}
│ ││ │ 0x00007f8e687c5975: jne 0x00007f8e687c5c3f ;*checkcast
│ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
│ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.65% 1.61% │ ││ │ 0x00007f8e687c597b: add 0x10(%rax),%rdx ;*ladd
│ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
│ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.58% 0.19% │ ││ │ 0x00007f8e687c597f: movslq %r8d,%rbx
1.46% 0.63% │ ││ │ 0x00007f8e687c5982: mov 0x14(%rcx,%rbx,4),%r10d ;*aaload
│ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
│ ││ │ ; - java.util.ArrayList::get@7 (line 431)
│ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.58% 0.61% │ ││ │ 0x00007f8e687c5987: test %r10d,%r10d
│╭ ││ │ 0x00007f8e687c598a: je 0x00007f8e687c5a3d ;*checkcast
││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.64% 2.09% ││ ││ │ 0x00007f8e687c5990: mov 0x8(%r12,%r10,8),%esi
1.49% 1.05% ││ ││ │ 0x00007f8e687c5995: lea (%r12,%r10,8),%rax ;*aaload
││ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
││ ││ │ ; - java.util.ArrayList::get@7 (line 431)
││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.64% 0.94% ││ ││ │ 0x00007f8e687c5999: cmp $0xf80022ae,%esi ; {metadata('java/lang/Long')}
││ ││ │ 0x00007f8e687c599f: jne 0x00007f8e687c5c3c ;*checkcast
││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.46% 1.06% ││ ││ │ 0x00007f8e687c59a5: mov 0x18(%rcx,%rbx,4),%esi ;*aaload
││ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
││ ││ │ ; - java.util.ArrayList::get@7 (line 431)
││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.78% 0.74% ││ ││ │ 0x00007f8e687c59a9: add 0x10(%rax),%rdx ;*ladd
││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.81% 1.12% ││ ││ │ 0x00007f8e687c59ad: test %esi,%esi
││╭ ││ │ 0x00007f8e687c59af: je 0x00007f8e687c5a42 ;*checkcast
│││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
│││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.56% 0.41% │││ ││ │ 0x00007f8e687c59b5: mov 0x8(%r12,%rsi,8),%r10d
0.97% 0.38% │││ ││ │ 0x00007f8e687c59ba: lea (%r12,%rsi,8),%rax ;*aaload
│││ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
│││ ││ │ ; - java.util.ArrayList::get@7 (line 431)
│││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.45% 0.29% │││ ││ │ 0x00007f8e687c59be: cmp $0xf80022ae,%r10d ; {metadata('java/lang/Long')}
│││ ││ │ 0x00007f8e687c59c5: jne 0x00007f8e687c5c36 ;*checkcast
│││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
│││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.64% 0.31% │││ ││ │ 0x00007f8e687c59cb: mov 0x1c(%rcx,%rbx,4),%ebx ;*aaload
│││ ││ │ ; - java.util.ArrayList::elementData@5 (line 418)
│││ ││ │ ; - java.util.ArrayList::get@7 (line 431)
│││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.56% 0.09% │││ ││ │ 0x00007f8e687c59cf: add 0x10(%rax),%rdx ;*ladd
│││ ││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
│││ ││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.74% 0.43% │││ ││ │ 0x00007f8e687c59d3: test %ebx,%ebx
│││╭││ │ 0x00007f8e687c59d5: je 0x00007f8e687c5a48 ;*checkcast
││││││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
││││││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.30% 0.04% ││││││ │ 0x00007f8e687c59d7: mov 0x8(%r12,%rbx,8),%r10d
0.98% 0.50% ││││││ │ 0x00007f8e687c59dc: lea (%r12,%rbx,8),%rax ;*aaload
││││││ │ ; - java.util.ArrayList::elementData@5 (line 418)
││││││ │ ; - java.util.ArrayList::get@7 (line 431)
││││││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
││││││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.61% 0.20% ││││││ │ 0x00007f8e687c59e0: cmp $0xf80022ae,%r10d ; {metadata('java/lang/Long')}
││││││ │ 0x00007f8e687c59e7: jne 0x00007f8e687c5c30 ;*checkcast
││││││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
││││││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.38% 0.59% ││││││ │ 0x00007f8e687c59ed: add 0x10(%rax),%rdx ;*ladd
││││││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
││││││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.58% 0.16% ││││││ │ 0x00007f8e687c59f1: add $0x4,%r8d ;*iinc
││││││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@36 (line 62)
││││││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.91% 0.70% ││││││ │ 0x00007f8e687c59f5: cmp %edi,%r8d
││││╰│ │ 0x00007f8e687c59f8: jl 0x00007f8e687c5960 ;*if_icmpge
││││ │ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@18 (line 62)
││││ │ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.01% 0.02% ↘│││ │ │ 0x00007f8e687c59fe: cmp %r9d,%r8d
│││ ╰ │ 0x00007f8e687c5a01: jge 0x00007f8e687c588b
1.41% 1.09% │││ │ 0x00007f8e687c5a07: nop ;*lload_3
│││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@21 (line 63)
│││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.35% 0.23% │││ ↗│ 0x00007f8e687c5a08: cmp %r9d,%r8d
│││ ││ 0x00007f8e687c5a0b: jge 0x00007f8e687c5aec ;*if_icmplt
│││ ││ ; - java.util.ArrayList::rangeCheck@5 (line 652)
│││ ││ ; - java.util.ArrayList::get@2 (line 429)
│││ ││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│││ ││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.36% 0.36% │││ ││ 0x00007f8e687c5a11: mov 0x10(%rcx,%r8,4),%edi
0.00% 0.01% │││ ││ 0x00007f8e687c5a16: mov 0x8(%r12,%rdi,8),%r10d ; implicit exception: dispatches to 0x00007f8e687c5c81
1.55% 1.69% │││ ││ 0x00007f8e687c5a1b: lea (%r12,%rdi,8),%rax ;*aaload
│││ ││ ; - java.util.ArrayList::elementData@5 (line 418)
│││ ││ ; - java.util.ArrayList::get@7 (line 431)
│││ ││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@25 (line 63)
│││ ││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.39% 0.37% │││ ││ 0x00007f8e687c5a1f: cmp $0xf80022ae,%r10d ; {metadata('java/lang/Long')}
│││ ││ 0x00007f8e687c5a26: jne 0x00007f8e687c5c29 ;*checkcast
│││ ││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@28 (line 63)
│││ ││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.37% 0.51% │││ ││ 0x00007f8e687c5a2c: add 0x10(%rax),%rdx ;*ladd
│││ ││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@34 (line 63)
│││ ││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.03% 0.03% │││ ││ 0x00007f8e687c5a30: inc %r8d ;*iinc
│││ ││ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@36 (line 62)
│││ ││ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
1.37% 1.81% │││ ││ 0x00007f8e687c5a33: cmp %r9d,%r8d
│││ ╰│ 0x00007f8e687c5a36: jl 0x00007f8e687c5a08 ;*if_icmpge
│││ │ ; - com.github.arnaudroger.Seq2ListAccess::testIndexed@18 (line 62)
│││ │ ; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0.42% 0.45% │││ ╰ 0x00007f8e687c5a38: jmpq 0x00007f8e687c588b
↘││ 0x00007f8e687c5a3d: inc %r8d
││ 0x00007f8e687c5a40: jmp 0x00007f8e687c5a4c
↘│ 0x00007f8e687c5a42: add $0x2,%r8d
│ 0x00007f8e687c5a46: jmp 0x00007f8e687c5a4c
↘ 0x00007f8e687c5a48: add $0x3,%r8d ;*iinc
; - com.github.arnaudroger.Seq2ListAccess::testIndexed@36 (line 62)
; - com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub@17 (line 232)
0x00007f8e687c5a4c: mov %rdx,0x60(%rsp)
....................................................................................................
88.06% 83.56% <total for region 1>
....[Hottest Regions]...............................................................................
88.06% 83.56% C2, level 4 com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub, version 513 (429 bytes)
9.02% 13.64% C2, level 4 org.openjdk.jmh.infra.Blackhole::consume, version 491 (51 bytes)
1.17% 1.17% [kernel.kallsyms] [unknown] (0 bytes)
0.11% 0.00% [kernel.kallsyms] [unknown] (86 bytes)
0.09% 0.00% [kernel.kallsyms] [unknown] (37 bytes)
0.05% 0.03% [kernel.kallsyms] [unknown] (28 bytes)
0.04% libpthread-2.26.so __libc_write (16 bytes)
0.04% 0.10% libjvm.so _ZN13RelocIterator10initializeEP7nmethodPhS2_ (98 bytes)
0.03% [kernel.kallsyms] [unknown] (0 bytes)
0.02% 0.02% [kernel.kallsyms] [unknown] (27 bytes)
0.02% 0.05% libjvm.so _ZN10fileStream5writeEPKcm (14 bytes)
0.02% 0.02% [kernel.kallsyms] [unknown] (0 bytes)
0.02% 0.00% [kernel.kallsyms] [unknown] (4 bytes)
0.02% 0.01% [kernel.kallsyms] [unknown] (7 bytes)
0.01% [kernel.kallsyms] [unknown] (35 bytes)
0.01% 0.01% [kernel.kallsyms] [unknown] (0 bytes)
0.01% 0.01% [kernel.kallsyms] [unknown] (0 bytes)
0.01% 0.01% [kernel.kallsyms] [unknown] (11 bytes)
0.01% 0.01% [kernel.kallsyms] [unknown] (15 bytes)
0.01% 0.00% [kernel.kallsyms] [unknown] (21 bytes)
1.18% 1.32% <...other 329 warm regions...>
....................................................................................................
100.00% 100.00% <totals>
....[Hottest Methods (after inlining)]..............................................................
88.06% 83.56% C2, level 4 com.github.arnaudroger.generated.Seq2ListAccess_testIndexed_jmhTest::testIndexed_avgt_jmhStub, version 513
9.02% 13.64% C2, level 4 org.openjdk.jmh.infra.Blackhole::consume, version 491
2.24% 2.00% [kernel.kallsyms] [unknown]
0.06% 0.04% hsdis-amd64.so [unknown]
0.05% libpthread-2.26.so __libc_write
0.04% 0.10% libjvm.so _ZN13RelocIterator10initializeEP7nmethodPhS2_
0.03% 0.07% libjvm.so _ZN10fileStream5writeEPKcm
0.03% 0.07% libc-2.26.so vfprintf
0.02% 0.01% libjvm.so _ZN13defaultStream4holdEl
0.02% 0.04% libc-2.26.so _IO_fwrite
0.01% 0.00% libpthread-2.26.so __pthread_enable_asynccancel
0.01% 0.03% libc-2.26.so _IO_default_xsputn
0.01% libjvm.so _ZN13defaultStream5writeEPKcm
0.01% 0.01% libjvm.so _ZN13xmlTextStream5writeEPKcm
0.01% 0.04% libjvm.so _ZN12outputStream15update_positionEPKcm
0.01% 0.01% libc-2.26.so _IO_fflush
0.01% 0.01% libc-2.26.so _IO_str_init_static_internal
0.01% libc-2.26.so _IO_file_sync@@GLIBC_2.2.5
0.01% 0.02% libpthread-2.26.so __pthread_getspecific
0.01% 0.00% libjvm.so _ZN12outputStream5printEPKcz
0.30% 0.08% <...other 58 warm methods...>
....................................................................................................
100.00% 99.76% <totals>
....[Distribution by Source]........................................................................
97.09% 97.20% C2, level 4
2.24% 2.00% [kernel.kallsyms]
0.33% 0.44% libjvm.so
0.14% 0.25% libc-2.26.so
0.08% 0.02% libpthread-2.26.so
0.06% 0.04% hsdis-amd64.so
0.05% 0.03% interpreter
0.00% libzip.so
0.00% 0.01% C1, level 3
....................................................................................................
100.00% 100.00% <totals>
# Run complete. Total time: 00:00:44
Benchmark (size) Mode Cnt Score Error Units
Seq2ListAccess.testIndexed 10 avgt 20 11.522 ± 0.032 ns/op
Seq2ListAccess.testIndexed:·asm 10 avgt NaN ---
Benchmark result is saved to jmh-result2.csv
|
programs/oeis/142/A142150.asm | neoneye/loda | 22 | 10977 | ; A142150: The nonnegative integers interleaved with 0's.
; 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,23,0,24,0,25,0,26,0,27,0,28,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,36,0,37,0,38,0,39,0,40,0,41,0,42,0,43,0,44,0,45,0,46,0,47,0,48,0,49,0
mov $1,$0
dif $1,2
sub $0,$1
|
HoTT/Sigma/Universal.agda | michaelforney/hott | 0 | 9671 | {-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Equivalence
open import HoTT.Identity.Pi
module HoTT.Sigma.Universal where
Σ-univ : ∀ {i j k} {X : 𝒰 i} {A : X → 𝒰 j} (P : (x : X) → A x → 𝒰 k) →
((x : X) → Σ (A x) λ a → P x a) ≃
(Σ ((x : X) → A x) λ g → (x : X) → P x (g x))
Σ-univ _ = let open Iso in iso→eqv λ where
.f h → pr₁ ∘ h , pr₂ ∘ h
.g h x → pr₁ h x , pr₂ h x
.η h → funext (Σ-uniq ∘ h)
.ε h → Σ-uniq h
|
3-mid/impact/source/3d/math/impact-d3-vector.ads | charlie5/lace | 20 | 24268 | with impact.d3.Scalar,
impact.d3.min_max;
package impact.d3.Vector
--
-- Vector_3 in Bullet can be used to represent 3D points and vectors.
--
is
use Math;
--- Vector_3
--
function x (Self : in Vector_3) return Real;
function y (Self : in Vector_3) return Real;
function z (Self : in Vector_3) return Real;
function dot (Left, Right : in Vector_3) return Real;
function cross (Left, Right : in Vector_3) return Vector_3;
function length2 (Self : in Vector_3) return Real; -- Return the length of the vector squared.
function length (Self : in Vector_3) return Real; -- Return the length of the vector.
-- These symantically treat the vector like a point.
function distance2 (Left, Right : in Vector_3) return Real; -- Return the distance squared between the ends of this and another vector.
function distance (Left, Right : in Vector_3) return Real; -- Return the distance between the ends of this and another vector.
function safeNormalize (Self : access Vector_3) return Vector_3;
function Normalize (Self : access Vector_3) return Vector_3;
function Normalized (Self : in Vector_3) return Vector_3;
procedure Normalize (Self : in out Vector_3);
function absolute (Self : in Vector_3) return Vector_3; -- Return a vector will the absolute values of each element.
function minAxis (Self : in Vector_3) return math.Index; -- Return the axis with the smallest value.
function maxAxis (Self : in Vector_3) return math.Index; -- Return the axis with the largest value.
function rotate (Self : in Vector_3; wAxis : in Vector_3; -- The axis to rotate about.
Angle : in Real ) -- The angle to rotate by.
return Vector_3;
--
-- Return a rotated version of Self.
function Angle (Left, Right : in Vector_3) return Real; -- Return the angle between Left and Right.
function Triple (V1, V2, V3 : in Vector_3) return Real; -- Return the triple between V1, V2 and V3.
function furthestAxis (Self : in Vector_3) return math.Index;
function closestAxis (Self : in Vector_3) return math.Index;
procedure setInterpolate3 (Self : in out Vector_3; V1, V2 : in Vector_3;
rt : in Real);
function lerp (V1, V2 : in Vector_3; t : in Real) return Vector_3;
--
-- Return the linear interpolation between V1 and V2.
-- 't' is the ration of V1 to V2 (t = 0 => return V1,
-- t = 1 => return V2)
-- function "*" (L : in math.Vector_3; R : in math.Real) return math.Vector_3;
function Scale (Self : access Vector_3; By : in Vector_3) return Vector_3; -- nb: this replaces impact.d3.Vector& btVector::operator*=(const impact.d3.Vector& v)
-- and operator*(const impact.d3.Vector& v1, const impact.d3.Vector& v2)
-- beware of using default Ada '*' for vectors, by mistake !
--
-- Elementwise multiply of Self by another vector.
function Scaled (Self : in Vector_3; By : in Vector_3) return Vector_3;
function invScaled (Self : in Vector_3; By : in Vector_3) return Vector_3;
procedure setMax (Self : in out Vector_3; Other : in Vector_3); -- Set each element to the max of the current values of 'Self' and the values of 'Other'.
procedure setMin (Self : in out Vector_3; Other : in Vector_3); -- Set each element to the min of the current values of 'Self' and the values of 'Other'.
procedure getSkewSymmetricMatrix (Self : in Vector_3; V1, V2, V3 : out Vector_3);
procedure setZero (Self : out Vector_3);
function isZero (Self : in Vector_3) return Boolean;
function fuzzyZero (Self : in Vector_3) return Boolean;
procedure btPlaneSpace1 (n : in Vector_3; p, q : out Vector_3);
--- Vector_4
--
function absolute4 (Self : in Vector_4) return Vector_4; -- Return a vector will the absolute values of each element.
function minAxis4 (Self : in Vector_4) return math.Index; -- Return the axis with the smallest value.
function maxAxis4 (Self : in Vector_4) return math.Index; -- Return the axis with the largest value.
function closestAxis4 (Self : in Vector_4) return math.Index;
end impact.d3.Vector;
|
programs/oeis/175/A175248.asm | neoneye/loda | 22 | 88240 | <reponame>neoneye/loda<gh_stars>10-100
; A175248: Noncomposites (A008578) with noncomposite (A008578) subscripts.
; 1,2,3,7,13,29,37,53,61,79,107,113,151,173,181,199,239,271,281,317,349,359,397,421,457,503,541,557,577,593,613,701,733,769,787,857,863,911,953,983,1021,1061,1069,1151,1163,1193,1213,1291,1399,1429,1439,1459
seq $0,8578 ; Prime numbers at the beginning of the 20th century (today 1 is no longer regarded as a prime).
seq $0,158611 ; 0, 1 and the primes.
|
programs/oeis/036/A036690.asm | neoneye/loda | 22 | 170260 | ; A036690: Product of a prime and the following number.
; 6,12,30,56,132,182,306,380,552,870,992,1406,1722,1892,2256,2862,3540,3782,4556,5112,5402,6320,6972,8010,9506,10302,10712,11556,11990,12882,16256,17292,18906,19460,22350,22952,24806,26732,28056,30102,32220,32942,36672,37442,39006,39800,44732,49952,51756,52670,54522,57360,58322,63252,66306,69432,72630,73712,77006,79242,80372,86142,94556,97032,98282,100806,109892,113906,120756,122150,124962,129240,135056,139502,144020,147072,151710,158006,161202,167690,175980,177662,186192,187922,193160,196692,202050,209306,212982,214832,218556,229920,237656,241572,249500,253512,259590,271962,274052,293222
seq $0,40 ; The prime numbers.
add $2,$0
mul $0,$2
add $0,$2
|
cwiczenia6/zad3/maxval.asm | adamczykpiotr/AGH_WIMiIP_Architektury_Komputerow | 1 | 25279 | section .text
global maxval
maxval:
mov rbx, rdi ;adres tablicy
mov r12, rsi ;ilosc elementow
xor r14, r14 ;maksymalna wartosc
xor r13, r13 ;licznik petli
_petla:
cmp [rdi+4*r13+4], r14
jb _dalej
mov r14, [rdi+4*r13+4]
_dalej:
inc r13
cmp r13, r12
jl _petla
mov rax, r14
ret
|
programs/oeis/008/A008893.asm | karttu/loda | 1 | 242034 | <gh_stars>1-10
; A008893: Number of equilateral triangles formed by triples of points taken from a hexagonal chunk of side n in the hexagonal lattice.
; 0,8,66,258,710,1590,3108,5516,9108,14220,21230,30558,42666,58058,77280,100920,129608,164016,204858,252890,308910,373758,448316,533508,630300,739700,862758,1000566,1154258,1325010,1514040,1722608,1952016,2203608,2478770,2778930,3105558,3460166,3844308,4259580,4707620,5190108,5708766,6265358,6861690,7499610,8181008,8907816,9682008,10505600,11380650,12309258,13293566,14335758,15438060,16602740,17832108,19128516,20494358,21932070,23444130,25033058,26701416,28451808,30286880,32209320,34221858,36327266,38528358,40827990,43229060,45734508,48347316,51070508,53907150,56860350,59933258,63129066,66451008,69902360,73486440,77206608,81066266,85068858,89217870,93516830,97969308,102578916,107349308,112284180,117387270,122662358,128113266,133743858,139558040,145559760,151753008,158141816,164730258,171522450,178522550,185734758,193163316,200812508,208686660,216790140,225127358,233702766,242520858,251586170,260903280,270476808,280311416,290411808,300782730,311428970,322355358,333566766,345068108,356864340,368960460,381361508,394072566,407098758,420445250,434117250,448120008,462458816,477139008,492165960,507545090,523281858,539381766,555850358,572693220,589915980,607524308,625523916,643920558,662720030,681928170,701550858,721594016,742063608,762965640,784306160,806091258,828327066,851019758,874175550,897800700,921901508,946484316,971555508,997121510,1023188790,1049763858,1076853266,1104463608,1132601520,1161273680,1190486808,1220247666,1250563058,1281439830,1312884870,1344905108,1377507516,1410699108,1444486940,1478878110,1513879758,1549499066,1585743258,1622619600,1660135400,1698298008,1737114816,1776593258,1816740810,1857564990,1899073358,1941273516,1984173108,2027779820,2072101380,2117145558,2162920166,2209433058,2256692130,2304705320,2353480608,2403026016,2453349608,2504459490,2556363810,2609070758,2662588566,2716925508,2772089900,2828090100,2884934508,2942631566,3001189758,3060617610,3120923690,3182116608,3244205016,3307197608,3371103120,3435930330,3501688058,3568385166,3636030558,3704633180,3774202020,3844746108,3916274516,3988796358,4062320790,4136857010,4212414258,4289001816,4366629008,4445305200,4525039800,4605842258,4687722066,4770688758,4854751910,4939921140,5026206108,5113616516,5202162108,5291852670,5382698030,5474708058,5567892666,5662261808,5757825480,5854593720,5952576608,6051784266,6152226858,6253914590,6356857710,6461066508,6566551316,6673322508,6781390500
add $0,1
bin $0,2
mov $1,$0
mov $2,7
mul $2,$0
mul $0,$2
add $1,$0
|
libtool/src/gmp-6.1.2/mpn/ia64/mode1o.asm | kroggen/aergo | 1,602 | 244405 | dnl Itanium-2 mpn_modexact_1c_odd -- mpn by 1 exact remainder.
dnl Contributed to the GNU project by <NAME>.
dnl Copyright 2003-2005 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C Itanium: 15
C Itanium 2: 8
dnl Usage: ABI32(`code')
dnl
dnl Emit the given code only under HAVE_ABI_32.
dnl
define(ABI32,
m4_assert_onearg()
`ifdef(`HAVE_ABI_32',`$1')')
C mp_limb_t mpn_modexact_1c_odd (mp_srcptr src, mp_size_t size,
C mp_limb_t divisor, mp_limb_t carry);
C
C The modexact algorithm is usually conceived as a dependent chain
C
C l = src[i] - c
C q = low(l * inverse)
C c = high(q*divisor) + (src[i]<c)
C
C but we can work the src[i]-c into an xma by calculating si=src[i]*inverse
C separately (off the dependent chain) and using
C
C q = low(c * inverse + si)
C c = high(q*divisor + c)
C
C This means the dependent chain is simply xma.l followed by xma.hu, for a
C total 8 cycles/limb on itanium-2.
C
C The reason xma.hu works for the new c is that the low of q*divisor is
C src[i]-c (being the whole purpose of the q generated, and it can be
C verified algebraically). If there was an underflow from src[i]-c, then
C there will be an overflow from (src-c)+c, thereby adding 1 to the new c
C the same as the borrow bit (src[i]<c) gives in the first style shown.
C
C Incidentally, fcmp is not an option for treating src[i]-c, since it
C apparently traps to the kernel for unnormalized operands like those used
C and generated by ldf8 and xma. On one GNU/Linux system it took about 1200
C cycles.
C
C
C First Limb:
C
C The first limb uses q = (src[0]-c) * inverse shown in the first style.
C This lets us get the first q as soon as the inverse is ready, without
C going through si=s*inverse. Basically at the start we have c and can use
C it while waiting for the inverse, whereas for the second and subsequent
C limbs it's the other way around, ie. we have the inverse and are waiting
C for c.
C
C At .Lentry the first two instructions in the loop have been done already.
C The load of f11=src[1] at the start (predicated on size>=2), and the
C calculation of q by the initial different scheme.
C
C
C Entry Sequence:
C
C In the entry sequence, the critical path is the calculation of the
C inverse, so this is begun first and optimized. Apart from that, ar.lc is
C established nice and early so the br.cloop's should predict perfectly.
C And the load for the low limbs src[0] and src[1] can be initiated long
C ahead of where they're needed.
C
C
C Inverse Calculation:
C
C The initial 8-bit inverse is calculated using a table lookup. If it hits
C L1 (which is likely if we're called several times) then it should take a
C total 4 cycles, otherwise hopefully L2 for 9 cycles. This is considered
C the best approach, on balance. It could be done bitwise, but that would
C probably be about 14 cycles (2 per bit beyond the first couple). Or it
C could be taken from 4 bits to 8 with xmpy doubling as used beyond 8 bits,
C but that would be about 11 cycles.
C
C The table is not the same as binvert_limb_table, instead it's 256 bytes,
C designed to be indexed by the low byte of the divisor. The divisor is
C always odd, so the relevant data is every second byte in the table. The
C padding lets us use zxt1 instead of extr.u, the latter would cost an extra
C cycle because it must go down I0, and we're using the first I0 slot to get
C ip. The extra 128 bytes of padding should be insignificant compared to
C typical ia64 code bloat.
C
C Having the table in .text allows us to use IP-relative addressing,
C avoiding a fetch from ltoff. .rodata is apparently not suitable for use
C IP-relative, it gets a linker relocation overflow on GNU/Linux.
C
C
C Load Scheduling:
C
C In the main loop, the data loads are scheduled for an L2 hit, which means
C 6 cycles for the data ready to use. In fact we end up 7 cycles ahead. In
C any case that scheduling is achieved simply by doing the load (and xmpy.l
C for "si") in the immediately preceding iteration.
C
C The main loop requires size >= 2, and we handle size==1 by an initial
C br.cloop to enter the loop only if size>1. Since ar.lc is established
C early, this should predict perfectly.
C
C
C Not done:
C
C Consideration was given to using a plain "(src[0]-c) % divisor" for
C size==1, but cycle counting suggests about 50 for the sort of approach
C taken by gcc __umodsi3, versus about 47 for the modexact. (Both assuming
C L1 hits for their respective fetching.)
C
C Consideration was given to a test for high<divisor and replacing the last
C loop iteration with instead c-=src[size-1] followed by c+=d if underflow.
C Branching on high<divisor wouldn't be good since a mispredict would cost
C more than the loop iteration saved, and the condition is of course data
C dependent. So the theory would be to shorten the loop count if
C high<divisor, and predicate extra operations at the end. That would mean
C a gain of 6 when high<divisor, or a cost of 2 if not.
C
C Whether such a tradeoff is a win on average depends on assumptions about
C how many bits in the high and the divisor. If both are uniformly
C distributed then high<divisor about 50% of the time. But smallish
C divisors (less chance of high<divisor) might be more likely from
C applications (mpz_divisible_ui, mpz_gcd_ui, etc). Though biggish divisors
C would be normal internally from say mpn/generic/perfsqr.c. On balance,
C for the moment, it's felt the gain is not really enough to be worth the
C trouble.
C
C
C Enhancement:
C
C Process two source limbs per iteration using a two-limb inverse and a
C sequence like
C
C ql = low (c * il + sil) quotient low limb
C qlc = high(c * il + sil)
C qh1 = low (c * ih + sih) quotient high, partial
C
C cl = high (ql * d + c) carry out of low
C qh = low (qlc * 1 + qh1) quotient high limb
C
C new c = high (qh * d + cl) carry out of high
C
C This would be 13 cycles/iteration, giving 6.5 cycles/limb. The two limb
C s*inverse as sih:sil = sh:sl * ih:il would be calculated off the dependent
C chain with 4 multiplies. The bigger inverse would take extra time to
C calculate, but a one limb iteration to handle an odd size could be done as
C soon as 64-bits of inverse were ready.
C
C Perhaps this could even extend to a 3 limb inverse, which might promise 17
C or 18 cycles for 3 limbs, giving 5.66 or 6.0 cycles/limb.
C
ASM_START()
.explicit
.text
.align 32
.Ltable:
data1 0,0x01, 0,0xAB, 0,0xCD, 0,0xB7, 0,0x39, 0,0xA3, 0,0xC5, 0,0xEF
data1 0,0xF1, 0,0x1B, 0,0x3D, 0,0xA7, 0,0x29, 0,0x13, 0,0x35, 0,0xDF
data1 0,0xE1, 0,0x8B, 0,0xAD, 0,0x97, 0,0x19, 0,0x83, 0,0xA5, 0,0xCF
data1 0,0xD1, 0,0xFB, 0,0x1D, 0,0x87, 0,0x09, 0,0xF3, 0,0x15, 0,0xBF
data1 0,0xC1, 0,0x6B, 0,0x8D, 0,0x77, 0,0xF9, 0,0x63, 0,0x85, 0,0xAF
data1 0,0xB1, 0,0xDB, 0,0xFD, 0,0x67, 0,0xE9, 0,0xD3, 0,0xF5, 0,0x9F
data1 0,0xA1, 0,0x4B, 0,0x6D, 0,0x57, 0,0xD9, 0,0x43, 0,0x65, 0,0x8F
data1 0,0x91, 0,0xBB, 0,0xDD, 0,0x47, 0,0xC9, 0,0xB3, 0,0xD5, 0,0x7F
data1 0,0x81, 0,0x2B, 0,0x4D, 0,0x37, 0,0xB9, 0,0x23, 0,0x45, 0,0x6F
data1 0,0x71, 0,0x9B, 0,0xBD, 0,0x27, 0,0xA9, 0,0x93, 0,0xB5, 0,0x5F
data1 0,0x61, 0,0x0B, 0,0x2D, 0,0x17, 0,0x99, 0,0x03, 0,0x25, 0,0x4F
data1 0,0x51, 0,0x7B, 0,0x9D, 0,0x07, 0,0x89, 0,0x73, 0,0x95, 0,0x3F
data1 0,0x41, 0,0xEB, 0,0x0D, 0,0xF7, 0,0x79, 0,0xE3, 0,0x05, 0,0x2F
data1 0,0x31, 0,0x5B, 0,0x7D, 0,0xE7, 0,0x69, 0,0x53, 0,0x75, 0,0x1F
data1 0,0x21, 0,0xCB, 0,0xED, 0,0xD7, 0,0x59, 0,0xC3, 0,0xE5, 0,0x0F
data1 0,0x11, 0,0x3B, 0,0x5D, 0,0xC7, 0,0x49, 0,0x33, 0,0x55, 0,0xFF
PROLOGUE(mpn_modexact_1c_odd)
C r32 src
C r33 size
C r34 divisor
C r35 carry
.prologue
.Lhere:
{ .mmi; add r33 = -1, r33 C M0 size-1
mov r14 = 2 C M1 2
mov r15 = ip C I0 .Lhere
}{.mmi; setf.sig f6 = r34 C M2 divisor
setf.sig f9 = r35 C M3 carry
zxt1 r3 = r34 C I1 divisor low byte
} ;;
{ .mmi; add r3 = .Ltable-.Lhere, r3 C M0 table offset ip and index
sub r16 = 0, r34 C M1 -divisor
.save ar.lc, r2
mov r2 = ar.lc C I0
}{.mmi; .body
setf.sig f13 = r14 C M2 2 in significand
mov r17 = -1 C M3 -1
ABI32(` zxt4 r33 = r33') C I1 size extend
} ;;
{ .mmi; add r3 = r3, r15 C M0 table entry address
ABI32(` addp4 r32 = 0, r32') C M1 src extend
mov ar.lc = r33 C I0 size-1 loop count
}{.mmi; setf.sig f12 = r16 C M2 -divisor
setf.sig f8 = r17 C M3 -1
} ;;
{ .mmi; ld1 r3 = [r3] C M0 inverse, 8 bits
ldf8 f10 = [r32], 8 C M1 src[0]
cmp.ne p6,p0 = 0, r33 C I0 test size!=1
} ;;
C Wait for table load.
C Hope for an L1 hit of 1 cycles to ALU, but could be more.
setf.sig f7 = r3 C M2 inverse, 8 bits
(p6) ldf8 f11 = [r32], 8 C M1 src[1], if size!=1
;;
C 5 cycles
C f6 divisor
C f7 inverse, being calculated
C f8 -1, will be -inverse
C f9 carry
C f10 src[0]
C f11 src[1]
C f12 -divisor
C f13 2
C f14 scratch
xmpy.l f14 = f13, f7 C 2*i
xmpy.l f7 = f7, f7 C i*i
;;
xma.l f7 = f7, f12, f14 C i*i*-d + 2*i, inverse 16 bits
;;
xmpy.l f14 = f13, f7 C 2*i
xmpy.l f7 = f7, f7 C i*i
;;
xma.l f7 = f7, f12, f14 C i*i*-d + 2*i, inverse 32 bits
;;
xmpy.l f14 = f13, f7 C 2*i
xmpy.l f7 = f7, f7 C i*i
;;
xma.l f7 = f7, f12, f14 C i*i*-d + 2*i, inverse 64 bits
xma.l f10 = f9, f8, f10 C sc = c * -1 + src[0]
;;
ASSERT(p6, `
xmpy.l f15 = f6, f7 ;; C divisor*inverse
getf.sig r31 = f15 ;;
cmp.eq p6,p0 = 1, r31 C should == 1
')
xmpy.l f10 = f10, f7 C q = sc * inverse
xmpy.l f8 = f7, f8 C -inverse = inverse * -1
br.cloop.sptk.few.clr .Lentry C main loop, if size > 1
;;
C size==1, finish up now
xma.hu f9 = f10, f6, f9 C c = high(q * divisor + c)
mov ar.lc = r2 C I0
;;
getf.sig r8 = f9 C M2 return c
br.ret.sptk.many b0
.Ltop:
C r2 saved ar.lc
C f6 divisor
C f7 inverse
C f8 -inverse
C f9 carry
C f10 src[i] * inverse
C f11 scratch src[i+1]
add r16 = 160, r32
ldf8 f11 = [r32], 8 C src[i+1]
;;
C 2 cycles
lfetch [r16]
xma.l f10 = f9, f8, f10 C q = c * -inverse + si
;;
C 3 cycles
.Lentry:
xma.hu f9 = f10, f6, f9 C c = high(q * divisor + c)
xmpy.l f10 = f11, f7 C si = src[i] * inverse
br.cloop.sptk.few.clr .Ltop
;;
xma.l f10 = f9, f8, f10 C q = c * -inverse + si
mov ar.lc = r2 C I0
;;
xma.hu f9 = f10, f6, f9 C c = high(q * divisor + c)
;;
getf.sig r8 = f9 C M2 return c
br.ret.sptk.many b0
EPILOGUE()
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1296.asm | ljhsiun2/medusa | 9 | 96158 | <filename>Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_1296.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x6cc9, %r14
and %r9, %r9
mov $0x6162636465666768, %r13
movq %r13, (%r14)
nop
nop
nop
add $19237, %r10
lea addresses_UC_ht+0x1315d, %r14
nop
nop
nop
nop
add %r10, %r10
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
movups %xmm4, (%r14)
nop
nop
nop
nop
nop
inc %r13
lea addresses_UC_ht+0x16b69, %rsi
lea addresses_normal_ht+0x15489, %rdi
nop
nop
add $50643, %rdx
mov $3, %rcx
rep movsb
nop
add $15236, %r10
lea addresses_UC_ht+0x12d5f, %rsi
lea addresses_WT_ht+0xe1c9, %rdi
nop
nop
nop
nop
and %r10, %r10
mov $7, %rcx
rep movsb
nop
and $15248, %r14
lea addresses_A_ht+0x18859, %rsi
lea addresses_normal_ht+0x6f59, %rdi
cmp %r9, %r9
mov $85, %rcx
rep movsl
nop
nop
nop
nop
nop
cmp $4211, %r9
lea addresses_WT_ht+0x7f9d, %r13
mfence
mov $0x6162636465666768, %r9
movq %r9, (%r13)
nop
sub $58370, %r13
lea addresses_D_ht+0x84c9, %r9
nop
nop
nop
and $5650, %r14
mov $0x6162636465666768, %r13
movq %r13, (%r9)
nop
nop
nop
nop
nop
cmp %r14, %r14
lea addresses_A_ht+0x3ac9, %rsi
nop
nop
nop
nop
cmp $53677, %rdi
and $0xffffffffffffffc0, %rsi
vmovaps (%rsi), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r10
nop
and %r13, %r13
lea addresses_D_ht+0x7289, %rsi
lea addresses_A_ht+0x14b09, %rdi
nop
nop
and $27099, %r10
mov $109, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x36e5, %rsi
lea addresses_A_ht+0xbdc9, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $35813, %rdx
mov $127, %rcx
rep movsw
nop
nop
nop
nop
sub $22279, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r14
push %r8
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_D+0x15089, %rsi
lea addresses_PSE+0x30c9, %rdi
nop
xor $52916, %r14
mov $102, %rcx
rep movsl
nop
nop
nop
nop
xor %rdi, %rdi
// Store
mov $0xc9, %rcx
add $30240, %r11
movw $0x5152, (%rcx)
nop
nop
nop
dec %rsi
// Store
lea addresses_A+0x146c9, %rdi
nop
nop
nop
sub %rsi, %rsi
movl $0x51525354, (%rdi)
nop
nop
nop
nop
nop
cmp %r14, %r14
// Store
lea addresses_D+0x1ffb9, %r14
inc %r8
movl $0x51525354, (%r14)
nop
nop
nop
nop
nop
inc %rsi
// Faulty Load
mov $0xef77a0000000cc9, %rcx
clflush (%rcx)
nop
nop
nop
xor %r14, %r14
movb (%rcx), %r8b
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_D'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Miscellaneous/Chip16-Emulator/roms/Sources/GB16.asm | ghivert/Student-Projects | 2 | 87921 | ;GB16 for Chip16
;Shendo 2011
;
;r0 - Logo X coordinate
;r1 - Logo Y coordinate
;r2 - Current logo address
;r3 - Default logo address
;r4 - Maximum Y coordinate
;ra - Number of frames to wait
;
cls ;Start clean
spr #0F50 ;160x14 px sprite
ldi r0, 75 ;Default logo X coordinate
ldi r1, 0 ;Default logo Y coordinate
ldi r2, c16_logo ;Load logo address
ldi r3, c16_logo ;Load logo address
ldi r4, 100 ;Maximum allowed Y offset
addi r2, 1120 ;Increase logo offset (right after logo)
bgc #A ;Light green background
ldi ra, 30 ;Number of frames to wait
call wait_frames ;Wait for required number of frames
:start
ldi ra, 2 ;Number of frames to wait
call wait_frames ;Wait for required number of frames
cls ;Clear screen
bgc #A ;Light green background
drw r0, r1, r2 ;Draw logo on screen
jme r2, r3, increase_y ;Skip decreasing logo offset if logo is visible
subi r2, 160 ;Decrease logo offset
jmp start ;Draw new frame
:increase_y
addi r1, 2 ;Increment Y coordinate
jme r1, r4, play_sound ;Check if max Y has been reached
jmp start ;Draw new frame
:play_sound
snd2, 100 ;Play 500 Hz sound for 100 ms
ldi ra, 8 ;Wait 3 frames
call wait_frames ;Go to wait subroutine
snd3, 350 ;Play 1500 Hz sound for 350 ms
:loop
jmp loop ;Endless loop
:wait_frames ;Wait for required number of frames
vblnk ;Wait for VBlank
subi ra, 1 ;Decrement frame counter
jz wait_end ;Break the loop
jmp wait_frames ;Wait for another frame
:wait_end
ret
:c16_logo
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #90
db #00
db #09
db #99
db #90
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #99
db #99
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #00
db #09
db #99
db #90
db #00
db #09
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #99
db #00 |
src/pp/block5/cc/pascal/ArrayPascal.g4 | Pieterjaninfo/PP | 0 | 1502 | <reponame>Pieterjaninfo/PP
grammar ArrayPascal;
import SimplePascal;
/** Target of an assignment.
* Extends the imported rule with an array target.
*/
target
: ID #idTarget
| ID LSQ expr RSQ #arrayTarget
;
/** Expression.
* Extends the imported rule with indexed and array expressions.
*/
expr: prfOp expr #prfExpr
| expr multOp expr #plusExpr
| expr plusOp expr #plusExpr
| expr boolOp expr #boolExpr
| expr compOp expr #compExpr
| LPAR expr RPAR #parExpr
| ID #idExpr
| NUM #numExpr
| TRUE #trueExpr
| FALSE #falseExpr
| ID LSQ expr RSQ #indexExpr
| LSQ (expr (COMMA expr)*)? RSQ
#arrayExpr
;
/** Data type.
* Extends the imported rule with array types. */
type: INTEGER #intType
| BOOLEAN #boolType
| ARRAY LSQ bound DOTDOT bound RSQ OF type
#arrayType
;
/** Array upper or lowed bound. */
bound : MINUS? NUM;
// Keywords
ARRAY: A R R A Y;
OF: O F ;
DOTDOT: '..';
LSQ: '[';
RSQ: ']'; |
sw/552tests/rand_simple/t_1_xori.asm | JPShen-UWM/ThreadKraken | 1 | 178462 | <reponame>JPShen-UWM/ThreadKraken<filename>sw/552tests/rand_simple/t_1_xori.asm
// seed 1
lbi r0, 14 // icount 0
slbi r0, 11 // icount 1
lbi r1, 245 // icount 2
slbi r1, 73 // icount 3
lbi r2, 201 // icount 4
slbi r2, 216 // icount 5
lbi r3, 252 // icount 6
slbi r3, 190 // icount 7
lbi r4, 214 // icount 8
slbi r4, 25 // icount 9
lbi r5, 78 // icount 10
slbi r5, 133 // icount 11
lbi r6, 17 // icount 12
slbi r6, 113 // icount 13
lbi r7, 211 // icount 14
slbi r7, 110 // icount 15
xori r1, r7, 11 // icount 16
xori r1, r7, 0 // icount 17
xori r3, r6, 9 // icount 18
xori r1, r2, 4 // icount 19
xori r3, r6, 0 // icount 20
xori r5, r2, 14 // icount 21
xori r1, r0, 3 // icount 22
xori r5, r1, 7 // icount 23
xori r1, r5, 4 // icount 24
xori r0, r5, 14 // icount 25
xori r2, r5, 15 // icount 26
xori r3, r6, 2 // icount 27
xori r4, r2, 5 // icount 28
xori r2, r2, 14 // icount 29
xori r1, r4, 12 // icount 30
xori r6, r6, 1 // icount 31
halt // icount 32
|
oeis/132/A132190.asm | neoneye/loda-programs | 11 | 245989 | <reponame>neoneye/loda-programs
; A132190: Numbers n such that 7*n^2 + 1 is prime.
; Submitted by <NAME>(w2)
; 2,4,8,10,12,14,18,20,22,26,30,34,44,46,58,66,68,70,74,76,78,84,90,96,100,106,108,110,120,128,134,140,146,152,154,156,158,162,164,168,174,184,186,188,196,200,202,210,216,228,232,238,250,252,260,262,264,268
mov $2,332202
lpb $2
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $5,$1
add $1,4
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
add $5,$1
mov $6,$5
mul $6,7
lpe
mov $0,$1
div $0,4
mul $0,2
|
include/sf-network-packet.adb | danva994/ASFML-1.6 | 1 | 2791 | <filename>include/sf-network-packet.adb
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 <NAME> (<EMAIL>)
-- //
-- // This software is provided 'as-is', without any express or implied warranty.
-- // In no event will the authors be held liable for any damages arising from the use of this software.
-- //
-- // Permission is granted to anyone to use this software for any purpose,
-- // including commercial applications, and to alter it and redistribute it freely,
-- // subject to the following restrictions:
-- //
-- // 1. The origin of this software must not be misrepresented;
-- // you must not claim that you wrote the original software.
-- // If you use this software in a product, an acknowledgment
-- // in the product documentation would be appreciated but is not required.
-- //
-- // 2. Altered source versions must be plainly marked as such,
-- // and must not be misrepresented as being the original software.
-- //
-- // 3. This notice may not be removed or altered from any source distribution.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Interfaces.C.Strings;
package body Sf.Network.Packet is
use Interfaces.C.Strings;
-- ////////////////////////////////////////////////////////////
-- /// Functions to extract data from a packet
-- ///
-- /// \param Packet : Packet to read
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfPacket_ReadString (Packet : sfPacket_Ptr; Str : out String) is
procedure Internal (Packet : sfPacket_Ptr; Str : chars_ptr);
pragma Import (C, Internal, "sfPacket_ReadString");
Temp : chars_ptr;
begin
Internal (Packet, Temp);
Str := Value (Temp) (Str'RANGE);
Free (Temp);
end sfPacket_ReadString;
-- ////////////////////////////////////////////////////////////
-- /// Functions to insert data into a packet
-- ///
-- /// \param Packet : Packet to write
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfPacket_WriteString (Packet : sfPacket_Ptr; Str : String) is
procedure Internal (Packet : sfPacket_Ptr; Str : chars_ptr);
pragma Import (C, Internal, "sfPacket_WriteString");
Temp : chars_ptr := New_String (Str);
begin
Internal (Packet, Temp);
Free (Temp);
end sfPacket_WriteString;
end Sf.Network.Packet;
|
P6/P6Judger - 100 testpoints/testpoint/testpoint81.asm | flyinglandlord/BUAA-CO-2021 | 5 | 1605 | ori $1, $0, 0
ori $2, $0, 12
ori $3, $0, 14
ori $4, $0, 3
sw $3, 0($0)
sw $2, 4($0)
sw $2, 8($0)
sw $2, 12($0)
sw $3, 16($0)
sw $4, 20($0)
sw $3, 24($0)
sw $1, 28($0)
sw $2, 32($0)
sw $2, 36($0)
sw $2, 40($0)
sw $2, 44($0)
sw $4, 48($0)
sw $4, 52($0)
sw $1, 56($0)
sw $1, 60($0)
sw $3, 64($0)
sw $2, 68($0)
sw $2, 72($0)
sw $4, 76($0)
sw $3, 80($0)
sw $4, 84($0)
sw $4, 88($0)
sw $4, 92($0)
sw $1, 96($0)
sw $2, 100($0)
sw $3, 104($0)
sw $4, 108($0)
sw $4, 112($0)
sw $1, 116($0)
sw $3, 120($0)
sw $2, 124($0)
bgez $2, TAG1
sw $2, 0($2)
bgez $2, TAG1
mtlo $2
TAG1:
sh $2, 0($2)
slti $1, $2, 2
sb $2, 0($2)
bgtz $1, TAG2
TAG2:
lui $3, 12
sb $3, 0($1)
sll $0, $0, 0
mfhi $1
TAG3:
lui $4, 5
beq $1, $4, TAG4
mflo $3
sll $0, $0, 0
TAG4:
sw $1, 0($1)
blez $1, TAG5
mthi $1
sltiu $1, $1, 0
TAG5:
mflo $1
mfhi $3
lh $1, 0($1)
beq $3, $1, TAG6
TAG6:
mfhi $3
sh $3, 0($1)
addiu $1, $1, 9
mfhi $2
TAG7:
mtlo $2
lh $4, 0($2)
bgtz $4, TAG8
lw $1, 0($4)
TAG8:
andi $4, $1, 7
mfhi $2
bltz $1, TAG9
lhu $3, 0($2)
TAG9:
lbu $4, 0($3)
and $3, $4, $3
sra $4, $4, 5
lui $4, 11
TAG10:
lui $1, 8
sll $0, $0, 0
blez $2, TAG11
sltiu $3, $2, 6
TAG11:
lb $2, 0($3)
subu $2, $3, $2
sllv $1, $2, $2
sltu $3, $3, $2
TAG12:
mult $3, $3
mtlo $3
mthi $3
sltiu $1, $3, 1
TAG13:
sb $1, 0($1)
andi $1, $1, 8
mfhi $2
bltz $2, TAG14
TAG14:
mfhi $3
lui $2, 2
addu $3, $3, $2
subu $4, $3, $2
TAG15:
sll $2, $4, 14
or $4, $2, $4
sb $4, 0($4)
bgez $4, TAG16
TAG16:
lui $2, 10
sll $1, $2, 3
lui $1, 1
mfhi $1
TAG17:
multu $1, $1
mflo $3
multu $3, $1
lui $4, 11
TAG18:
lui $2, 3
sll $0, $0, 0
beq $2, $2, TAG19
sll $4, $4, 11
TAG19:
bgtz $4, TAG20
mflo $1
mtlo $1
sh $1, 0($4)
TAG20:
addi $2, $1, 6
mthi $2
lhu $1, 0($2)
xor $3, $2, $1
TAG21:
mtlo $3
bgez $3, TAG22
multu $3, $3
bne $3, $3, TAG22
TAG22:
divu $3, $3
ori $3, $3, 12
beq $3, $3, TAG23
sh $3, 0($3)
TAG23:
sllv $4, $3, $3
bgez $4, TAG24
mthi $4
lui $4, 14
TAG24:
lui $2, 3
divu $4, $2
lui $2, 14
beq $2, $2, TAG25
TAG25:
lui $1, 1
sll $0, $0, 0
sll $0, $0, 0
slti $4, $2, 2
TAG26:
slti $3, $4, 1
mult $3, $4
sw $4, 0($4)
mtlo $3
TAG27:
srl $4, $3, 7
mtlo $4
ori $3, $3, 8
slt $3, $3, $3
TAG28:
lh $3, 0($3)
sllv $4, $3, $3
slti $1, $4, 5
sh $3, 0($4)
TAG29:
lb $2, 0($1)
sw $1, 0($2)
mthi $2
slt $4, $2, $1
TAG30:
bne $4, $4, TAG31
ori $1, $4, 10
bne $1, $1, TAG31
mfhi $3
TAG31:
andi $4, $3, 6
xor $1, $3, $4
lbu $3, 0($3)
bne $1, $3, TAG32
TAG32:
xori $2, $3, 10
mfhi $3
lui $2, 0
lh $3, 0($2)
TAG33:
mflo $4
lbu $3, 0($4)
sb $4, 0($3)
mthi $3
TAG34:
mult $3, $3
lui $4, 0
lui $3, 3
beq $3, $4, TAG35
TAG35:
sll $1, $3, 7
or $1, $1, $1
mthi $3
mtlo $3
TAG36:
multu $1, $1
beq $1, $1, TAG37
sll $0, $0, 0
sra $4, $1, 2
TAG37:
slti $3, $4, 10
mthi $4
mthi $4
mflo $1
TAG38:
lui $4, 14
slti $2, $4, 4
lui $3, 15
lui $4, 12
TAG39:
lui $2, 13
sll $0, $0, 0
sll $0, $0, 0
mthi $2
TAG40:
and $2, $2, $2
bne $2, $2, TAG41
mfhi $4
sll $0, $0, 0
TAG41:
blez $4, TAG42
sll $0, $0, 0
mflo $1
bne $1, $4, TAG42
TAG42:
mfhi $1
sll $0, $0, 0
sll $0, $0, 0
bgtz $1, TAG43
TAG43:
mtlo $2
nor $1, $2, $2
and $4, $1, $1
srlv $2, $2, $1
TAG44:
sb $2, 0($2)
lui $3, 5
beq $3, $3, TAG45
sh $2, 0($2)
TAG45:
sllv $1, $3, $3
divu $3, $3
sll $0, $0, 0
lui $1, 13
TAG46:
sll $0, $0, 0
mthi $3
sra $1, $3, 13
blez $1, TAG47
TAG47:
mthi $1
mflo $2
xori $3, $2, 8
multu $2, $3
TAG48:
addiu $4, $3, 13
mult $3, $3
addu $4, $4, $4
bgtz $4, TAG49
TAG49:
mfhi $4
lui $3, 12
mtlo $3
sh $3, 0($4)
TAG50:
sll $0, $0, 0
bgtz $3, TAG51
lb $2, 0($2)
mthi $3
TAG51:
multu $2, $2
bltz $2, TAG52
lui $3, 6
bgtz $2, TAG52
TAG52:
sll $0, $0, 0
or $1, $3, $3
mthi $1
mtlo $3
TAG53:
mtlo $1
mult $1, $1
divu $1, $1
sll $0, $0, 0
TAG54:
sll $2, $2, 8
sw $2, 0($2)
sh $2, 0($2)
mult $2, $2
TAG55:
sb $2, 0($2)
lui $3, 3
sllv $3, $3, $3
mthi $3
TAG56:
mfhi $3
mtlo $3
sll $0, $0, 0
blez $1, TAG57
TAG57:
addu $2, $1, $1
beq $1, $2, TAG58
lui $4, 3
subu $4, $2, $1
TAG58:
mult $4, $4
sll $0, $0, 0
bltz $4, TAG59
sltu $3, $4, $4
TAG59:
sll $3, $3, 1
lb $1, 0($3)
srl $3, $3, 8
mthi $3
TAG60:
lw $2, 0($3)
bne $3, $3, TAG61
lh $3, 0($2)
mfhi $1
TAG61:
lbu $1, 0($1)
sw $1, 0($1)
multu $1, $1
xori $4, $1, 5
TAG62:
lui $3, 4
bne $4, $4, TAG63
addu $3, $4, $3
multu $4, $3
TAG63:
blez $3, TAG64
addu $2, $3, $3
div $3, $3
bgtz $2, TAG64
TAG64:
addu $2, $2, $2
addiu $2, $2, 11
sll $0, $0, 0
mflo $3
TAG65:
addu $3, $3, $3
slti $3, $3, 15
beq $3, $3, TAG66
subu $4, $3, $3
TAG66:
srl $1, $4, 4
mfhi $2
bgtz $2, TAG67
multu $2, $4
TAG67:
mult $2, $2
sub $1, $2, $2
srlv $2, $1, $1
mfhi $3
TAG68:
bne $3, $3, TAG69
lw $2, 0($3)
slt $1, $2, $2
beq $3, $3, TAG69
TAG69:
mfhi $4
mthi $1
andi $1, $4, 15
mult $1, $1
TAG70:
mfhi $1
beq $1, $1, TAG71
lui $3, 11
mflo $4
TAG71:
mult $4, $4
sb $4, 0($4)
sra $4, $4, 10
lh $3, 0($4)
TAG72:
bgtz $3, TAG73
mult $3, $3
sh $3, 0($3)
lui $4, 8
TAG73:
lui $1, 0
sltiu $2, $4, 1
divu $4, $4
sll $0, $0, 0
TAG74:
mtlo $2
sh $2, 0($2)
bgtz $2, TAG75
mtlo $2
TAG75:
lui $3, 13
blez $2, TAG76
xori $3, $3, 11
mfhi $3
TAG76:
lui $3, 9
mult $3, $3
bne $3, $3, TAG77
mtlo $3
TAG77:
xori $2, $3, 9
sll $0, $0, 0
lhu $2, 0($1)
sb $2, 0($2)
TAG78:
mthi $2
lh $3, 0($2)
mtlo $2
blez $2, TAG79
TAG79:
xori $4, $3, 6
lhu $3, 0($4)
xori $4, $4, 5
and $1, $3, $3
TAG80:
mfhi $1
xor $1, $1, $1
lw $4, 0($1)
mtlo $1
TAG81:
blez $4, TAG82
multu $4, $4
lw $4, 0($4)
add $4, $4, $4
TAG82:
mfhi $3
sw $4, 0($3)
beq $4, $4, TAG83
mthi $3
TAG83:
add $1, $3, $3
mtlo $3
mtlo $3
mult $3, $1
TAG84:
mflo $2
mult $2, $1
beq $2, $1, TAG85
srl $2, $2, 8
TAG85:
mtlo $2
beq $2, $2, TAG86
mflo $1
beq $1, $1, TAG86
TAG86:
lh $4, 0($1)
lw $2, 0($1)
mthi $2
ori $2, $2, 15
TAG87:
mfhi $1
mfhi $4
sh $2, 0($1)
bltz $4, TAG88
TAG88:
lui $4, 11
srl $4, $4, 14
mflo $2
srl $1, $2, 2
TAG89:
bltz $1, TAG90
sra $3, $1, 14
srav $2, $1, $3
sb $2, 0($2)
TAG90:
bgtz $2, TAG91
mfhi $4
beq $2, $4, TAG91
mtlo $2
TAG91:
lui $2, 5
multu $4, $2
lh $1, 0($4)
mult $2, $4
TAG92:
xor $2, $1, $1
lb $1, 0($2)
mflo $2
lhu $2, 0($1)
TAG93:
bltz $2, TAG94
addu $3, $2, $2
sh $3, 0($2)
sll $3, $3, 7
TAG94:
beq $3, $3, TAG95
mtlo $3
bne $3, $3, TAG95
subu $1, $3, $3
TAG95:
bne $1, $1, TAG96
lb $3, 0($1)
bgez $1, TAG96
sltu $2, $1, $1
TAG96:
mthi $2
beq $2, $2, TAG97
sra $3, $2, 14
lbu $1, 0($2)
TAG97:
lb $4, 0($1)
mthi $1
sltiu $2, $4, 11
mthi $4
TAG98:
lui $1, 11
beq $1, $1, TAG99
lui $2, 6
sllv $1, $2, $2
TAG99:
lui $1, 2
sll $0, $0, 0
sll $0, $0, 0
beq $1, $4, TAG100
TAG100:
lui $2, 6
bgez $4, TAG101
sh $4, 0($4)
slt $3, $2, $4
TAG101:
mult $3, $3
bne $3, $3, TAG102
sh $3, 0($3)
slt $4, $3, $3
TAG102:
lh $3, 0($4)
add $2, $3, $3
sh $4, 0($2)
sb $3, 0($2)
TAG103:
mfhi $3
mfhi $2
mthi $3
sb $3, 0($2)
TAG104:
bltz $2, TAG105
lui $4, 11
subu $2, $2, $2
mult $4, $2
TAG105:
mfhi $2
lui $3, 15
addu $3, $2, $2
sltiu $4, $3, 11
TAG106:
lui $1, 7
or $2, $4, $1
sll $0, $0, 0
slti $4, $1, 2
TAG107:
mflo $1
lui $1, 9
ori $3, $1, 5
sll $0, $0, 0
TAG108:
sll $0, $0, 0
blez $3, TAG109
lui $1, 11
mfhi $4
TAG109:
mthi $4
bltz $4, TAG110
lui $4, 3
sll $0, $0, 0
TAG110:
sll $0, $0, 0
srav $4, $3, $3
div $4, $4
sll $0, $0, 0
TAG111:
mtlo $4
sb $4, -18432($4)
slti $3, $4, 13
lui $3, 10
TAG112:
mflo $1
bne $3, $1, TAG113
addu $4, $1, $1
add $2, $3, $4
TAG113:
mfhi $1
mtlo $2
lbu $2, 0($1)
lui $3, 2
TAG114:
blez $3, TAG115
sll $2, $3, 1
mtlo $3
xor $4, $2, $2
TAG115:
bgez $4, TAG116
srl $2, $4, 0
lhu $2, 0($4)
sh $2, 0($2)
TAG116:
lhu $1, 0($2)
mult $2, $2
mtlo $2
beq $1, $2, TAG117
TAG117:
mthi $1
sh $1, 0($1)
ori $2, $1, 10
mult $2, $1
TAG118:
lb $3, 0($2)
multu $2, $2
mflo $4
mtlo $4
TAG119:
subu $3, $4, $4
beq $3, $4, TAG120
sw $3, 0($3)
mfhi $4
TAG120:
mtlo $4
lh $4, 0($4)
mult $4, $4
sw $4, 0($4)
TAG121:
lui $2, 1
sh $2, 0($4)
blez $4, TAG122
sll $0, $0, 0
TAG122:
srl $1, $2, 8
lui $4, 11
mtlo $2
mthi $1
TAG123:
slt $1, $4, $4
mflo $2
bne $1, $2, TAG124
ori $2, $2, 8
TAG124:
mthi $2
sll $0, $0, 0
bgez $2, TAG125
sll $0, $0, 0
TAG125:
bltz $3, TAG126
sw $3, 0($3)
mfhi $1
div $3, $1
TAG126:
mthi $1
xori $2, $1, 8
mthi $1
lui $3, 4
TAG127:
slti $2, $3, 10
lui $4, 5
srav $2, $4, $3
lui $4, 14
TAG128:
bne $4, $4, TAG129
lui $1, 14
mfhi $1
srlv $3, $1, $4
TAG129:
mthi $3
bltz $3, TAG130
lui $2, 9
nor $2, $2, $2
TAG130:
sll $0, $0, 0
sll $0, $0, 0
mflo $2
lui $4, 14
TAG131:
bne $4, $4, TAG132
mflo $3
lui $2, 4
bgez $3, TAG132
TAG132:
sll $0, $0, 0
bgtz $2, TAG133
xor $1, $2, $2
bltz $2, TAG133
TAG133:
mflo $2
mult $1, $1
bgtz $2, TAG134
mthi $1
TAG134:
bgtz $2, TAG135
sh $2, 0($2)
sb $2, 0($2)
lui $1, 12
TAG135:
div $1, $1
mult $1, $1
or $3, $1, $1
sra $3, $1, 2
TAG136:
sll $0, $0, 0
mult $3, $1
bltz $3, TAG137
sll $3, $3, 12
TAG137:
lui $1, 1
lui $2, 0
mfhi $1
sll $0, $0, 0
TAG138:
sll $0, $0, 0
sll $0, $0, 0
mthi $2
addi $1, $2, 6
TAG139:
mfhi $3
mtlo $1
mthi $3
blez $3, TAG140
TAG140:
sh $3, 0($3)
nor $4, $3, $3
addu $2, $4, $4
divu $2, $2
TAG141:
bltz $2, TAG142
lh $2, 2($2)
lb $1, 0($2)
bltz $2, TAG142
TAG142:
mtlo $1
div $1, $1
lb $4, 0($1)
lui $3, 7
TAG143:
bgtz $3, TAG144
div $3, $3
lw $4, 0($3)
bne $3, $3, TAG144
TAG144:
lui $3, 13
sltiu $1, $4, 7
mfhi $2
lui $3, 1
TAG145:
mflo $1
mfhi $2
lui $4, 10
sll $0, $0, 0
TAG146:
srl $3, $4, 2
mthi $3
mfhi $1
sll $0, $0, 0
TAG147:
sll $0, $0, 0
bne $3, $3, TAG148
sll $0, $0, 0
beq $2, $2, TAG148
TAG148:
mtlo $2
bgez $2, TAG149
lbu $3, 0($2)
bne $2, $3, TAG149
TAG149:
sh $3, 0($3)
lui $1, 1
sltu $4, $1, $3
mult $1, $1
TAG150:
mult $4, $4
mflo $3
beq $3, $3, TAG151
multu $3, $3
TAG151:
mtlo $3
mflo $3
sltu $2, $3, $3
multu $2, $3
TAG152:
mult $2, $2
bgtz $2, TAG153
lh $4, 0($2)
mfhi $3
TAG153:
sltiu $2, $3, 15
xor $3, $2, $2
lui $4, 15
lui $3, 0
TAG154:
bgez $3, TAG155
mthi $3
andi $1, $3, 11
srl $1, $3, 1
TAG155:
sll $0, $0, 0
mtlo $1
mthi $1
sb $2, 0($2)
TAG156:
mult $2, $2
mthi $2
lui $1, 5
beq $1, $2, TAG157
TAG157:
sll $0, $0, 0
bltz $1, TAG158
sll $0, $0, 0
lui $4, 9
TAG158:
srav $4, $4, $4
sll $0, $0, 0
subu $2, $4, $4
mflo $4
TAG159:
lui $1, 2
sb $4, 0($4)
mfhi $1
bgtz $1, TAG160
TAG160:
sra $4, $1, 3
or $2, $4, $4
addi $4, $4, 10
bgtz $4, TAG161
TAG161:
lbu $2, 0($4)
mfhi $1
addiu $2, $1, 3
mult $1, $2
TAG162:
sh $2, 0($2)
addu $2, $2, $2
subu $3, $2, $2
multu $2, $3
TAG163:
multu $3, $3
lui $4, 13
mflo $4
addu $3, $4, $3
TAG164:
multu $3, $3
sb $3, 0($3)
mfhi $3
sb $3, 0($3)
TAG165:
lhu $1, 0($3)
beq $3, $1, TAG166
ori $2, $1, 10
mtlo $3
TAG166:
lui $3, 5
mfhi $1
mthi $1
mtlo $1
TAG167:
nor $3, $1, $1
addiu $4, $3, 3
sb $1, 0($4)
mthi $4
TAG168:
mflo $2
ori $1, $4, 13
lui $1, 12
sll $0, $0, 0
TAG169:
lui $3, 13
bltz $3, TAG170
mflo $4
bgtz $2, TAG170
TAG170:
lb $3, 0($4)
sh $4, 0($3)
mtlo $4
sh $3, 0($3)
TAG171:
lh $2, 0($3)
multu $2, $3
sw $3, 0($3)
mthi $2
TAG172:
sb $2, 0($2)
mthi $2
lui $1, 7
multu $2, $1
TAG173:
blez $1, TAG174
mflo $3
addiu $2, $1, 9
mflo $1
TAG174:
lui $3, 8
mtlo $1
lui $2, 15
sllv $3, $2, $2
TAG175:
lui $1, 13
srl $3, $3, 0
sllv $3, $3, $3
sll $0, $0, 0
TAG176:
mult $2, $2
div $2, $2
sll $0, $0, 0
lui $3, 11
TAG177:
sll $0, $0, 0
lui $3, 2
sll $0, $0, 0
lui $3, 9
TAG178:
sll $0, $0, 0
mthi $3
sllv $2, $3, $3
lui $3, 13
TAG179:
mthi $3
bgez $3, TAG180
lui $1, 1
sb $3, 0($1)
TAG180:
sll $0, $0, 0
srlv $4, $4, $1
lui $3, 11
sll $0, $0, 0
TAG181:
srl $4, $3, 13
beq $3, $3, TAG182
sll $0, $0, 0
bne $3, $4, TAG182
TAG182:
sb $4, 0($4)
ori $3, $4, 13
sra $3, $4, 4
srl $2, $4, 0
TAG183:
lhu $2, 0($2)
slt $4, $2, $2
mtlo $2
srlv $3, $2, $4
TAG184:
mtlo $3
mflo $2
lw $2, 0($2)
mult $2, $3
TAG185:
lbu $1, 0($2)
addiu $1, $2, 6
mult $1, $2
mflo $3
TAG186:
bgtz $3, TAG187
lui $4, 10
sw $4, 0($4)
xor $3, $3, $4
TAG187:
sb $3, -8272($3)
divu $3, $3
mflo $4
lhu $4, -8272($3)
TAG188:
beq $4, $4, TAG189
lui $2, 4
lui $3, 8
lh $2, 0($3)
TAG189:
sll $0, $0, 0
mfhi $4
slt $2, $2, $2
xor $1, $2, $2
TAG190:
mflo $2
mfhi $1
sb $2, 0($1)
sb $1, 0($2)
TAG191:
addiu $1, $1, 6
sltiu $2, $1, 5
bltz $2, TAG192
mflo $1
TAG192:
mthi $1
mthi $1
multu $1, $1
sb $1, 0($1)
TAG193:
mthi $1
lb $4, 0($1)
div $4, $1
beq $1, $4, TAG194
TAG194:
addu $4, $4, $4
div $4, $4
mthi $4
lhu $3, 0($4)
TAG195:
beq $3, $3, TAG196
addu $1, $3, $3
bltz $1, TAG196
add $3, $3, $3
TAG196:
bne $3, $3, TAG197
sltiu $2, $3, 12
beq $2, $3, TAG197
xori $2, $2, 14
TAG197:
xor $2, $2, $2
sh $2, 0($2)
addi $1, $2, 6
sh $2, 0($2)
TAG198:
beq $1, $1, TAG199
multu $1, $1
sw $1, 0($1)
mtlo $1
TAG199:
mflo $4
mthi $1
addiu $3, $1, 5
lui $4, 0
TAG200:
bgez $4, TAG201
srav $4, $4, $4
blez $4, TAG201
lui $3, 12
TAG201:
or $4, $3, $3
lui $4, 14
multu $4, $4
multu $3, $4
TAG202:
sll $0, $0, 0
sltiu $1, $2, 1
bne $2, $2, TAG203
mtlo $1
TAG203:
bgtz $1, TAG204
andi $3, $1, 11
addu $4, $1, $1
mfhi $3
TAG204:
mflo $4
addiu $4, $3, 11
mthi $3
beq $4, $3, TAG205
TAG205:
lui $1, 9
sltiu $1, $1, 11
mult $1, $1
bltz $4, TAG206
TAG206:
sw $1, 0($1)
mflo $3
ori $1, $1, 11
lui $4, 10
TAG207:
mthi $4
bltz $4, TAG208
sll $0, $0, 0
xori $4, $4, 10
TAG208:
xori $2, $4, 11
xori $3, $2, 0
sll $0, $0, 0
bne $3, $3, TAG209
TAG209:
slt $2, $3, $3
sra $2, $2, 6
beq $3, $2, TAG210
mult $3, $2
TAG210:
mfhi $3
blez $2, TAG211
mfhi $2
srlv $2, $2, $3
TAG211:
mtlo $2
sltu $4, $2, $2
bne $2, $4, TAG212
sw $2, 0($2)
TAG212:
mtlo $4
ori $3, $4, 0
or $4, $3, $4
bgtz $4, TAG213
TAG213:
addiu $3, $4, 5
mflo $1
mfhi $1
beq $1, $3, TAG214
TAG214:
multu $1, $1
mflo $3
bgez $1, TAG215
multu $3, $3
TAG215:
lw $2, 0($3)
beq $2, $2, TAG216
lbu $3, 0($2)
add $4, $3, $3
TAG216:
lw $3, 0($4)
sltiu $4, $3, 12
mfhi $2
beq $2, $4, TAG217
TAG217:
lh $1, 0($2)
mtlo $2
andi $3, $2, 14
bgtz $1, TAG218
TAG218:
mult $3, $3
mult $3, $3
mfhi $1
lui $3, 15
TAG219:
multu $3, $3
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG220:
lui $3, 12
mflo $2
bgez $3, TAG221
mflo $4
TAG221:
srlv $1, $4, $4
sb $4, 0($1)
beq $1, $4, TAG222
mfhi $2
TAG222:
mthi $2
sll $2, $2, 12
sll $0, $0, 0
div $2, $2
TAG223:
lhu $1, 0($1)
mult $1, $1
lw $3, 0($1)
sb $1, 0($3)
TAG224:
mtlo $3
bgez $3, TAG225
sra $4, $3, 6
lh $4, 0($4)
TAG225:
nor $2, $4, $4
lui $3, 5
mflo $3
lui $3, 0
TAG226:
lui $3, 3
mflo $4
mult $4, $3
mtlo $3
TAG227:
sh $4, 0($4)
mfhi $3
subu $1, $3, $4
lw $4, 0($3)
TAG228:
lbu $2, 0($4)
mthi $4
lbu $3, 0($4)
srl $4, $4, 9
TAG229:
sw $4, 0($4)
sw $4, 0($4)
mflo $2
mult $2, $4
TAG230:
lui $3, 6
blez $2, TAG231
lui $4, 1
lui $3, 3
TAG231:
lui $1, 0
sll $0, $0, 0
mult $3, $3
sra $4, $1, 14
TAG232:
srl $1, $4, 1
sb $4, 0($4)
mult $1, $1
lhu $1, 0($4)
TAG233:
multu $1, $1
mtlo $1
lh $2, 0($1)
mfhi $3
TAG234:
or $4, $3, $3
lb $1, 0($3)
mflo $3
mflo $1
TAG235:
bne $1, $1, TAG236
ori $4, $1, 9
mtlo $4
lw $1, 0($1)
TAG236:
sh $1, 0($1)
mult $1, $1
slti $3, $1, 8
bltz $3, TAG237
TAG237:
lb $3, 0($3)
xor $3, $3, $3
mult $3, $3
mult $3, $3
TAG238:
andi $3, $3, 1
mthi $3
lbu $3, 0($3)
lh $2, 0($3)
TAG239:
beq $2, $2, TAG240
mtlo $2
lhu $1, 0($2)
lui $2, 9
TAG240:
lb $3, 0($2)
mthi $2
lb $2, 0($3)
add $1, $2, $3
TAG241:
sub $2, $1, $1
xori $4, $1, 11
blez $4, TAG242
addu $2, $1, $1
TAG242:
mfhi $1
nor $4, $2, $1
mult $1, $1
divu $2, $4
TAG243:
mflo $1
bgtz $4, TAG244
xori $3, $4, 0
srl $3, $1, 11
TAG244:
mult $3, $3
bne $3, $3, TAG245
addu $1, $3, $3
mthi $1
TAG245:
bgtz $1, TAG246
mthi $1
sra $4, $1, 13
lui $3, 13
TAG246:
ori $2, $3, 14
bne $2, $2, TAG247
mthi $2
addiu $2, $3, 5
TAG247:
lui $4, 3
divu $2, $4
bltz $4, TAG248
sll $0, $0, 0
TAG248:
bgtz $4, TAG249
addiu $1, $4, 7
slti $1, $1, 4
lhu $4, 0($4)
TAG249:
beq $4, $4, TAG250
sll $0, $0, 0
bgez $4, TAG250
mfhi $1
TAG250:
bgtz $1, TAG251
multu $1, $1
lb $3, 0($1)
bltz $3, TAG251
TAG251:
ori $2, $3, 6
mfhi $1
bltz $1, TAG252
mtlo $2
TAG252:
sb $1, 0($1)
mthi $1
lui $2, 7
divu $2, $2
TAG253:
lui $4, 11
sll $0, $0, 0
ori $2, $2, 15
sll $0, $0, 0
TAG254:
bltz $2, TAG255
sll $0, $0, 0
ori $4, $2, 6
srl $4, $2, 11
TAG255:
sh $4, -224($4)
mult $4, $4
sw $4, -224($4)
lui $3, 11
TAG256:
addiu $2, $3, 10
sll $0, $0, 0
mfhi $1
divu $2, $2
TAG257:
sb $1, 0($1)
sllv $1, $1, $1
beq $1, $1, TAG258
mfhi $1
TAG258:
subu $2, $1, $1
mthi $2
lui $3, 1
sll $0, $0, 0
TAG259:
sw $2, 0($2)
lui $4, 9
mflo $3
srl $2, $4, 1
TAG260:
bne $2, $2, TAG261
mthi $2
sll $0, $0, 0
multu $2, $2
TAG261:
lw $1, 0($1)
mult $1, $1
mtlo $1
lw $2, 0($1)
TAG262:
mfhi $4
lbu $1, 0($2)
lbu $3, 0($4)
bne $4, $2, TAG263
TAG263:
addi $4, $3, 14
bgez $4, TAG264
sh $4, 0($3)
sh $4, 0($4)
TAG264:
bgez $4, TAG265
lh $1, 0($4)
mflo $3
beq $1, $4, TAG265
TAG265:
lb $3, 0($3)
multu $3, $3
lbu $4, 0($3)
lhu $4, 0($4)
TAG266:
divu $4, $4
lui $1, 5
srav $4, $4, $1
srav $3, $1, $1
TAG267:
lui $1, 15
sll $0, $0, 0
bltz $2, TAG268
sll $0, $0, 0
TAG268:
mtlo $2
lw $2, 0($2)
ori $2, $2, 2
mthi $2
TAG269:
srav $3, $2, $2
mfhi $4
beq $3, $3, TAG270
lh $3, 0($4)
TAG270:
lui $1, 0
mult $1, $1
lbu $2, 0($3)
or $2, $1, $2
TAG271:
bltz $2, TAG272
lui $4, 3
mfhi $2
mtlo $2
TAG272:
multu $2, $2
andi $4, $2, 9
sh $2, 0($4)
xori $3, $2, 2
TAG273:
mflo $4
mtlo $3
andi $2, $3, 12
sw $4, 0($4)
TAG274:
mthi $2
mtlo $2
bne $2, $2, TAG275
mthi $2
TAG275:
slt $4, $2, $2
mthi $2
bgtz $2, TAG276
mthi $2
TAG276:
sra $2, $4, 3
sb $2, 0($2)
sb $4, 0($2)
bgez $2, TAG277
TAG277:
lui $3, 0
mthi $2
lb $1, 0($3)
addiu $4, $3, 7
TAG278:
lui $1, 9
lb $3, 0($4)
lb $3, 0($4)
beq $3, $3, TAG279
TAG279:
addu $1, $3, $3
bgez $1, TAG280
lb $2, 0($1)
beq $1, $2, TAG280
TAG280:
mflo $4
lui $1, 3
bne $4, $2, TAG281
srl $2, $4, 9
TAG281:
bne $2, $2, TAG282
lb $2, 0($2)
mflo $2
ori $3, $2, 15
TAG282:
lui $1, 15
div $3, $1
sb $3, 0($3)
bne $1, $1, TAG283
TAG283:
and $2, $1, $1
bltz $2, TAG284
lui $4, 15
lui $3, 12
TAG284:
sllv $3, $3, $3
blez $3, TAG285
sll $0, $0, 0
bgez $3, TAG285
TAG285:
mtlo $3
sll $0, $0, 0
slt $3, $3, $3
sh $3, 0($3)
TAG286:
slti $4, $3, 9
mflo $4
mthi $4
xori $3, $4, 7
TAG287:
blez $3, TAG288
mthi $3
beq $3, $3, TAG288
sltu $2, $3, $3
TAG288:
sw $2, 0($2)
or $4, $2, $2
mthi $4
mflo $1
TAG289:
mtlo $1
bne $1, $1, TAG290
mult $1, $1
sll $0, $0, 0
TAG290:
beq $2, $2, TAG291
mfhi $1
bltz $1, TAG291
mfhi $3
TAG291:
bne $3, $3, TAG292
sll $0, $0, 0
mthi $3
mthi $3
TAG292:
multu $3, $3
bne $3, $3, TAG293
nor $3, $3, $3
sll $0, $0, 0
TAG293:
bgtz $1, TAG294
sra $1, $1, 9
beq $1, $1, TAG294
slt $1, $1, $1
TAG294:
lui $4, 12
lb $2, 0($1)
lui $2, 15
sll $4, $4, 11
TAG295:
addiu $1, $4, 1
mfhi $1
mflo $2
lb $1, -144($1)
TAG296:
multu $1, $1
andi $1, $1, 3
ori $4, $1, 6
mult $4, $4
TAG297:
divu $4, $4
lh $3, 0($4)
sh $4, 0($4)
bgez $3, TAG298
TAG298:
sllv $3, $3, $3
mthi $3
bgtz $3, TAG299
addi $2, $3, 12
TAG299:
lbu $4, 0($2)
bgez $4, TAG300
mfhi $3
beq $4, $2, TAG300
TAG300:
mthi $3
and $1, $3, $3
mult $3, $1
bne $3, $1, TAG301
TAG301:
sll $1, $1, 0
bltz $1, TAG302
addiu $3, $1, 7
sb $1, 0($3)
TAG302:
and $2, $3, $3
lbu $2, 0($3)
beq $3, $3, TAG303
div $3, $3
TAG303:
sh $2, 0($2)
lui $3, 14
mfhi $3
multu $2, $3
TAG304:
mflo $2
lhu $3, 0($2)
mfhi $2
xori $1, $2, 2
TAG305:
mfhi $1
mfhi $2
bgtz $1, TAG306
andi $3, $2, 3
TAG306:
beq $3, $3, TAG307
lb $2, 0($3)
divu $2, $2
sw $3, 0($2)
TAG307:
beq $2, $2, TAG308
mtlo $2
divu $2, $2
lui $1, 15
TAG308:
ori $3, $1, 2
bltz $3, TAG309
sb $3, 0($3)
lb $2, 0($1)
TAG309:
lw $4, 0($2)
mflo $1
lw $1, 0($2)
sll $0, $0, 0
TAG310:
sll $0, $0, 0
beq $1, $1, TAG311
srav $1, $1, $1
beq $1, $1, TAG311
TAG311:
and $3, $1, $1
mflo $2
bne $2, $3, TAG312
mfhi $2
TAG312:
beq $2, $2, TAG313
lh $2, 0($2)
lui $2, 6
div $2, $2
TAG313:
bltz $2, TAG314
lui $2, 7
lui $2, 14
mthi $2
TAG314:
bgez $2, TAG315
sll $0, $0, 0
bne $2, $2, TAG315
sh $2, 0($2)
TAG315:
sll $1, $3, 7
bne $3, $1, TAG316
mult $1, $3
mflo $2
TAG316:
beq $2, $2, TAG317
lui $1, 4
mthi $2
div $2, $1
TAG317:
mflo $3
multu $1, $3
mfhi $4
bne $4, $4, TAG318
TAG318:
and $3, $4, $4
mfhi $2
mtlo $4
addiu $3, $2, 5
TAG319:
bne $3, $3, TAG320
multu $3, $3
addu $1, $3, $3
andi $1, $3, 13
TAG320:
lui $3, 1
sll $0, $0, 0
bgtz $3, TAG321
lui $2, 10
TAG321:
mflo $1
mthi $2
bne $2, $1, TAG322
lbu $3, 0($1)
TAG322:
mult $3, $3
multu $3, $3
multu $3, $3
multu $3, $3
TAG323:
sh $3, 0($3)
bgez $3, TAG324
lui $4, 10
mflo $2
TAG324:
mtlo $2
mthi $2
bltz $2, TAG325
mthi $2
TAG325:
sll $0, $0, 0
divu $3, $2
bltz $3, TAG326
nor $1, $3, $2
TAG326:
lui $1, 4
multu $1, $1
sll $0, $0, 0
mfhi $2
TAG327:
mult $2, $2
mflo $1
slti $4, $1, 12
mthi $4
TAG328:
mult $4, $4
mflo $2
multu $2, $4
sb $4, 0($4)
TAG329:
mult $2, $2
lhu $3, 0($2)
sw $3, 0($3)
add $3, $2, $3
TAG330:
mtlo $3
sb $3, 0($3)
bne $3, $3, TAG331
multu $3, $3
TAG331:
sh $3, 0($3)
addu $1, $3, $3
bltz $3, TAG332
lh $1, 0($1)
TAG332:
mthi $1
lui $2, 14
lh $1, 0($1)
sll $0, $0, 0
TAG333:
beq $1, $1, TAG334
sw $1, 0($1)
sw $1, 0($1)
mflo $3
TAG334:
multu $3, $3
bne $3, $3, TAG335
sra $1, $3, 8
andi $1, $3, 13
TAG335:
bgez $1, TAG336
lui $1, 8
mfhi $3
mtlo $3
TAG336:
mult $3, $3
addu $4, $3, $3
lh $3, 0($4)
lui $3, 4
TAG337:
bne $3, $3, TAG338
sra $3, $3, 5
mflo $2
bgtz $3, TAG338
TAG338:
mflo $4
xori $3, $4, 9
lh $1, 0($2)
lui $1, 3
TAG339:
lui $2, 4
lui $3, 11
addu $1, $1, $2
sll $0, $0, 0
TAG340:
multu $1, $1
addu $2, $1, $1
mflo $4
mtlo $4
TAG341:
mthi $4
bgez $4, TAG342
sw $4, 0($4)
mthi $4
TAG342:
bgez $4, TAG343
sra $2, $4, 12
sw $2, 0($2)
lui $4, 2
TAG343:
mthi $4
and $4, $4, $4
lui $1, 0
mflo $4
TAG344:
mfhi $4
bltz $4, TAG345
mfhi $3
lui $3, 14
TAG345:
mflo $3
sh $3, 0($3)
sltu $3, $3, $3
and $4, $3, $3
TAG346:
lbu $3, 0($4)
lbu $2, 0($3)
mflo $4
sw $4, 0($3)
TAG347:
mthi $4
lhu $1, 0($4)
lui $4, 3
bgtz $1, TAG348
TAG348:
addu $2, $4, $4
beq $2, $2, TAG349
sll $0, $0, 0
lhu $3, 0($4)
TAG349:
sb $3, 0($3)
blez $3, TAG350
xori $4, $3, 3
lui $2, 14
TAG350:
xor $1, $2, $2
multu $1, $2
addiu $4, $2, 10
mthi $1
TAG351:
xor $4, $4, $4
blez $4, TAG352
sw $4, 0($4)
sra $4, $4, 6
TAG352:
add $2, $4, $4
multu $2, $4
sw $2, 0($4)
mfhi $4
TAG353:
slti $4, $4, 9
sra $3, $4, 2
multu $4, $3
lui $1, 8
TAG354:
addiu $3, $1, 5
multu $1, $1
sll $0, $0, 0
sltu $2, $1, $3
TAG355:
mflo $1
mtlo $2
beq $2, $2, TAG356
mfhi $4
TAG356:
sh $4, 0($4)
bgez $4, TAG357
lui $2, 3
mult $2, $4
TAG357:
mflo $4
mfhi $3
lui $1, 5
sll $0, $0, 0
TAG358:
sll $2, $1, 6
mflo $2
mfhi $3
mflo $2
TAG359:
sb $2, 0($2)
beq $2, $2, TAG360
lui $3, 15
lui $3, 12
TAG360:
lui $3, 9
sll $0, $0, 0
bltz $3, TAG361
sll $0, $0, 0
TAG361:
srl $2, $1, 3
sllv $4, $2, $1
bne $4, $4, TAG362
sll $0, $0, 0
TAG362:
beq $4, $4, TAG363
mfhi $1
bgez $4, TAG363
lw $3, 0($4)
TAG363:
divu $3, $3
sll $0, $0, 0
sll $0, $0, 0
bgez $2, TAG364
TAG364:
mflo $4
sltiu $3, $2, 6
sll $0, $0, 0
mfhi $3
TAG365:
sh $3, 0($3)
lui $1, 7
sltiu $4, $1, 11
addi $2, $3, 8
TAG366:
addu $2, $2, $2
lbu $4, 0($2)
lui $4, 2
addu $3, $4, $4
TAG367:
mult $3, $3
div $3, $3
sll $0, $0, 0
sll $0, $0, 0
TAG368:
beq $3, $3, TAG369
divu $3, $3
lb $3, 0($3)
sh $3, 0($3)
TAG369:
bgtz $3, TAG370
sll $0, $0, 0
sb $2, 0($3)
sb $3, 0($3)
TAG370:
sb $2, 0($2)
divu $2, $2
lui $3, 3
srlv $3, $3, $2
TAG371:
sllv $1, $3, $3
sra $2, $3, 15
mfhi $2
sb $2, 0($2)
TAG372:
beq $2, $2, TAG373
lhu $2, 0($2)
andi $1, $2, 8
lui $4, 15
TAG373:
lui $2, 15
sll $0, $0, 0
mtlo $3
lui $2, 4
TAG374:
lui $2, 1
lui $3, 4
mflo $2
sb $3, 0($2)
TAG375:
lui $1, 14
mfhi $2
srlv $2, $2, $1
beq $2, $2, TAG376
TAG376:
srl $2, $2, 5
mthi $2
mflo $4
mtlo $2
TAG377:
lui $1, 0
sltiu $4, $4, 0
mtlo $4
lui $3, 14
TAG378:
sll $0, $0, 0
addiu $2, $3, 14
divu $3, $3
sll $0, $0, 0
TAG379:
bne $1, $1, TAG380
sb $1, 0($1)
lhu $1, 0($1)
lui $2, 5
TAG380:
bne $2, $2, TAG381
subu $2, $2, $2
multu $2, $2
lui $4, 2
TAG381:
sltiu $4, $4, 1
mfhi $4
bgez $4, TAG382
mfhi $2
TAG382:
blez $2, TAG383
lui $1, 6
beq $1, $1, TAG383
lb $4, 0($1)
TAG383:
lui $3, 6
nor $2, $4, $3
bgez $3, TAG384
mthi $2
TAG384:
mfhi $1
mflo $2
sltiu $3, $1, 3
beq $1, $2, TAG385
TAG385:
slti $1, $3, 8
lui $4, 3
slt $2, $4, $3
mthi $1
TAG386:
lui $1, 6
mthi $1
bgtz $1, TAG387
multu $2, $2
TAG387:
sll $0, $0, 0
addiu $3, $1, 11
mthi $1
sll $0, $0, 0
TAG388:
bne $3, $3, TAG389
mflo $1
beq $1, $3, TAG389
subu $2, $3, $1
TAG389:
mfhi $4
beq $4, $4, TAG390
sll $0, $0, 0
sh $4, 0($4)
TAG390:
sltu $1, $4, $4
lui $3, 6
mthi $1
mtlo $1
TAG391:
bne $3, $3, TAG392
mfhi $3
lhu $3, 0($3)
mult $3, $3
TAG392:
sub $2, $3, $3
mtlo $2
mthi $2
mfhi $3
TAG393:
mthi $3
bgtz $3, TAG394
sltu $3, $3, $3
lui $1, 13
TAG394:
mthi $1
sll $0, $0, 0
mfhi $4
sll $0, $0, 0
TAG395:
bne $2, $2, TAG396
lh $3, 0($2)
mult $2, $2
sw $3, 0($3)
TAG396:
andi $2, $3, 1
mtlo $3
lhu $4, 0($2)
mthi $2
TAG397:
mthi $4
bgez $4, TAG398
lui $3, 2
bgtz $4, TAG398
TAG398:
sll $0, $0, 0
sll $0, $0, 0
lui $3, 3
sll $0, $0, 0
TAG399:
sw $4, 0($4)
lhu $3, 0($4)
xori $4, $4, 6
sh $4, 0($4)
TAG400:
sllv $3, $4, $4
srlv $4, $3, $4
lb $1, -384($3)
lhu $2, 0($4)
TAG401:
and $1, $2, $2
srav $2, $1, $1
bne $2, $2, TAG402
mfhi $3
TAG402:
bne $3, $3, TAG403
srl $2, $3, 11
sll $4, $2, 14
bgtz $4, TAG403
TAG403:
multu $4, $4
bne $4, $4, TAG404
ori $2, $4, 7
sh $4, 0($4)
TAG404:
mtlo $2
bne $2, $2, TAG405
subu $1, $2, $2
andi $1, $1, 13
TAG405:
lui $3, 4
bne $1, $1, TAG406
mthi $1
bltz $1, TAG406
TAG406:
addiu $3, $3, 11
mtlo $3
lui $3, 3
mtlo $3
TAG407:
bltz $3, TAG408
sll $0, $0, 0
multu $3, $3
lui $1, 2
TAG408:
mult $1, $1
bltz $1, TAG409
mfhi $3
lui $1, 2
TAG409:
ori $2, $1, 5
beq $2, $1, TAG410
mthi $1
ori $3, $1, 5
TAG410:
bne $3, $3, TAG411
srlv $3, $3, $3
mtlo $3
mflo $4
TAG411:
div $4, $4
bgez $4, TAG412
lbu $3, -4096($4)
mfhi $4
TAG412:
lui $3, 10
sll $0, $0, 0
sll $0, $0, 0
lui $2, 3
TAG413:
beq $2, $2, TAG414
lui $3, 3
mtlo $3
lb $3, 0($2)
TAG414:
lui $2, 7
div $3, $3
mult $3, $2
slt $2, $3, $2
TAG415:
beq $2, $2, TAG416
lui $4, 0
addi $2, $2, 13
bgtz $4, TAG416
TAG416:
mtlo $2
sb $2, 0($2)
bne $2, $2, TAG417
lui $3, 2
TAG417:
sll $0, $0, 0
xori $1, $3, 7
sll $0, $0, 0
mtlo $1
TAG418:
beq $1, $1, TAG419
sll $0, $0, 0
mult $1, $1
mflo $2
TAG419:
xori $1, $2, 7
bne $1, $2, TAG420
lbu $2, 0($2)
mthi $2
TAG420:
lui $4, 13
divu $4, $2
mflo $3
bgtz $2, TAG421
TAG421:
sll $0, $0, 0
sll $0, $0, 0
mthi $3
bne $3, $2, TAG422
TAG422:
multu $2, $2
srl $3, $2, 13
sb $2, 0($2)
bne $2, $2, TAG423
TAG423:
lbu $2, 0($3)
mult $3, $2
sll $2, $2, 7
mult $3, $3
TAG424:
bgtz $2, TAG425
add $1, $2, $2
multu $1, $2
multu $1, $1
TAG425:
sb $1, 0($1)
bne $1, $1, TAG426
addiu $4, $1, 5
mfhi $1
TAG426:
lui $1, 11
mflo $4
mtlo $4
sltiu $2, $1, 12
TAG427:
mfhi $3
sw $3, 0($3)
beq $2, $3, TAG428
mtlo $2
TAG428:
lb $4, 0($3)
bne $3, $3, TAG429
mult $3, $4
bne $3, $3, TAG429
TAG429:
sw $4, 0($4)
bgtz $4, TAG430
multu $4, $4
sb $4, 0($4)
TAG430:
andi $3, $4, 7
lui $3, 6
divu $3, $3
lui $4, 4
TAG431:
bgtz $4, TAG432
mfhi $2
xori $3, $2, 11
mfhi $2
TAG432:
or $4, $2, $2
lbu $3, 0($4)
and $1, $3, $2
mthi $1
TAG433:
lui $1, 3
bne $1, $1, TAG434
mfhi $1
bne $1, $1, TAG434
TAG434:
sb $1, 0($1)
srav $1, $1, $1
bne $1, $1, TAG435
mthi $1
TAG435:
addiu $2, $1, 3
blez $2, TAG436
lbu $2, 0($1)
lh $4, 0($1)
TAG436:
srav $3, $4, $4
srl $1, $3, 6
sra $1, $4, 4
bgtz $4, TAG437
TAG437:
add $1, $1, $1
sh $1, 0($1)
beq $1, $1, TAG438
and $1, $1, $1
TAG438:
andi $3, $1, 13
lui $4, 4
mfhi $1
sw $1, 0($1)
TAG439:
blez $1, TAG440
lui $2, 12
and $3, $1, $2
mtlo $2
TAG440:
bne $3, $3, TAG441
nor $4, $3, $3
sb $3, 1($4)
sw $4, 0($3)
TAG441:
slt $2, $4, $4
bgtz $2, TAG442
sw $2, 1($4)
bne $4, $4, TAG442
TAG442:
mtlo $2
mtlo $2
srl $2, $2, 9
bne $2, $2, TAG443
TAG443:
ori $4, $2, 7
divu $4, $4
beq $2, $4, TAG444
mfhi $2
TAG444:
lui $1, 15
or $2, $1, $1
lui $1, 13
beq $1, $2, TAG445
TAG445:
lui $1, 6
lui $1, 8
mfhi $1
lh $1, 0($1)
TAG446:
beq $1, $1, TAG447
ori $4, $1, 11
div $1, $4
sh $4, 0($4)
TAG447:
addu $1, $4, $4
mthi $4
mthi $1
slti $1, $1, 10
TAG448:
mtlo $1
sh $1, 0($1)
lui $4, 4
sll $0, $0, 0
TAG449:
bltz $4, TAG450
sll $0, $0, 0
sllv $1, $4, $2
mfhi $4
TAG450:
bgez $4, TAG451
sltiu $4, $4, 10
beq $4, $4, TAG451
lui $4, 0
TAG451:
mtlo $4
lui $1, 0
mflo $4
sub $3, $4, $1
TAG452:
beq $3, $3, TAG453
mthi $3
sub $2, $3, $3
bne $3, $2, TAG453
TAG453:
and $4, $2, $2
div $4, $4
sltiu $3, $4, 4
mflo $3
TAG454:
lbu $4, 0($3)
bne $4, $4, TAG455
sh $4, 0($4)
bne $4, $3, TAG455
TAG455:
addu $2, $4, $4
mult $2, $2
blez $2, TAG456
slt $2, $2, $2
TAG456:
lui $1, 8
mult $2, $1
or $4, $2, $2
sll $0, $0, 0
TAG457:
bltz $2, TAG458
sltu $3, $2, $2
sll $4, $2, 15
sh $4, 0($2)
TAG458:
lui $3, 3
lhu $1, 0($4)
lui $2, 5
mtlo $4
TAG459:
sll $0, $0, 0
bgez $2, TAG460
divu $2, $2
beq $2, $2, TAG460
TAG460:
srl $4, $2, 9
subu $3, $4, $2
subu $2, $2, $4
mthi $3
TAG461:
subu $3, $2, $2
lhu $2, 0($3)
beq $2, $2, TAG462
sltiu $2, $2, 1
TAG462:
slti $2, $2, 6
sltu $1, $2, $2
beq $1, $1, TAG463
sb $1, 0($2)
TAG463:
bne $1, $1, TAG464
sh $1, 0($1)
mfhi $2
multu $2, $1
TAG464:
mtlo $2
mthi $2
ori $4, $2, 15
divu $2, $2
TAG465:
or $4, $4, $4
mfhi $3
beq $3, $3, TAG466
mult $3, $4
TAG466:
multu $3, $3
multu $3, $3
lui $1, 11
mult $1, $1
TAG467:
blez $1, TAG468
mult $1, $1
sll $0, $0, 0
srlv $3, $1, $1
TAG468:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG469:
sll $0, $0, 0
bltz $4, TAG470
sltiu $4, $4, 7
mthi $4
TAG470:
mflo $2
ori $3, $2, 2
lw $2, 0($4)
lui $4, 2
TAG471:
bgez $4, TAG472
sll $0, $0, 0
lb $4, 0($4)
blez $4, TAG472
TAG472:
divu $4, $4
bltz $4, TAG473
multu $4, $4
mfhi $4
TAG473:
mthi $4
beq $4, $4, TAG474
sb $4, 0($4)
sra $2, $4, 12
TAG474:
mthi $2
mult $2, $2
bltz $2, TAG475
mthi $2
TAG475:
multu $2, $2
sub $4, $2, $2
xor $3, $2, $2
slti $4, $4, 1
TAG476:
mult $4, $4
srav $3, $4, $4
mfhi $2
subu $1, $2, $3
TAG477:
lui $3, 13
div $1, $3
bgez $3, TAG478
nor $1, $1, $3
TAG478:
lui $3, 2
sll $0, $0, 0
bne $1, $1, TAG479
div $3, $1
TAG479:
addiu $3, $3, 10
sll $0, $0, 0
bltz $4, TAG480
lbu $3, 0($4)
TAG480:
lui $4, 1
bne $4, $3, TAG481
xori $1, $4, 4
and $2, $4, $4
TAG481:
sh $2, 0($2)
or $2, $2, $2
andi $1, $2, 11
mthi $2
TAG482:
mfhi $4
mthi $4
lhu $3, 0($1)
multu $4, $1
TAG483:
blez $3, TAG484
lui $3, 8
sb $3, 0($3)
bgtz $3, TAG484
TAG484:
addu $1, $3, $3
mult $3, $3
sll $0, $0, 0
bgtz $3, TAG485
TAG485:
lui $4, 10
xori $1, $4, 13
lh $4, 0($2)
lh $1, 0($4)
TAG486:
bgtz $1, TAG487
mflo $1
lh $2, 0($1)
sh $1, 0($1)
TAG487:
mfhi $4
ori $2, $4, 13
lb $3, 0($2)
bgtz $4, TAG488
TAG488:
ori $3, $3, 14
or $3, $3, $3
sb $3, 0($3)
andi $1, $3, 10
TAG489:
lh $4, 0($1)
subu $4, $1, $1
addiu $1, $1, 6
sh $1, 0($1)
TAG490:
slt $3, $1, $1
mthi $1
mult $3, $3
beq $3, $1, TAG491
TAG491:
multu $3, $3
bltz $3, TAG492
mthi $3
mthi $3
TAG492:
beq $3, $3, TAG493
mflo $2
sh $2, 0($2)
mthi $3
TAG493:
sh $2, 0($2)
andi $4, $2, 6
mult $4, $4
sltiu $2, $2, 14
TAG494:
sb $2, 0($2)
lb $1, 0($2)
srav $1, $2, $1
sllv $3, $1, $2
TAG495:
bne $3, $3, TAG496
addiu $1, $3, 6
beq $3, $3, TAG496
mflo $4
TAG496:
ori $3, $4, 9
mtlo $3
sw $3, 0($4)
srlv $1, $3, $4
TAG497:
sltu $1, $1, $1
srlv $2, $1, $1
bgez $2, TAG498
mult $1, $2
TAG498:
sb $2, 0($2)
bne $2, $2, TAG499
mflo $3
lui $2, 4
TAG499:
divu $2, $2
bgez $2, TAG500
mtlo $2
sh $2, 0($2)
TAG500:
multu $2, $2
lui $3, 12
lui $3, 7
sll $2, $3, 15
TAG501:
blez $2, TAG502
mthi $2
bgez $2, TAG502
addiu $2, $2, 14
TAG502:
bne $2, $2, TAG503
nor $3, $2, $2
andi $4, $2, 8
divu $2, $2
TAG503:
bne $4, $4, TAG504
addiu $4, $4, 1
multu $4, $4
mtlo $4
TAG504:
bgez $4, TAG505
mult $4, $4
lb $2, 0($4)
lbu $1, 0($2)
TAG505:
mtlo $1
sllv $1, $1, $1
sw $1, 0($1)
xor $2, $1, $1
TAG506:
bne $2, $2, TAG507
mthi $2
bgez $2, TAG507
lui $3, 11
TAG507:
lui $1, 7
mult $3, $1
mtlo $3
addiu $2, $1, 2
TAG508:
sll $0, $0, 0
and $4, $2, $3
mfhi $4
mfhi $2
TAG509:
sb $2, 0($2)
mthi $2
mfhi $2
lui $4, 10
TAG510:
blez $4, TAG511
sll $0, $0, 0
sll $0, $0, 0
addiu $4, $4, 14
TAG511:
bgez $4, TAG512
sll $0, $0, 0
addiu $2, $4, 0
addu $4, $4, $4
TAG512:
bne $4, $4, TAG513
lui $1, 13
blez $1, TAG513
mtlo $1
TAG513:
mtlo $1
div $1, $1
blez $1, TAG514
sll $0, $0, 0
TAG514:
divu $4, $4
multu $4, $4
sll $0, $0, 0
mtlo $3
TAG515:
sll $0, $0, 0
mflo $1
sll $0, $0, 0
sll $0, $0, 0
TAG516:
subu $1, $1, $1
lui $2, 1
sll $0, $0, 0
bgez $1, TAG517
TAG517:
sub $2, $1, $1
lbu $1, 0($1)
lh $3, 0($2)
multu $3, $3
TAG518:
bne $3, $3, TAG519
slt $1, $3, $3
bne $1, $1, TAG519
mthi $1
TAG519:
lui $4, 7
lui $4, 5
beq $4, $4, TAG520
sltiu $1, $4, 3
TAG520:
blez $1, TAG521
lb $4, 0($1)
sll $1, $4, 12
addi $3, $1, 2
TAG521:
bltz $3, TAG522
mthi $3
sb $3, 0($3)
mult $3, $3
TAG522:
slt $1, $3, $3
bne $3, $1, TAG523
sh $3, 0($1)
slt $4, $1, $1
TAG523:
mult $4, $4
sw $4, 0($4)
lbu $1, 0($4)
multu $1, $1
TAG524:
mthi $1
lw $1, 0($1)
bltz $1, TAG525
sw $1, 0($1)
TAG525:
mflo $2
mfhi $1
mflo $4
beq $1, $4, TAG526
TAG526:
sw $4, 0($4)
bgez $4, TAG527
mthi $4
lui $4, 0
TAG527:
mtlo $4
beq $4, $4, TAG528
sb $4, 0($4)
divu $4, $4
TAG528:
mflo $1
mfhi $2
sh $4, 0($4)
lui $3, 7
TAG529:
addiu $1, $3, 15
srl $2, $3, 0
mflo $3
addi $3, $3, 2
TAG530:
sh $3, 0($3)
lbu $4, 0($3)
sh $4, 0($4)
beq $4, $3, TAG531
TAG531:
sll $2, $4, 13
and $1, $4, $2
beq $4, $2, TAG532
srlv $1, $2, $4
TAG532:
mthi $1
andi $3, $1, 8
multu $1, $3
sh $3, -4096($1)
TAG533:
multu $3, $3
mthi $3
slti $2, $3, 7
sb $2, 0($2)
TAG534:
lui $1, 13
bgez $1, TAG535
sb $2, 0($2)
lh $3, 0($1)
TAG535:
mult $3, $3
lui $3, 10
lui $1, 5
sll $0, $0, 0
TAG536:
addu $4, $4, $4
or $2, $4, $4
mthi $2
addu $2, $4, $4
TAG537:
mthi $2
sllv $3, $2, $2
sltiu $1, $2, 10
lbu $3, 0($1)
TAG538:
multu $3, $3
lui $1, 14
mflo $2
mtlo $3
TAG539:
lui $4, 8
bltz $2, TAG540
subu $2, $2, $2
sll $0, $0, 0
TAG540:
mfhi $3
multu $3, $2
mfhi $4
bgez $2, TAG541
TAG541:
sh $4, 0($4)
lh $2, 0($4)
lui $4, 3
mflo $1
TAG542:
mult $1, $1
bne $1, $1, TAG543
sw $1, 0($1)
beq $1, $1, TAG543
TAG543:
sub $3, $1, $1
srl $2, $3, 10
lhu $4, 0($1)
mthi $2
TAG544:
mult $4, $4
lui $3, 5
bne $4, $3, TAG545
sw $3, 0($4)
TAG545:
sll $0, $0, 0
mult $2, $2
addiu $1, $3, 1
mtlo $1
TAG546:
beq $1, $1, TAG547
mult $1, $1
lui $1, 4
bgez $1, TAG547
TAG547:
sra $4, $1, 11
divu $1, $4
lbu $4, -160($4)
mfhi $2
TAG548:
multu $2, $2
xori $2, $2, 10
sb $2, 0($2)
sb $2, 0($2)
TAG549:
nor $3, $2, $2
mfhi $3
bne $2, $3, TAG550
addiu $1, $3, 5
TAG550:
lb $4, 0($1)
slti $4, $4, 2
mfhi $4
mfhi $2
TAG551:
sll $2, $2, 15
sb $2, 0($2)
mfhi $1
multu $1, $2
TAG552:
sltu $4, $1, $1
lui $4, 3
srl $3, $1, 10
addu $1, $3, $4
TAG553:
sll $0, $0, 0
addu $3, $1, $1
multu $1, $1
addu $3, $1, $1
TAG554:
sll $0, $0, 0
srl $1, $3, 12
mult $1, $3
and $4, $1, $1
TAG555:
mfhi $2
mfhi $1
mflo $4
beq $1, $2, TAG556
TAG556:
sll $0, $0, 0
bne $3, $3, TAG557
srl $2, $4, 6
addiu $4, $2, 14
TAG557:
lui $4, 1
lui $2, 4
divu $2, $2
xor $4, $4, $2
TAG558:
beq $4, $4, TAG559
sll $0, $0, 0
mtlo $4
sb $4, 0($4)
TAG559:
divu $4, $4
sll $0, $0, 0
bltz $4, TAG560
sll $0, $0, 0
TAG560:
xori $4, $4, 10
mthi $4
sll $0, $0, 0
xori $2, $4, 14
TAG561:
lui $2, 6
beq $2, $2, TAG562
slti $3, $2, 15
lui $2, 14
TAG562:
bltz $2, TAG563
sll $0, $0, 0
multu $2, $2
mthi $2
TAG563:
slt $3, $2, $2
lui $4, 4
lw $3, 0($3)
sll $0, $0, 0
TAG564:
bltz $3, TAG565
div $3, $3
subu $4, $3, $3
andi $3, $3, 10
TAG565:
multu $3, $3
slti $3, $3, 12
addiu $3, $3, 5
blez $3, TAG566
TAG566:
lui $1, 14
blez $1, TAG567
sb $1, 0($3)
sltiu $3, $3, 7
TAG567:
lbu $1, 0($3)
multu $3, $3
lui $3, 9
div $3, $3
TAG568:
sll $0, $0, 0
lui $3, 3
lui $2, 15
multu $3, $3
TAG569:
srav $3, $2, $2
mult $3, $3
bgtz $2, TAG570
slti $4, $2, 12
TAG570:
mult $4, $4
and $3, $4, $4
sb $4, 0($3)
sb $4, 0($3)
TAG571:
mthi $3
lh $3, 0($3)
srlv $2, $3, $3
srav $3, $3, $3
TAG572:
bne $3, $3, TAG573
mthi $3
mthi $3
or $4, $3, $3
TAG573:
mtlo $4
lui $2, 13
mflo $4
sub $4, $4, $4
TAG574:
lui $3, 11
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG575
TAG575:
addiu $2, $3, 5
and $2, $3, $2
sll $0, $0, 0
bgez $2, TAG576
TAG576:
mflo $2
addiu $2, $3, 14
sll $0, $0, 0
sltu $3, $2, $2
TAG577:
mult $3, $3
nor $2, $3, $3
lui $3, 15
sll $0, $0, 0
TAG578:
sll $0, $0, 0
mult $3, $3
mtlo $3
nor $3, $3, $3
TAG579:
and $3, $3, $3
sll $0, $0, 0
addiu $2, $3, 3
mfhi $1
TAG580:
sb $1, -225($1)
bne $1, $1, TAG581
lui $3, 4
lhu $3, -225($1)
TAG581:
mthi $3
bltz $3, TAG582
sltiu $4, $3, 3
mtlo $3
TAG582:
sltu $3, $4, $4
mtlo $3
mult $3, $4
sll $3, $3, 4
TAG583:
mtlo $3
beq $3, $3, TAG584
mthi $3
srav $4, $3, $3
TAG584:
or $1, $4, $4
bgez $1, TAG585
ori $4, $1, 11
sw $4, 0($1)
TAG585:
lb $4, 0($4)
lbu $3, 0($4)
lui $3, 14
sb $4, 0($4)
TAG586:
divu $3, $3
sll $0, $0, 0
mflo $3
blez $3, TAG587
TAG587:
sra $3, $3, 11
lh $3, 0($3)
mflo $3
ori $1, $3, 0
TAG588:
bne $1, $1, TAG589
and $3, $1, $1
slti $1, $3, 1
sra $3, $1, 3
TAG589:
subu $3, $3, $3
bne $3, $3, TAG590
mtlo $3
lui $4, 11
TAG590:
multu $4, $4
subu $1, $4, $4
bgez $1, TAG591
sltiu $4, $1, 6
TAG591:
beq $4, $4, TAG592
slti $2, $4, 14
bgez $2, TAG592
addi $1, $2, 4
TAG592:
lbu $4, 0($1)
sub $3, $4, $1
lb $4, 0($1)
lhu $3, 31($4)
TAG593:
mfhi $3
mflo $2
mfhi $1
bne $3, $3, TAG594
TAG594:
mtlo $1
sb $1, 0($1)
mfhi $4
lbu $2, 0($4)
TAG595:
and $4, $2, $2
srl $3, $4, 5
mfhi $2
lui $3, 14
TAG596:
sll $0, $0, 0
bne $3, $3, TAG597
multu $3, $3
ori $1, $3, 8
TAG597:
srl $4, $1, 7
addiu $2, $1, 6
bgez $4, TAG598
mflo $2
TAG598:
bltz $2, TAG599
multu $2, $2
lui $3, 4
blez $3, TAG599
TAG599:
srl $4, $3, 8
sll $0, $0, 0
bne $3, $2, TAG600
sh $4, 0($2)
TAG600:
multu $2, $2
mult $2, $2
mflo $2
lui $4, 7
TAG601:
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG602
sll $0, $0, 0
TAG602:
xor $4, $4, $4
lui $1, 10
beq $4, $1, TAG603
divu $4, $1
TAG603:
mthi $1
ori $2, $1, 8
slti $4, $1, 14
sltu $3, $4, $1
TAG604:
mfhi $3
bne $3, $3, TAG605
mtlo $3
sll $0, $0, 0
TAG605:
div $3, $3
mfhi $4
sh $3, 0($4)
lw $4, 0($4)
TAG606:
lui $4, 2
sll $0, $0, 0
div $1, $1
mfhi $1
TAG607:
mflo $1
blez $1, TAG608
srav $1, $1, $1
xor $3, $1, $1
TAG608:
bltz $3, TAG609
lui $3, 12
lui $4, 14
mthi $3
TAG609:
mtlo $4
sll $0, $0, 0
bgtz $4, TAG610
sll $0, $0, 0
TAG610:
mthi $4
sll $0, $0, 0
mult $3, $3
beq $3, $4, TAG611
TAG611:
mthi $3
bne $3, $3, TAG612
sll $0, $0, 0
div $3, $3
TAG612:
mflo $2
or $3, $2, $2
sll $0, $0, 0
mfhi $4
TAG613:
blez $4, TAG614
sh $4, 0($4)
lw $4, 0($4)
blez $4, TAG614
TAG614:
sh $4, 0($4)
mfhi $1
lbu $1, 0($4)
sh $1, 0($4)
TAG615:
mthi $1
bne $1, $1, TAG616
sw $1, 0($1)
sltiu $4, $1, 14
TAG616:
addiu $3, $4, 3
lui $1, 4
sb $1, 0($4)
beq $1, $3, TAG617
TAG617:
mfhi $4
sll $0, $0, 0
mthi $2
sll $0, $0, 0
TAG618:
bltz $2, TAG619
lbu $4, 0($2)
beq $2, $2, TAG619
lui $2, 1
TAG619:
lui $4, 15
sll $0, $0, 0
and $4, $3, $2
sltu $2, $4, $2
TAG620:
nor $4, $2, $2
divu $2, $4
addiu $2, $2, 1
div $2, $4
TAG621:
mthi $2
sll $1, $2, 2
bltz $2, TAG622
sh $1, 0($1)
TAG622:
lh $2, 0($1)
sw $1, 0($2)
sb $2, 0($2)
sw $2, 0($2)
TAG623:
sh $2, 0($2)
lui $1, 9
mtlo $1
beq $2, $1, TAG624
TAG624:
srav $3, $1, $1
sll $0, $0, 0
or $2, $3, $3
sra $2, $1, 15
TAG625:
divu $2, $2
lhu $4, 0($2)
nor $4, $4, $4
lh $3, 0($2)
TAG626:
mthi $3
subu $1, $3, $3
beq $3, $3, TAG627
mult $1, $3
TAG627:
sw $1, 0($1)
mthi $1
sb $1, 0($1)
srlv $2, $1, $1
TAG628:
multu $2, $2
xori $2, $2, 0
mtlo $2
mflo $2
TAG629:
beq $2, $2, TAG630
and $3, $2, $2
addi $4, $2, 2
lbu $2, 0($2)
TAG630:
mult $2, $2
mfhi $4
lui $3, 11
srl $2, $3, 13
TAG631:
mtlo $2
lui $3, 3
sll $0, $0, 0
mtlo $2
TAG632:
bgez $3, TAG633
div $3, $3
div $3, $3
or $3, $3, $3
TAG633:
bne $3, $3, TAG634
or $1, $3, $3
bne $3, $3, TAG634
srl $3, $3, 14
TAG634:
subu $4, $3, $3
mflo $3
sra $2, $3, 12
sh $3, 0($2)
TAG635:
slti $1, $2, 1
multu $2, $2
lui $3, 13
slt $2, $1, $2
TAG636:
bgtz $2, TAG637
sltu $4, $2, $2
mfhi $1
bne $4, $4, TAG637
TAG637:
andi $1, $1, 1
sw $1, 0($1)
bgtz $1, TAG638
sllv $3, $1, $1
TAG638:
blez $3, TAG639
lbu $2, 0($3)
bgez $3, TAG639
mult $2, $2
TAG639:
beq $2, $2, TAG640
xor $1, $2, $2
lui $3, 14
sb $1, 0($3)
TAG640:
sh $3, 0($3)
mflo $2
sh $3, 0($3)
bne $2, $2, TAG641
TAG641:
sw $2, 0($2)
blez $2, TAG642
multu $2, $2
mflo $4
TAG642:
beq $4, $4, TAG643
mtlo $4
sw $4, 0($4)
mult $4, $4
TAG643:
sw $4, 0($4)
mtlo $4
lb $3, 0($4)
mfhi $3
TAG644:
lui $3, 7
sll $0, $0, 0
bltz $3, TAG645
xor $4, $3, $3
TAG645:
beq $4, $4, TAG646
lui $2, 11
bgez $2, TAG646
mtlo $2
TAG646:
lui $4, 15
bne $4, $2, TAG647
sll $0, $0, 0
divu $4, $2
TAG647:
beq $4, $4, TAG648
srav $2, $4, $4
div $4, $4
sw $2, 0($2)
TAG648:
blez $2, TAG649
mthi $2
divu $2, $2
bgtz $2, TAG649
TAG649:
srav $2, $2, $2
bgtz $2, TAG650
mult $2, $2
lui $1, 11
TAG650:
bgez $1, TAG651
srl $2, $1, 8
bgtz $1, TAG651
lb $2, 0($1)
TAG651:
mthi $2
bne $2, $2, TAG652
mtlo $2
bltz $2, TAG652
TAG652:
lb $2, 0($2)
sh $2, 0($2)
addiu $4, $2, 1
mtlo $2
TAG653:
ori $1, $4, 9
multu $1, $4
mthi $1
mult $1, $1
TAG654:
lbu $2, 0($1)
mthi $2
beq $1, $1, TAG655
mflo $3
TAG655:
andi $2, $3, 4
mthi $2
ori $3, $3, 3
xor $1, $3, $2
TAG656:
mthi $1
lui $1, 2
bgez $1, TAG657
addiu $3, $1, 14
TAG657:
bne $3, $3, TAG658
mflo $4
beq $4, $4, TAG658
mthi $4
TAG658:
sb $4, 0($4)
sb $4, 0($4)
lbu $3, 0($4)
sb $3, 0($4)
TAG659:
mult $3, $3
lbu $2, 0($3)
mfhi $3
sub $4, $3, $3
TAG660:
lbu $1, 0($4)
beq $1, $4, TAG661
mtlo $1
mthi $1
TAG661:
xori $1, $1, 8
addu $3, $1, $1
lhu $2, 0($3)
lbu $4, 0($3)
TAG662:
xor $4, $4, $4
mult $4, $4
subu $2, $4, $4
sw $4, 0($4)
TAG663:
xori $2, $2, 7
lui $2, 8
mflo $1
sll $0, $0, 0
TAG664:
beq $1, $1, TAG665
mult $1, $1
mtlo $1
mflo $3
TAG665:
lui $2, 10
mult $3, $3
divu $2, $2
lw $2, 0($3)
TAG666:
beq $2, $2, TAG667
mflo $4
srlv $1, $4, $4
srlv $2, $4, $4
TAG667:
xori $3, $2, 3
blez $2, TAG668
sw $3, 0($2)
sb $2, 0($3)
TAG668:
bgez $3, TAG669
mtlo $3
mult $3, $3
mtlo $3
TAG669:
mflo $3
bne $3, $3, TAG670
mtlo $3
nor $4, $3, $3
TAG670:
beq $4, $4, TAG671
mtlo $4
sh $4, 0($4)
mfhi $2
TAG671:
andi $1, $2, 3
sllv $4, $2, $1
sh $4, 0($1)
addi $4, $1, 1
TAG672:
lui $1, 7
sb $1, 0($4)
mthi $4
divu $4, $1
TAG673:
sll $0, $0, 0
mult $1, $1
mtlo $1
sll $0, $0, 0
TAG674:
lb $2, 0($3)
sb $2, 0($2)
sra $1, $2, 5
mflo $4
TAG675:
multu $4, $4
sll $0, $0, 0
bne $4, $4, TAG676
mflo $1
TAG676:
sw $1, 0($1)
bne $1, $1, TAG677
sltiu $1, $1, 14
lui $3, 3
TAG677:
sll $0, $0, 0
div $1, $3
sll $0, $0, 0
sb $3, 0($1)
TAG678:
mtlo $1
and $4, $1, $1
div $1, $4
slt $1, $1, $1
TAG679:
mflo $4
bltz $4, TAG680
sb $4, 0($4)
xor $1, $1, $1
TAG680:
add $3, $1, $1
bgez $1, TAG681
lui $3, 10
mflo $4
TAG681:
mflo $1
lb $2, 0($1)
mtlo $1
sllv $2, $4, $4
TAG682:
div $2, $2
lhu $3, 0($2)
mult $2, $3
bne $2, $3, TAG683
TAG683:
lui $4, 6
sll $0, $0, 0
sll $0, $0, 0
nor $1, $4, $4
TAG684:
mthi $1
multu $1, $1
bgtz $1, TAG685
subu $4, $1, $1
TAG685:
sw $4, 0($4)
sh $4, 0($4)
mult $4, $4
sb $4, 0($4)
TAG686:
sw $4, 0($4)
lui $3, 12
sb $3, 0($4)
mtlo $3
TAG687:
lui $3, 13
sll $0, $0, 0
divu $3, $3
mthi $3
TAG688:
beq $3, $3, TAG689
sll $0, $0, 0
bgez $3, TAG689
sh $3, 0($3)
TAG689:
addu $4, $3, $3
sll $0, $0, 0
nor $1, $3, $3
beq $4, $3, TAG690
TAG690:
mthi $1
div $1, $1
mthi $1
slti $1, $1, 15
TAG691:
lb $3, 0($1)
sll $1, $3, 9
mult $3, $1
bgtz $1, TAG692
TAG692:
slt $4, $1, $1
srav $1, $1, $1
bne $1, $4, TAG693
ori $1, $1, 0
TAG693:
lw $1, 0($1)
lh $1, 0($1)
lui $4, 9
mult $1, $1
TAG694:
mult $4, $4
lui $3, 13
mfhi $1
beq $1, $1, TAG695
TAG695:
sb $1, 0($1)
bne $1, $1, TAG696
andi $2, $1, 14
beq $1, $2, TAG696
TAG696:
mult $2, $2
bne $2, $2, TAG697
mflo $3
lui $4, 12
TAG697:
bne $4, $4, TAG698
multu $4, $4
sll $0, $0, 0
bne $4, $4, TAG698
TAG698:
subu $3, $4, $4
mtlo $4
sra $1, $4, 7
bne $3, $3, TAG699
TAG699:
sh $1, -6144($1)
srl $1, $1, 8
srl $4, $1, 14
mthi $1
TAG700:
or $1, $4, $4
beq $4, $4, TAG701
nor $2, $4, $4
sh $2, 0($4)
TAG701:
sll $3, $2, 13
mtlo $3
beq $2, $3, TAG702
lui $2, 1
TAG702:
sra $2, $2, 3
bgtz $2, TAG703
sb $2, -8192($2)
mtlo $2
TAG703:
addu $1, $2, $2
bltz $1, TAG704
sra $4, $1, 6
bne $1, $4, TAG704
TAG704:
mult $4, $4
sb $4, -256($4)
mthi $4
lbu $2, -256($4)
TAG705:
sw $2, 0($2)
lui $3, 5
srav $4, $2, $3
mult $2, $2
TAG706:
mult $4, $4
mult $4, $4
bgtz $4, TAG707
lh $2, 0($4)
TAG707:
mflo $2
sh $2, 0($2)
srlv $2, $2, $2
mfhi $4
TAG708:
blez $4, TAG709
lw $1, 0($4)
multu $1, $4
sw $1, 0($1)
TAG709:
srlv $4, $1, $1
sw $4, 0($1)
sub $4, $1, $4
sb $4, 0($1)
TAG710:
mflo $2
sb $2, 0($4)
lhu $4, 0($4)
srl $3, $2, 12
TAG711:
bltz $3, TAG712
sra $3, $3, 7
mult $3, $3
bne $3, $3, TAG712
TAG712:
mfhi $2
blez $3, TAG713
srl $1, $3, 6
sw $1, 0($3)
TAG713:
sw $1, 0($1)
lui $3, 9
mflo $1
sll $0, $0, 0
TAG714:
multu $1, $1
sh $1, 0($1)
mtlo $1
sub $3, $1, $1
TAG715:
mtlo $3
lui $1, 13
lhu $3, 0($3)
mthi $1
TAG716:
multu $3, $3
lb $3, 0($3)
sra $2, $3, 8
sllv $2, $3, $3
TAG717:
mfhi $2
mthi $2
beq $2, $2, TAG718
or $3, $2, $2
TAG718:
sltiu $1, $3, 7
multu $3, $3
mtlo $3
bgez $1, TAG719
TAG719:
sltiu $1, $1, 0
sllv $4, $1, $1
bne $1, $4, TAG720
ori $2, $1, 3
TAG720:
blez $2, TAG721
sb $2, 0($2)
mthi $2
bltz $2, TAG721
TAG721:
sb $2, 0($2)
bgtz $2, TAG722
divu $2, $2
lui $4, 1
TAG722:
sw $4, 0($4)
bgtz $4, TAG723
slt $3, $4, $4
mthi $4
TAG723:
mtlo $3
multu $3, $3
slti $3, $3, 3
mthi $3
TAG724:
beq $3, $3, TAG725
mfhi $4
lui $3, 8
andi $3, $4, 2
TAG725:
bne $3, $3, TAG726
mult $3, $3
mflo $1
sb $3, 0($1)
TAG726:
mtlo $1
nor $3, $1, $1
lbu $2, 2($3)
lh $1, 2($3)
TAG727:
bne $1, $1, TAG728
sb $1, -256($1)
sh $1, -256($1)
lb $3, -256($1)
TAG728:
mult $3, $3
mflo $3
lw $1, 0($3)
sw $1, 0($3)
TAG729:
sll $0, $0, 0
mtlo $1
nor $2, $2, $2
mfhi $4
TAG730:
bltz $4, TAG731
or $3, $4, $4
sw $3, 0($4)
mfhi $1
TAG731:
bgez $1, TAG732
lb $4, 0($1)
mtlo $1
blez $1, TAG732
TAG732:
srav $1, $4, $4
srlv $1, $4, $1
lui $3, 2
bltz $3, TAG733
TAG733:
addu $3, $3, $3
sll $0, $0, 0
lui $4, 10
addu $4, $3, $4
TAG734:
bgez $4, TAG735
mtlo $4
mflo $1
mthi $4
TAG735:
mult $1, $1
mtlo $1
and $4, $1, $1
mult $4, $4
TAG736:
mthi $4
multu $4, $4
mfhi $4
lb $1, 0($4)
TAG737:
mult $1, $1
lw $4, 0($1)
andi $1, $4, 3
bgtz $1, TAG738
TAG738:
multu $1, $1
sll $4, $1, 13
blez $4, TAG739
mtlo $1
TAG739:
addu $2, $4, $4
lui $3, 4
lui $4, 7
bltz $3, TAG740
TAG740:
sll $0, $0, 0
mfhi $2
lui $2, 7
beq $2, $2, TAG741
TAG741:
srlv $3, $2, $2
mtlo $2
mthi $3
sll $0, $0, 0
TAG742:
multu $3, $3
bne $3, $3, TAG743
sra $4, $3, 12
lui $3, 10
TAG743:
multu $3, $3
lui $4, 6
bne $4, $4, TAG744
sll $4, $3, 0
TAG744:
mthi $4
srav $2, $4, $4
subu $4, $4, $4
beq $4, $2, TAG745
TAG745:
and $1, $4, $4
sub $3, $1, $1
bne $3, $1, TAG746
lhu $2, 0($1)
TAG746:
nor $1, $2, $2
blez $1, TAG747
subu $1, $1, $2
bgtz $1, TAG747
TAG747:
sll $3, $1, 12
srav $2, $3, $1
divu $3, $3
beq $1, $3, TAG748
TAG748:
mflo $3
bne $2, $2, TAG749
mthi $3
lui $2, 5
TAG749:
sll $0, $0, 0
sll $0, $0, 0
srlv $3, $2, $2
div $3, $3
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop |
ada/original_2008/ada-gui/agar-gui-widget-button.adb | auzkok/libagar | 286 | 14661 | <filename>ada/original_2008/ada-gui/agar-gui-widget-button.adb
package body agar.gui.widget.button is
package cbinds is
function allocate
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr) return button_access_t;
pragma import (c, allocate, "AG_ButtonNewS");
function allocate_function
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
callback : agar.core.event.callback_t) return button_access_t;
pragma import (c, allocate_function, "AG_ButtonNewFn");
function allocate_integer
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access c.int) return button_access_t;
pragma import (c, allocate_integer, "agar_gui_widget_new_int");
function allocate_uint8
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint8_t) return button_access_t;
pragma import (c, allocate_uint8, "agar_gui_widget_new_uint8");
function allocate_uint16
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint16_t) return button_access_t;
pragma import (c, allocate_uint16, "agar_gui_widget_new_uint16");
function allocate_uint32
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint32_t) return button_access_t;
pragma import (c, allocate_uint32, "agar_gui_widget_new_uint32");
function allocate_flag
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access c.int;
mask : c.unsigned) return button_access_t;
pragma import (c, allocate_flag, "AG_ButtonNewFlag");
function allocate_flag8
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint8_t;
mask : agar.core.types.uint8_t) return button_access_t;
pragma import (c, allocate_flag8, "AG_ButtonNewFlag8");
function allocate_flag16
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint16_t;
mask : agar.core.types.uint16_t) return button_access_t;
pragma import (c, allocate_flag16, "AG_ButtonNewFlag16");
function allocate_flag32
(parent : widget_access_t;
flags : flags_t := 0;
label : cs.chars_ptr;
ptr : access agar.core.types.uint32_t;
mask : agar.core.types.uint32_t) return button_access_t;
pragma import (c, allocate_flag32, "AG_ButtonNewFlag32");
procedure set_padding
(button : button_access_t;
left_pad : c.int;
right_pad : c.int;
top_pad : c.int;
bottom_pad : c.int);
pragma import (c, set_padding, "AG_ButtonSetPadding");
procedure set_focusable
(button : button_access_t;
flag : c.int);
pragma import (c, set_focusable, "AG_ButtonSetFocusable");
procedure set_sticky
(button : button_access_t;
flag : c.int);
pragma import (c, set_sticky, "AG_ButtonSetSticky");
procedure set_repeat_mode
(button : button_access_t;
flag : c.int);
pragma import (c, set_repeat_mode, "AG_ButtonSetRepeatMode");
procedure invert_state
(button : button_access_t;
flag : c.int);
pragma import (c, invert_state, "AG_ButtonInvertState");
procedure text
(button : button_access_t;
text : cs.chars_ptr);
pragma import (c, text, "AG_ButtonTextS");
end cbinds;
--
function allocate
(parent : widget_access_t;
flags : flags_t := 0;
label : string) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access));
end allocate;
function allocate_function
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
callback : agar.core.event.callback_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_function
(parent => parent,
callback => callback,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access));
end allocate_function;
function allocate_integer
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access integer) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
c_int : aliased c.int;
c_button : button_access_t;
begin
c_button := cbinds.allocate_integer
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => c_int'unchecked_access);
if c_button /= null then ptr.all := integer (c_int); end if;
return c_button;
end allocate_integer;
function allocate_uint8
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint8_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_uint8
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr);
end allocate_uint8;
function allocate_uint16
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint16_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_uint16
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr);
end allocate_uint16;
function allocate_uint32
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint32_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_uint32
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr);
end allocate_uint32;
function allocate_flag
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access integer;
mask : integer) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
c_int : aliased c.int;
c_button : aliased button_access_t;
begin
c_button := cbinds.allocate_flag
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => c_int'unchecked_access,
mask => c.unsigned (mask));
if c_button /= null then ptr.all := integer (c_int); end if;
return c_button;
end allocate_flag;
function allocate_flag8
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint8_t;
mask : agar.core.types.uint8_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_flag8
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr,
mask => mask);
end allocate_flag8;
function allocate_flag16
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint16_t;
mask : agar.core.types.uint16_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_flag16
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr,
mask => mask);
end allocate_flag16;
function allocate_flag32
(parent : widget_access_t;
flags : flags_t := 0;
label : string;
ptr : access agar.core.types.uint32_t;
mask : agar.core.types.uint32_t) return button_access_t
is
c_label : aliased c.char_array := c.to_c (label);
begin
return cbinds.allocate_flag32
(parent => parent,
flags => flags,
label => cs.to_chars_ptr (c_label'unchecked_access),
ptr => ptr,
mask => mask);
end allocate_flag32;
procedure set_padding
(button : button_access_t;
left_pad : natural;
right_pad : natural;
top_pad : natural;
bottom_pad : natural) is
begin
cbinds.set_padding
(button => button,
left_pad => c.int (left_pad),
right_pad => c.int (right_pad),
top_pad => c.int (top_pad),
bottom_pad => c.int (bottom_pad));
end set_padding;
procedure set_focusable
(button : button_access_t;
flag : boolean) is
begin
if flag then
cbinds.set_focusable (button, 1);
else
cbinds.set_focusable (button, 0);
end if;
end set_focusable;
procedure set_sticky
(button : button_access_t;
flag : boolean) is
begin
if flag then
cbinds.set_sticky (button, 1);
else
cbinds.set_sticky (button, 0);
end if;
end set_sticky;
procedure invert_state
(button : button_access_t;
flag : boolean) is
begin
if flag then
cbinds.invert_state (button, 1);
else
cbinds.invert_state (button, 0);
end if;
end invert_state;
procedure set_repeat_mode
(button : button_access_t;
flag : boolean) is
begin
if flag then
cbinds.set_repeat_mode (button, 1);
else
cbinds.set_repeat_mode (button, 0);
end if;
end set_repeat_mode;
procedure text
(button : button_access_t;
text : string)
is
ca_text : aliased c.char_array := c.to_c (text);
begin
cbinds.text
(button => button,
text => cs.to_chars_ptr (ca_text'unchecked_access));
end text;
function widget (button : button_access_t) return widget_access_t is
begin
return button.widget'access;
end widget;
end agar.gui.widget.button;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.