text stringlengths 1 1.05M |
|---|
%include "Fibers/State.asminc"
ExternLabel fibers_msabi_store
ExternLabel fibers_msabi_restore
ExternLabel fibers_sysvabi_store
ExternLabel fibers_sysvabi_restore
%if BUILD_IS_SYSTEM_WINDOWS
GlobalLabel fibers_storerestore ; RCX => storeState, RDX => returnAddress, R8 => restoreState, R9 => entry
cmp rdx, 0h
jne .Store
mov rdx, [rsp]
add rsp, 8h
.Store:
lea rax, [.StoreJmpTable]
mov r10d, [rcx + RegisterState.m_CallingConvention]
jmp [rax + r10 * 8]
.StoreMSAbi:
LabelCall fibers_msabi_store
jmp .Restore
.StoreSYSVAbi:
LabelCall fibers_sysvabi_store
jmp .Restore
.StoreJmpTable:
dq .StoreMSAbi
dq .StoreMSAbi
dq .StoreSYSVAbi
.Restore:
lea rax, [.RestoreJmpTable]
mov r10d, [r8 + RegisterState.m_CallingConvention]
mov rcx, r8
mov rdx, r9
jmp [rax + r10 * 8]
.RestoreMSAbi:
LabelCall fibers_msabi_restore
jmp .Exit
.RestoreSYSVAbi:
LabelCall fibers_sysvabi_restore
jmp .Exit
.RestoreJmpTable:
dq .RestoreMSAbi
dq .RestoreMSAbi
dq .RestoreSYSVAbi
.Exit:
ret
%elif BUILD_IS_SYSTEM_UNIX
GlobalLabel fibers_storerestore ; RDI => storeState, RSI => returnAddress, RDX => restoreState, RCX => entry
cmp rsi, 0h
jne .Store
mov rsi, [rsp]
add rsp, 8
.Store:
lea r10, [.StoreJmpTable]
mov eax, [rdi + RegisterState.m_CallingConvention]
mov rax, [r10 + rax * 8]
add rax, r10
jmp rax
.StoreJmpTable:
dq .StoreMSAbi - .StoreJmpTable
dq .StoreMSAbi - .StoreJmpTable
dq .StoreSYSVAbi - .StoreJmpTable
.StoreMSAbi:
LabelCall fibers_msabi_store
jmp .Restore
.StoreSYSVAbi:
LabelCall fibers_sysvabi_store
jmp .Restore
.Restore:
lea r10, [.RestoreJmpTable]
mov eax, [rdx + RegisterState.m_CallingConvention]
mov rax, [r10 + rax * 8]
add rax, r10
mov rdi, rdx
mov rsi, rcx
jmp rax
.RestoreJmpTable:
dq .RestoreMSAbi - .RestoreJmpTable
dq .RestoreMSAbi - .RestoreJmpTable
dq .RestoreSYSVAbi - .RestoreJmpTable
.RestoreMSAbi:
LabelCall fibers_msabi_restore
jmp .Exit
.RestoreSYSVAbi:
LabelCall fibers_sysvabi_restore
jmp .Exit
.Exit:
ret
%endif |
.global s_prepare_buffers
s_prepare_buffers:
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x6813, %r9
nop
nop
nop
nop
and $28997, %rdi
mov (%r9), %eax
nop
nop
inc %rdi
lea addresses_normal_ht+0x1e79b, %rsi
lea addresses_WC_ht+0x314b, %rdi
clflush (%rsi)
nop
nop
cmp $56210, %rdx
mov $86, %rcx
rep movsb
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0x1c89d, %rdx
nop
cmp %rbx, %rbx
mov (%rdx), %rax
nop
nop
nop
nop
and %rax, %rax
lea addresses_normal_ht+0x149b3, %rsi
lea addresses_WT_ht+0x11a13, %rdi
clflush (%rdi)
nop
add $12431, %rbp
mov $26, %rcx
rep movsw
nop
nop
nop
nop
nop
add $56867, %r9
lea addresses_WC_ht+0x1afe7, %rdi
nop
nop
nop
nop
inc %rcx
mov $0x6162636465666768, %rsi
movq %rsi, (%rdi)
sub %r9, %r9
lea addresses_UC_ht+0x11b13, %rax
nop
nop
nop
nop
and %rdx, %rdx
mov (%rax), %edi
nop
nop
nop
nop
nop
dec %r9
lea addresses_WC_ht+0x6dc3, %rsi
lea addresses_UC_ht+0x1ef13, %rdi
nop
nop
nop
nop
add $15801, %rdx
mov $9, %rcx
rep movsq
nop
nop
nop
cmp %rcx, %rcx
lea addresses_WC_ht+0xa450, %rbx
nop
nop
and %r9, %r9
mov $0x6162636465666768, %rax
movq %rax, (%rbx)
nop
nop
nop
sub $28831, %rbp
lea addresses_WC_ht+0x11a73, %rax
nop
nop
inc %rsi
mov (%rax), %edi
nop
and $58673, %rax
lea addresses_A_ht+0x18613, %r9
nop
inc %rcx
mov (%r9), %bp
nop
nop
nop
nop
nop
inc %rsi
lea addresses_UC_ht+0x12c13, %rsi
lea addresses_WC_ht+0x15413, %rdi
nop
nop
xor %rdx, %rdx
mov $105, %rcx
rep movsw
nop
nop
cmp $63404, %rbp
lea addresses_A_ht+0x189f, %rax
nop
nop
nop
nop
nop
add %rdx, %rdx
movl $0x61626364, (%rax)
nop
nop
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0x1795f, %rsi
lea addresses_UC_ht+0xa053, %rdi
nop
nop
nop
nop
dec %rdx
mov $119, %rcx
rep movsw
sub $11267, %rcx
lea addresses_D_ht+0xfca3, %rsi
lea addresses_UC_ht+0x16613, %rdi
nop
cmp $38352, %r9
mov $98, %rcx
rep movsq
nop
nop
nop
and $37625, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r15
push %rax
push %rbp
// Store
lea addresses_PSE+0xd213, %r11
nop
nop
cmp $49805, %r15
movw $0x5152, (%r11)
nop
nop
nop
add $65070, %r13
// Store
lea addresses_A+0xfcb3, %r10
nop
add $48755, %r12
mov $0x5152535455565758, %rbp
movq %rbp, %xmm1
vmovups %ymm1, (%r10)
nop
nop
dec %r15
// Faulty Load
lea addresses_PSE+0xd213, %r12
nop
and %rax, %rax
mov (%r12), %r15
lea oracles, %r11
and $0xff, %r15
shlq $12, %r15
mov (%r11,%r15,1), %r15
pop %rbp
pop %rax
pop %r15
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_PSE', 'congruent': 0}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_PSE', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 4}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_PSE', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 9}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 1}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 2}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 7}}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 0}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 7}}
{'dst': {'same': True, 'congruent': 7, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 2, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_D_ht'}}
{'52': 21829}
52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
*/
|
title "Abios Support Assembly Routines"
;++
;
; Copyright (c) 1989 Microsoft Corporation
;
; Module Name:
;
; abiosa.asm
;
; Abstract:
;
; This module implements assembley code for ABIOS support.
;
; Author:
;
; Shie-Lin Tzong (shielint) 25-May-1991
;
; Environment:
;
; Kernel mode only.
;
; Revision History:
;
;--
.386p
.xlist
include ks386.inc
include callconv.inc ; calling convention macros
include i386\kimacro.inc
include irqli386.inc
.list
extrn _DbgPrint:proc
extrn _KiStack16GdtEntry:DWORD
;
; This should be either 0 or 1, if it's greater than 1, then we've re-entered the BIOS.
;
extrn _KiInBiosCall:DWORD
extrn _FlagState:DWORD
extrn _KiBiosFrame:DWORD
OPERAND_OVERRIDE equ 66h
ADDRESS_OVERRIDE equ 67h
KGDT_CDA16 equ 0E8h
LocalStack equ 16 ; 4 DWORDS of slop for PnPBioses.
if DBG
extrn KiBiosReenteredAssert:DWORD
endif
; Macro change note:
;
; This macro pair used to do an uncondtional sti coming back from the 16-bit
; side, this potentially caused problems in APM. Now we save and restore the
; flag state
;
;++
;
; STACK32_TO_STACK16
;
; Macro Description:
;
; This macro remaps current 32bit stack to 16bit stack.
;
; Arguments:
;
; None.
;
;--
STACK32_TO_STACK16 macro
pushfd
mov ecx,[esp]
mov _FlagState,ecx
popfd
mov eax, PCR[PcPrcbData+PbCurrentThread] ; get current thread address
mov eax, [eax]+ThStackLimit ; get thread stack base
mov edx, eax
mov ecx, _KiStack16GdtEntry
mov word ptr [ecx].KgdtBaseLow, ax
shr eax, 16
mov byte ptr [ecx].KgdtBaseMid, al
mov byte ptr [ecx].KgdtBaseHi, ah
cli
sub esp, edx
mov eax, KGDT_STACK16
mov ss, ax
;
; NOTE that we MUST leave interrupts remain off.
; We'll turn it back on after we switch to 16 bit code.
;
endm
;++
;
; STACK16_TO_STACK32
;
; Macro Description:
;
; This macro remaps current 32bit stack to 16bit stack.
;
; Arguments:
;
; None.
;
;--
STACK16_TO_STACK32 macro Stack32
db OPERAND_OVERRIDE
db ADDRESS_OVERRIDE
mov eax, PCR[PcPrcbData+PbCurrentThread] ; get current thread address
db OPERAND_OVERRIDE
db ADDRESS_OVERRIDE
mov eax, [eax]+ThStackLimit ; get thread stack limit
cli
db OPERAND_OVERRIDE
add esp, eax
db OPERAND_OVERRIDE
mov eax, KGDT_R0_DATA
mov ss, ax
db OPERAND_OVERRIDE
db ADDRESS_OVERRIDE
push ds:_FlagState
db OPERAND_OVERRIDE
popfd
endm
COPY_CALL_FRAME macro FramePtr
mov [FramePtr].TsEax,eax
mov [FramePtr].TsEbx,ebx
mov [FramePtr].TsEcx,ecx
mov [FramePtr].TsEdx,edx
mov [FramePtr].TsEsi,esi
mov [FramePtr].TsEdi,edi
mov [FramePtr].TsEbp,ebp
mov [FramePtr].TsHardwareEsp,esp
mov [FramePtr].TsSegFs,fs
mov [FramePtr].TsSegCs,cs
endm
page ,132
subttl "Abios Support Code"
_TEXT SEGMENT DWORD PUBLIC 'CODE'
ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
;
; BBT cannot instrument code between this label and BBT_Exclude_Selector_Code_End
;
public _BBT_Exclude_Selector_Code_Begin
_BBT_Exclude_Selector_Code_Begin equ $
int 3
;++
; ULONG
; KiAbiosGetGdt (
; VOID
; )
;
; Routine Description:
;
; This routine returns the starting address of GDT of current processor.
;
; Arguments:
;
; None.
;
; Return Value:
;
; return Pcr->GDT
;
;--
cPublicProc _KiAbiosGetGdt,0
mov eax, PCR[PcGdt]
stdRET _KiAbiosGetGdt
stdENDP _KiAbiosGetGdt
;++
; VOID
; KiI386CallAbios(
; IN KABIOS_POINTER AbiosFunction,
; IN KABIOS_POINTER DeviceBlockPointer,
; IN KABIOS_POINTER FunctionTransferTable,
; IN KABIOS_POINTER RequestBlock
; )
;
; Routine Description:
;
; This function invokes ABIOS service function for device driver. This
; routine is executing at DIAPTCH_LEVEL to prevent context swapping.
;
; N.B. We arrive here from the Ke386AbiosCall with a 32bit CS. That is,
; we're executing the code with cs:eip where cs contains a selector for a
; 32bit flat segment. We want to get to a 16bit cs. That is, cs:ip.
; The reason is that ABIOS is running at 16 bit segment.
; Before we can call ABIOS service we must load ss and cs segment
; registers with selectors for 16bit segments. We start by pushing a far
; pointer to a label in the macro and then doing a retf. This allows us
; to fall through to the next instruction, but we're now executing
; through cs:ip with a 16bit CS. Then, we remap our 32-bit stack to 16-bit
; stack.
;
; Arguments:
;
; AbiosFunction - a 16:16 pointer to the abios service function.
;
; DeviceBlockPointer - a 16:16 pointer to Device Block.
;
; FunctionTransferTable - a 16:16 pointer to Function Transfer Table.
;
; RequestBlock - a 16:16 pointer to device driver's request block.
;
; Return Value:
;
; None.
;--
KacAbiosFunction equ [ebp + 8]
KacDeviceBlock equ [ebp + 12]
KacFunctionTable equ [ebp + 16]
KacRequestBlock equ [ebp + 20]
cPublicProc _KiI386CallAbios,4
;
; We're using a 32bit CS:EIP - go to a 16bit CS:IP
; Note the base of KiAbiosCallSelector is the flat address of _KiI386AbiosCall
; routine.
;
push ebp
mov ebp, esp
push ebx
COPY_CALL_FRAME _KiBiosFrame
sub esp,LocalStack ; After C style frame
CurrentIrql ; Local Variable
push eax ; Local Varible
cmp al, DISPATCH_LEVEL ; Is irql > Dispatch_level?
jae short Kac00
; Raise to Dispatch Level
RaiseIrql DISPATCH_LEVEL
mov [esp], al
Kac00:
;
; Set up parameters on stack before remapping stack.
;
push word ptr KGDT_CDA16 ; CDA anchor selector
push KacRequestBlock ; Request Block
push KacFunctionTable ; Func transfer table
push KacDeviceBlock ; Device Block
mov ebx, KacAbiosFunction ; (ebx)-> Abios Entry
;
; Remap current stack to 16:16 stack. The base of the 16bit stack selector is
; the base of current kernel stack.
;
inc _KiInBiosCall ; Set the 'In Bios' flag
if DBG
cmp _KiInBiosCall,2
jb @F
push offset FLAT:KiBiosReenteredAssert
call _dbgPrint
add esp, 4
@@:
endif
STACK32_TO_STACK16 ; Switch to 16bit stack
push word ptr KGDT_CODE16
push word ptr (offset FLAT:Kac40 - offset FLAT:_KiI386CallAbios@16)
push KGDT_CODE16
push offset FLAT:Kac30 - offset FLAT:_KiI386CallAbios@16
retf
Kac30:
;
; Stack switching (from 32 to 16) turns interrupt off. We must turn it
; back on.
;
sti
push bx ; Yes, BX not EBX!
retf
Kac40:
add esp, 14 ; pop out all the parameters
STACK16_TO_STACK32 ; switch back to 32 bit stack
;
; Pull callers flat return address off stack and push the
; flat code selector followed by the return offset, then
; execute a far return and we'll be back in the 32-bit code space.
;
db OPERAND_OVERRIDE
push KGDT_R0_CODE
db OPERAND_OVERRIDE
push offset FLAT:Kac50
db OPERAND_OVERRIDE
retf
Kac50:
pop ecx ; [ecx] = OldIrql
pop ebx ; restore ebx
cmp cl, DISPATCH_LEVEL
jae short Kac60
LowerIrql cl
Kac60:
dec _KiInBiosCall ;Clear 'In Bios' Flag
add esp,LocalStack ; subtract off the scratch space
pop ebp
stdRET _KiI386CallAbios
stdENDP _KiI386CallAbios
;; ********************************************************
;;
;; BEGIN - power_management
;;
;;
;++
; VOID
; KeI386Call16BitFunction (
; IN OUT PCONTEXT Regs
; )
;
; Routine Description:
;
; This function calls the 16 bit function specified in the Regs.
;
; Parameters:
;
; Regs - supplies a pointer to register context to call 16 function.
;
; NOTE: Caller must be at DPC_LEVEL
;
;--
cPublicProc _KeI386Call16BitFunction,1
; verify CurrentIrql
; verify context flags
push ebp ; save nonvolatile registers
push ebx
push esi
push edi
mov ebx, dword ptr [esp + 20] ; (ebx)-> Context
COPY_CALL_FRAME _KiBiosFrame
sub esp,LocalStack ; After prolog
inc _KiInBiosCall ; Set the 'In Bios' flag
if DBG
cmp _KiInBiosCall,2
jb @F
push offset FLAT:KiBiosReenteredAssert
call _dbgPrint
add esp, 4
@@:
endif
;
; We're using a 32bit CS:EIP - go to a 16bit CS:IP
; Note the base of KiAbiosCallSelector is the flat address of _KiI386AbiosCall
; routine.
;
;
; Remap current stack to 16:16 stack. The base of the 16bit stack selector is
; the base of current kernel stack.
;
STACK32_TO_STACK16 ; Switch to 16bit stack
;
; Push return address from 16 bit function call to kernel
;
push word ptr KGDT_CODE16
push word ptr (offset FLAT:Kbf40 - offset FLAT:_KiI386CallAbios@16)
;
; Load context to call with
;
push word ptr [ebx].CsEFlags
push word ptr [ebx].CsSegCs
push word ptr [ebx].CsEip
mov eax, [ebx].CsEax
mov ecx, [ebx].CsEcx
mov edx, [ebx].CsEdx
mov edi, [ebx].CsEdi
mov esi, [ebx].CsEsi
mov ebp, [ebx].CsEbp
push [ebx].CsSegGs
push [ebx].CsSegFs
push [ebx].CsSegEs
push [ebx].CsSegDs
mov ebx, [ebx].CsEbx
pop ds
pop es
pop fs
pop gs
;
; Switch to 16bit CS
;
push KGDT_CODE16
push offset FLAT:Kbf30 - offset FLAT:_KiI386CallAbios@16
retf
Kbf30:
;
; "call" to 16 bit function
;
iretd
Kbf40:
;
; Push some of the returned context which will be needed to
; switch back to the 32 bit SS & CS.
;
db OPERAND_OVERRIDE
push ds
db OPERAND_OVERRIDE
push es
db OPERAND_OVERRIDE
push fs
db OPERAND_OVERRIDE
push gs
db OPERAND_OVERRIDE
push eax
db OPERAND_OVERRIDE
pushfd
db OPERAND_OVERRIDE
mov eax, KGDT_R0_PCR
mov fs, ax
db OPERAND_OVERRIDE
mov eax, KGDT_R3_DATA OR RPL_MASK
mov ds, ax
mov es, ax
xor eax, eax
;
; Switch back to 32 bit stack
;
STACK16_TO_STACK32
;
; Push the flat code selector followed by the return offset, then
; execute a far return and we'll be back in the 32-bit code space.
;
db OPERAND_OVERRIDE
push KGDT_R0_CODE
db OPERAND_OVERRIDE
push offset FLAT:Kbf50
db OPERAND_OVERRIDE
retf
Kbf50:
;
; Return resulting context
;
mov eax, dword ptr [esp+44+LocalStack] ; (eax) = Context Record
pop [eax].CsEflags
pop [eax].CsEax
pop [eax].CsSegGs
pop [eax].CsSegFs
pop [eax].CsSegEs
pop [eax].CsSegDs
mov [eax].CsEbx, ebx
mov [eax].CsEcx, ecx
mov [eax].CsEdx, edx
mov [eax].CsEdi, edi
mov [eax].CsEsi, esi
mov [eax].CsEbp, ebp
;
; Restore regs & return
;
dec _KiInBiosCall ; Clear the 'In Bios' flag
add esp,LocalStack ;remove scratch space
pop edi
pop esi
pop ebx
pop ebp
stdRET _KeI386Call16BitFunction
stdENDP _KeI386Call16BitFunction
;++
; USHORT
; KeI386Call16BitCStyleFunction (
; IN ULONG EntryOffset,
; IN ULONG EntrySelector,
; IN PUCHAR Parameters,
; IN ULONG Size
; )
;
; Routine Description:
;
; This function calls the 16 bit function which supports C style calling convension.
;
; Parameters:
;
; EntryOffset and EntrySelector - specifies the entry point of the 16 bit function.
;
; Parameters - supplies a pointer to a parameter block which will be
; passed to 16 bit function as parameters.
;
; Size - supplies the size of the parameter block.
;
; NOTE: Caller must be at DPC_LEVEL
;
; Returned Value:
;
; AX returned by 16 bit function.
;
;--
cPublicProc _KeI386Call16BitCStyleFunction,4
;
; verify CurrentIrql
; verify context flags
;
push ebp ; save nonvolatile registers
push ebx
push esi
push edi
COPY_CALL_FRAME _KiBiosFrame
inc _KiInBiosCall ; Set the 'In Bios' flag
if DBG
cmp _KiInBiosCall,2
jb @F
push offset FLAT:KiBiosReenteredAssert
call _dbgPrint
add esp, 4
@@:
endif
mov edi, esp
sub esp,LocalStack ; now, add in some scratch space
mov esi, dword ptr [esp + LocalStack +28] ; (esi)->BiosParameters
or esi, esi
jz short @f
mov ecx, [esp + LocalStack +32] ; (ecx) = parameter size
sub esp, ecx ; allocate space on TOS to copy parameters
mov edi, esp
rep movsb ; (edi)-> Top of nonvolatile reg save area
add edi, LocalStack ; edi now points to original stack
@@:
;
; We're using a 32bit CS:EIP - go to a 16bit CS:IP
; Note the base of KiAbiosCallSelector is the flat address of _KiI386AbiosCall
; routine.
;
;
; Remap current stack to 16:16 stack. The base of the 16bit stack selector is
; the base of current kernel stack.
;
STACK32_TO_STACK16 ; Switch to 16bit stack
;
; Push return address from 16 bit function call to kernel
;
push word ptr KGDT_CODE16
push word ptr (offset FLAT:Kbfex40 - offset FLAT:_KiI386CallAbios@16)
push word ptr 0200h ; flags
push word ptr [edi + 24 ] ; entry selector
push word ptr [edi + 20 ] ; entry offset
;
; Switch to 16bit CS
;
push KGDT_CODE16
push offset FLAT:Kbfex30 - offset FLAT:_KiI386CallAbios@16
retf
Kbfex30:
;
; "call" to 16 bit function
;
iretd
Kbfex40:
;
; Save return value.
;
db OPERAND_OVERRIDE
push eax
;
; Restore Flat mode segment registers.
;
db OPERAND_OVERRIDE
mov eax, KGDT_R0_PCR
mov fs, ax
db OPERAND_OVERRIDE
mov eax, KGDT_R3_DATA OR RPL_MASK
mov ds, ax
mov es, ax
xor eax, eax
;
; Switch back to 32 bit stack
;
STACK16_TO_STACK32
;
; Push the flat code selector followed by the return offset, then
; execute a far return and we'll be back in the 32-bit code space.
;
db OPERAND_OVERRIDE
push KGDT_R0_CODE
db OPERAND_OVERRIDE
push offset FLAT:Kbfex50
db OPERAND_OVERRIDE
retf
Kbfex50:
pop eax
;
; Restore regs & return
;
dec _KiInBiosCall ; Clear the 'In Bios' flag
mov esp, edi ; Also removes the scratch space!
pop edi
pop esi
pop ebx
pop ebp
stdRET _KeI386Call16BitCStyleFunction
stdENDP _KeI386Call16BitCStyleFunction
;
; BBT cannot instrument code between BBT_Exclude_Selector_Code_Begin and this label
;
public _BBT_Exclude_Selector_Code_End
_BBT_Exclude_Selector_Code_End equ $
int 3
;;
;; END - power_management
;;
;; ********************************************************
public _KiEndOfCode16
_KiEndOfCode16 equ $
_TEXT ends
end
|
#include "stdafx.h"
#include "Headers/Sun.h"
namespace Divide {
namespace {
constexpr D64 g_numSecondsUpdateInterval = 30;
constexpr D64 SunDia = 0.53; // Sun radius degrees
constexpr D64 AirRefr = 34.0 / 60.0; // Atmospheric refraction degrees
constexpr D64 TwoPi = 2 * M_PI;
// Sun computation coefficients
constexpr D64 Longitude_A = 282.9404;
constexpr D64 Longitude_B = 4.70935E-5;
constexpr D64 Mean_A = 356.047;
constexpr D64 Mean_B = 0.9856002585;
constexpr D64 Eccentricity_A = 0.016709;
constexpr D64 Eccentricity_B = 1.151E-9;
constexpr D64 Oblique_A = Angle::DegreesToRadians(23.4393);
constexpr D64 Oblique_B = Angle::DegreesToRadians(3.563E-7);
constexpr D64 Ecliptic_A = Angle::DegreesToRadians(1.915);
constexpr D64 Ecliptic_B = Angle::DegreesToRadians(.02);
constexpr D64 FNrange(const D64 x) noexcept {
const D64 b = x / TwoPi;
const D64 a = TwoPi * (b - to_I32(b));
return a < 0 ? TwoPi + a : a;
}
// Calculating the hourangle
D64 f0(const D64 lat, const D64 declin) noexcept {
D64 dfo = Angle::DegreesToRadians(0.5 * SunDia + AirRefr);
if (lat < 0.0) {
dfo = -dfo; // Southern hemisphere
}
D64 fo = std::tan(declin + dfo) * std::tan(Angle::DegreesToRadians(lat));
if (fo > 0.99999) {
fo = 1.0; // to avoid overflow //
}
return std::asin(fo) + M_PI_2;
}
D64 FNsun(const D64 d, D64& RA, D64& delta, D64& L) noexcept {
// mean longitude of the Sun
const D64 W_DEG = Longitude_A + Longitude_B * d;
const D64 W_RAD = Angle::DegreesToRadians(W_DEG);
const D64 M_DEG = Mean_A + Mean_B * d;
const D64 M_RAD = Angle::DegreesToRadians(M_DEG);
// mean anomaly of the Sun
const D64 g = FNrange(M_RAD);
// eccentricity
const D64 ECC_RAD = Eccentricity_A - Eccentricity_B * d;
const D64 ECC_DEG = Angle::RadiansToDegrees(ECC_RAD);
// Obliquity of the ecliptic
const D64 obliq = Oblique_A - Oblique_B * d;
const D64 E_DEG = M_DEG + ECC_DEG * std::sin(g) * (1.0 + ECC_RAD * std::cos(g));
const D64 E_RAD = FNrange(Angle::DegreesToRadians(E_DEG));
D64 x = std::cos(E_RAD) - ECC_RAD;
D64 y = std::sin(E_RAD) * Sqrt(1.0 - SQUARED(ECC_RAD));
const D64 r = Sqrt(SQUARED(x) + SQUARED(y));
const D64 v = Angle::RadiansToDegrees(std::atan2(y, x));
// longitude of sun
const D64 lonsun = v + W_DEG;
const D64 lonsun_rad = Angle::DegreesToRadians(lonsun - 360.0 * (lonsun > 360.0 ? 1 : 0));
// sun's ecliptic rectangular coordinates
x = r * std::cos(lonsun_rad);
y = r * std::sin(lonsun_rad);
const D64 yequat = y * std::cos(obliq);
const D64 zequat = y * std::sin(obliq);
// Sun's mean longitude
L = FNrange(W_RAD + M_RAD);
delta = std::atan2(zequat, Sqrt(SQUARED(x) + SQUARED(yequat)));
RA = Angle::RadiansToDegrees(std::atan2(yequat, x));
// Ecliptic longitude of the Sun
return FNrange(L + Ecliptic_A * std::sin(g) + Ecliptic_B * std::sin(2 * g));
}
}
SunInfo SunPosition::CalculateSunPosition(const struct tm &dateTime, const F32 latitude, const F32 longitude) {
const D64 longit = to_D64(longitude);
const D64 latit = to_D64(latitude);
const D64 latit_rad = Angle::DegreesToRadians(latit);
// this is Y2K compliant method
const I32 year = dateTime.tm_year + 1900;
const I32 m = dateTime.tm_mon + 1;
const I32 day = dateTime.tm_mday;
// clock time just now
const D64 h = dateTime.tm_hour + dateTime.tm_min / 60.0;
const D64 tzone = _timezone;
// year = 1990; m=4; day=19; h=11.99; // local time
const D64 UT = h - tzone; // universal time
// Get the days to J2000
// h is UT in decimal hours
// FNday only works between 1901 to 2099 - see Meeus chapter 7
const D64 jd = [year, h, m, day]() noexcept {
const I32 luku = -7 * (year + (m + 9) / 12) / 4 + 275 * m / 9 + day;
// type casting necessary on PC DOS and TClite to avoid overflow
return to_D64(luku + year * 367) - 730530.0 + h / 24.0;
}();
// Use FNsun to find the ecliptic longitude of the Sun
D64 RA = 0.0, delta = 0.0, L = 0.0;
const D64 lambda = FNsun(jd, RA, delta, L);
const D64 cos_delta = std::cos(delta);
const D64 delta_deg = Angle::RadiansToDegrees(delta);
// Obliquity of the ecliptic
const D64 obliq = Oblique_A - Oblique_B * jd;
// Sidereal time at Greenwich meridian
const D64 GMST0 = Angle::RadiansToDegrees(L) / 15.0 + 12.0; // hours
const D64 SIDTIME = GMST0 + UT + longit / 15.0;
// Hour Angle
D64 ha = FNrange(Angle::DegreesToRadians(15.0 * SIDTIME - RA));// degrees
const D64 x = std::cos(ha) * cos_delta;
const D64 y = std::sin(ha) * cos_delta;
const D64 z = std::sin(delta);
const D64 xhor = x * std::sin(latit_rad) - z * std::cos(latit_rad);
const D64 yhor = y;
const D64 zhor = x * std::cos(latit_rad) + z * std::sin(latit_rad);
const D64 azim = FNrange(std::atan2(yhor, xhor) + M_PI);
const D64 altit = std::asin(zhor);
// delta = asin(sin(obliq) * sin(lambda));
const D64 alpha = std::atan2(std::cos(obliq) * std::sin(lambda), std::cos(lambda));
// Find the Equation of Time in minutes
const D64 equation = 1440 - Angle::RadiansToDegrees(L - alpha) * 4;
ha = f0(latit, delta);
// arctic winter //
D64 riset = 12.0 - 12.0 * ha / M_PI + tzone - longit / 15.0 + equation / 60.0;
D64 settm = 12.0 + 12.0 * ha / M_PI + tzone - longit / 15.0 + equation / 60.0;
D64 noont = riset + 12.0 * ha / M_PI;
D64 altmax = 90.0 + delta_deg - latit;
if (altmax > 90.0) {
altmax = 180.0 - altmax; //to express as degrees from the N horizon
}
noont -= 24 * (noont > 24 ? 1 : 0);
riset -= 24 * (riset > 24 ? 1 : 0);
settm -= 24 * (settm > 24 ? 1 : 0);
const auto calcTime = [](const D64 dhr) noexcept {
SimpleTime ret;
ret._hour = to_U8(dhr);
ret._minutes = to_U8((dhr - to_D64(ret._hour)) * 60);
return ret;
};
SunInfo ret;
ret.sunriseTime = calcTime(riset);
ret.sunsetTime = calcTime(settm);
ret.noonTime = calcTime(noont);
ret.altitude = to_F32(altit);
ret.azimuth = to_F32(azim);
ret.altitudeMax = to_F32(altmax);
ret.declination = to_F32(delta_deg);
return ret;
}
D64 SunPosition::CorrectAngle(const D64 angleInRadians) noexcept {
if (angleInRadians < 0) {
return TwoPi - std::fmod(std::abs(angleInRadians), TwoPi);
}
if (angleInRadians > TwoPi) {
return std::fmod(angleInRadians, TwoPi);
}
return angleInRadians;
}
void Sun::SetLocation(const F32 longitude, const F32 latitude) noexcept {
if (!COMPARE(_longitude, longitude)) {
_longitude = longitude;
_dirty = true;
}
if (!COMPARE(_latitude, latitude)) {
_latitude = latitude;
_dirty = true;
}
}
void Sun::SetDate(struct tm &dateTime) noexcept {
const time_t t1 = mktime(&_dateTime);
const time_t t2 = mktime(&dateTime);
const D64 diffSecs = std::abs(difftime(t1, t2));
if (t1 == -1 || diffSecs > g_numSecondsUpdateInterval) {
_dateTime = dateTime;
_dirty = true;
}
}
SimpleTime Sun::GetTimeOfDay() const noexcept {
return SimpleTime{
to_U8(_dateTime.tm_hour),
to_U8(_dateTime.tm_min)
};
}
SimpleLocation Sun::GetGeographicLocation() const noexcept {
return SimpleLocation{
_latitude,
_longitude
};
}
const SunInfo& Sun::GetDetails() const {
if (_dirty) {
_cachedDetails = SunPosition::CalculateSunPosition(_dateTime, _latitude, _longitude);
_dirty = false;
}
return _cachedDetails;
}
[[nodiscard]] vec3<F32> Sun::GetSunPosition(const F32 radius) const {
const SunInfo& info = GetDetails();
const F32 phi = Angle::DegreesToRadians(90 - Angle::RadiansToDegrees(info.altitude));
const F32 theta = info.azimuth;
const F32 sinPhiRadius = std::sin(phi) * radius;
return vec3<F32> {
sinPhiRadius * std::sin(theta),
std::cos(phi) * radius,
sinPhiRadius * std::cos(theta)
};
}
} //namespace Divide |
/*
* IRremote
* Version 0.11 August, 2009
* Copyright 2009 Ken Shirriff
* For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
*
* Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
* Modified by Mitra Ardron <mitra@mitra.biz>
* Added Sanyo and Mitsubishi controllers
* Modified Sony to spot the repeat codes that some Sony's send
*
* Interrupt code based on NECIRrcv by Joe Knapp
* http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
* Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
*
* JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
*/
#include "IRremote.h"
#include "IRremoteInt.h"
// Provides ISR
#include <avr/interrupt.h>
volatile irparams_t irparams;
// These versions of MATCH, MATCH_MARK, and MATCH_SPACE are only for debugging.
// To use them, set DEBUG in IRremoteInt.h
// Normally macros are used for efficiency
#ifdef DEBUG
int MATCH(int measured, int desired) {
Serial.print("Testing: ");
Serial.print(TICKS_LOW(desired), DEC);
Serial.print(" <= ");
Serial.print(measured, DEC);
Serial.print(" <= ");
Serial.println(TICKS_HIGH(desired), DEC);
return measured >= TICKS_LOW(desired) && measured <= TICKS_HIGH(desired);
}
int MATCH_MARK(int measured_ticks, int desired_us) {
Serial.print("Testing mark ");
Serial.print(measured_ticks * USECPERTICK, DEC);
Serial.print(" vs ");
Serial.print(desired_us, DEC);
Serial.print(": ");
Serial.print(TICKS_LOW(desired_us + MARK_EXCESS), DEC);
Serial.print(" <= ");
Serial.print(measured_ticks, DEC);
Serial.print(" <= ");
Serial.println(TICKS_HIGH(desired_us + MARK_EXCESS), DEC);
return measured_ticks >= TICKS_LOW(desired_us + MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS);
}
int MATCH_SPACE(int measured_ticks, int desired_us) {
Serial.print("Testing space ");
Serial.print(measured_ticks * USECPERTICK, DEC);
Serial.print(" vs ");
Serial.print(desired_us, DEC);
Serial.print(": ");
Serial.print(TICKS_LOW(desired_us - MARK_EXCESS), DEC);
Serial.print(" <= ");
Serial.print(measured_ticks, DEC);
Serial.print(" <= ");
Serial.println(TICKS_HIGH(desired_us - MARK_EXCESS), DEC);
return measured_ticks >= TICKS_LOW(desired_us - MARK_EXCESS) && measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS);
}
#endif
void IRsend::mark(int time) {
// Sends an IR mark for the specified number of microseconds.
// The mark output is modulated at the PWM frequency.
TIMER_ENABLE_PWM; // Enable pin 3 PWM output
delayMicroseconds(time);
}
/* Leave pin off for time (given in microseconds) */
void IRsend::space(int time) {
// Sends an IR space for the specified number of microseconds.
// A space is no output, so the PWM output is disabled.
TIMER_DISABLE_PWM; // Disable pin 3 PWM output
delayMicroseconds(time);
}
void IRsend::enableIROut(int khz) {
// Enables IR output. The khz value controls the modulation frequency in kilohertz.
// The IR output will be on pin 3 (OC2B).
// This routine is designed for 36-40KHz; if you use it for other values, it's up to you
// to make sure it gives reasonable results. (Watch out for overflow / underflow / rounding.)
// TIMER2 is used in phase-correct PWM mode, with OCR2A controlling the frequency and OCR2B
// controlling the duty cycle.
// There is no prescaling, so the output frequency is 16MHz / (2 * OCR2A)
// To turn the output on and off, we leave the PWM running, but connect and disconnect the output pin.
// A few hours staring at the ATmega documentation and this will all make sense.
// See my Secrets of Arduino PWM at http://arcfn.com/2009/07/secrets-of-arduino-pwm.html for details.
// Disable the Timer2 Interrupt (which is used for receiving IR)
TIMER_DISABLE_INTR; //Timer2 Overflow Interrupt
pinMode(TIMER_PWM_PIN, OUTPUT);
digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
// COM2A = 00: disconnect OC2A
// COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted
// WGM2 = 101: phase-correct PWM with OCRA as top
// CS2 = 000: no prescaling
// The top value for the timer. The modulation frequency will be SYSCLOCK / 2 / OCR2A.
TIMER_CONFIG_KHZ(khz);
}
IRrecv::IRrecv(int recvpin)
{
irparams.recvpin = recvpin;
irparams.blinkflag = 0;
}
// initialization
void IRrecv::enableIRIn() {
cli();
// setup pulse clock timer interrupt
//Prescale /8 (16M/8 = 0.5 microseconds per tick)
// Therefore, the timer interval can range from 0.5 to 128 microseconds
// depending on the reset value (255 to 0)
TIMER_CONFIG_NORMAL();
//Timer2 Overflow Interrupt Enable
TIMER_ENABLE_INTR;
TIMER_RESET;
sei(); // enable interrupts
// initialize state machine variables
irparams.rcvstate = STATE_IDLE;
irparams.rawlen = 0;
// set pin modes
pinMode(irparams.recvpin, INPUT);
}
// enable/disable blinking of pin 13 on IR processing
void IRrecv::blink13(int blinkflag)
{
irparams.blinkflag = blinkflag;
if (blinkflag)
pinMode(BLINKLED, OUTPUT);
}
// TIMER2 interrupt code to collect raw data.
// Widths of alternating SPACE, MARK are recorded in rawbuf.
// Recorded in ticks of 50 microseconds.
// rawlen counts the number of entries recorded so far.
// First entry is the SPACE between transmissions.
// As soon as a SPACE gets long, ready is set, state switches to IDLE, timing of SPACE continues.
// As soon as first MARK arrives, gap width is recorded, ready is cleared, and new logging starts
ISR(TIMER_INTR_NAME)
{
TIMER_RESET;
uint8_t irdata = (uint8_t)digitalRead(irparams.recvpin);
irparams.timer++; // One more 50us tick
if (irparams.rawlen >= RAWBUF) {
// Buffer overflow
irparams.rcvstate = STATE_STOP;
}
switch(irparams.rcvstate) {
case STATE_IDLE: // In the middle of a gap
if (irdata == MARK) {
if (irparams.timer < GAP_TICKS) {
// Not big enough to be a gap.
irparams.timer = 0;
}
else {
// gap just ended, record duration and start recording transmission
irparams.rawlen = 0;
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_MARK;
}
}
break;
case STATE_MARK: // timing MARK
if (irdata == SPACE) { // MARK ended, record time
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_SPACE;
}
break;
case STATE_SPACE: // timing SPACE
if (irdata == MARK) { // SPACE just ended, record it
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_MARK;
}
else { // SPACE
if (irparams.timer > GAP_TICKS) {
// big SPACE, indicates gap between codes
// Mark current code as ready for processing
// Switch to STOP
// Don't reset timer; keep counting space width
irparams.rcvstate = STATE_STOP;
}
}
break;
case STATE_STOP: // waiting, measuring gap
if (irdata == MARK) { // reset gap timer
irparams.timer = 0;
}
break;
}
if (irparams.blinkflag) {
if (irdata == MARK) {
BLINKLED_ON(); // turn pin 13 LED on
}
else {
BLINKLED_OFF(); // turn pin 13 LED off
}
}
}
void IRrecv::resume() {
irparams.rcvstate = STATE_IDLE;
irparams.rawlen = 0;
}
// Decodes the received IR message
// Returns 0 if no data ready, 1 if data ready.
// Results of decoding are stored in results
int IRrecv::decode(decode_results *results) {
results->rawbuf = irparams.rawbuf;
results->rawlen = irparams.rawlen;
if (irparams.rcvstate != STATE_STOP) {
return ERR;
}
#ifdef DEBUG
Serial.println("Attempting Phoenix LTX decode");
#endif
if (decodePHOENIX_LTX(results)) {
return DECODED;
}
// decodeHash returns a hash on any input.
// Thus, it needs to be last in the list.
// If you add any decodes, add them before this.
if (decodeHash(results)) {
return DECODED;
}
// Throw away and start over
resume();
return ERR;
}
long IRrecv::decodePHOENIX_LTX(decode_results *results) {
long data = 0;
int offset = 1;
int i = 0;
//HEAD
if (results->rawlen != 18) {
return ERR;
}
if (!MATCH_MARK(results->rawbuf[offset], PHOENIX_HDR_MARK)) {
return ERR;
}
offset++;
if (!MATCH_SPACE(results->rawbuf[offset], PHOENIX_HDR_SPACE)) {
return ERR;
}
offset++;
if (!MATCH_MARK(results->rawbuf[offset], PHOENIX_HDR_MARK)) {
return ERR;
}
offset++;
for (i = 0; i < 7; i++) {
if (i % 2 == 0) {
if (!MATCH_SPACE(results->rawbuf[offset], 2000)) {
Serial.println(i, DEC);
return ERR;
}
} else {
if (!MATCH_MARK(results->rawbuf[offset], 1000)) {
Serial.println(i, DEC);
return ERR;
}
}
offset++;
}
Serial.println("Data");
//DATA
for (i = 0; i < 3; i++) {
if (MATCH_MARK(results->rawbuf[offset], PHOENIX_LTX_ONE_MARK)) {
data << 1;
data |= 1;
} else if (MATCH_MARK(results->rawbuf[offset], PHOENIX_LTX_ZERO_MARK)) {
data << 1;
data |= 0;
} else {
Serial.println(i, DEC);
return ERR;
}
offset++;
}
Serial.println("Tail");
//TAIL
for (i = 0; i < 2; i++) {
if (!MATCH_SPACE(results->rawbuf[offset], 2000)) {
return ERR;
}
offset++;
if (!MATCH_MARK(results->rawbuf[offset], 1000)) {
return ERR;
}
offset++;
}
// Success
results->bits = 3;
results->value = data;
results->decode_type = PHOENIX_LTX;
return DECODED;
}
/* -----------------------------------------------------------------------
* hashdecode - decode an arbitrary IR code.
* Instead of decoding using a standard encoding scheme
* (e.g. Sony, NEC, RC5), the code is hashed to a 32-bit value.
*
* The algorithm: look at the sequence of MARK signals, and see if each one
* is shorter (0), the same length (1), or longer (2) than the previous.
* Do the same with the SPACE signals. Hszh the resulting sequence of 0's,
* 1's, and 2's to a 32-bit value. This will give a unique value for each
* different code (probably), for most code systems.
*
* http://arcfn.com/2010/01/using-arbitrary-remotes-with-arduino.html
*/
// Compare two tick values, returning 0 if newval is shorter,
// 1 if newval is equal, and 2 if newval is longer
// Use a tolerance of 20%
int IRrecv::compare(unsigned int oldval, unsigned int newval) {
if (newval < oldval * .8) {
return 0;
}
else if (oldval < newval * .8) {
return 2;
}
else {
return 1;
}
}
// Use FNV hash algorithm: http://isthe.com/chongo/tech/comp/fnv/#FNV-param
#define FNV_PRIME_32 16777619
#define FNV_BASIS_32 2166136261
/* Converts the raw code values into a 32-bit hash code.
* Hopefully this code is unique for each button.
* This isn't a "real" decoding, just an arbitrary value.
*/
long IRrecv::decodeHash(decode_results *results) {
// Require at least 6 samples to prevent triggering on noise
if (results->rawlen < 6) {
return ERR;
}
long hash = FNV_BASIS_32;
for (int i = 1; i+2 < results->rawlen; i++) {
int value = compare(results->rawbuf[i], results->rawbuf[i+2]);
// Add value into the hash
hash = (hash * FNV_PRIME_32) ^ value;
}
results->value = hash;
results->bits = 32;
results->decode_type = UNKNOWN;
return DECODED;
} |
db "ARMOR@" ; species name
dw 607, 4450 ; height, weight
db "In just one of its"
next "mighty hands, it"
next "has the power to"
page "make the ground"
next "shake and moun-"
next "tains crumble.@"
|
; A095665: Tenth column (m=9) of (1,3)-Pascal triangle A095660.
; 3,28,145,550,1705,4576,11011,24310,50050,97240,179894,319124,545870,904400,1456730,2288132,3513917,5287700,7811375,11347050,16231215,22891440,31865925,43826250,59603700,80219568,106919868,141214920
lpb $0,1
mov $3,$0
cal $3,95664 ; Ninth column (m=8) of (1,3)-Pascal triangle A095660.
sub $0,1
mov $1,$0
add $2,$3
add $1,$2
lpe
add $1,3
|
; A007917: Version 1 of the "previous prime" function: largest prime <= n.
; 2,3,3,5,5,7,7,7,7,11,11,13,13,13,13,17,17,19,19,19,19,23,23,23,23,23,23,29,29,31,31,31,31,31,31,37,37,37,37,41,41,43,43,43,43,47,47,47,47,47,47,53,53,53,53,53,53,59,59,61,61,61,61,61,61,67,67,67,67,71,71,73,73,73,73,73,73,79,79,79,79,83,83,83,83,83,83,89,89,89,89,89,89,89,89,97,97,97,97,101
add $0,1
lpb $0
mov $2,$0
seq $2,5171 ; Characteristic function of nonprimes: 0 if n is prime, else 1.
sub $0,$2
lpe
add $0,1
|
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php.
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadTr.Asm
;
; Abstract:
;
; AsmReadTr function
;
; Notes:
;
;------------------------------------------------------------------------------
SECTION .text
;------------------------------------------------------------------------------
; UINT16
; EFIAPI
; AsmReadTr (
; VOID
; );
;------------------------------------------------------------------------------
global ASM_PFX(AsmReadTr)
ASM_PFX(AsmReadTr):
str ax
ret
|
; A169611: Number of prime divisors of n that are not greater than 3, counted with multiplicity.
; 0,1,1,2,0,2,0,3,2,1,0,3,0,1,1,4,0,3,0,2,1,1,0,4,0,1,3,2,0,2,0,5,1,1,0,4,0,1,1,3,0,2,0,2,2,1,0,5,0,1,1,2,0,4,0,3,1,1,0,3,0,1,2,6,0,2,0,2,1,1,0,5,0,1,1,2,0,2,0,4,4,1,0,3,0,1,1,3,0,3,0,2,1,1,0,6,0,1,2,2,0,2,0,3,1,1,0,5,0,1,1,4,0,2,0,2,2,1,0,4,0,1,1,2,0,3,0,7,1,1,0,3,0,1,3,3,0,2,0,2,1,1,0,6,0,1,1,2,0,2,0,3,2,1,0,3,0,1,1,5,0,5,0,2,1,1,0,4,0,1,2,2,0,2,0,4,1,1,0,4,0,1,1,3,0,2,0,2,3,1,0,7,0,1,1,2,0,3,0,3,1,1,0,3,0,1,2,4,0,2,0,2,1,1,0,6,0,1,1,2,0,2,0,5,2,1,0,3,0,1,1,3,0,3,0,2,1,1,0,5,0,1,5,2,0,2,0,3,1,1
mov $3,$0
mov $5,2
lpb $5,1
clr $0,3
mov $0,$3
sub $5,1
add $0,$5
mov $1,$0
lpb $0,1
div $1,3
add $2,$1
add $2,$0
div $0,2
lpe
mov $1,$2
mov $6,$5
lpb $6,1
mov $4,$1
sub $6,1
lpe
lpe
lpb $3,1
mov $3,0
sub $4,$1
lpe
mov $1,$4
sub $1,1
|
;===============================================================================
; Copyright 2015-2020 Intel Corporation
;
; 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.
;===============================================================================
;
;
; Purpose: Cryptography Primitive.
; Message block processing according to SHA-1
;
; Content:
; UpdateSHA1ni
;
;
%include "asmdefs.inc"
%include "ia_32e.inc"
%include "pcpvariant.inc"
%if (_ENABLE_ALG_SHA1_)
%if (_SHA_NI_ENABLING_ == _FEATURE_ON_) || (_SHA_NI_ENABLING_ == _FEATURE_TICKTOCK_)
;;%if (_IPP32E >= _IPP32E_Y8 )
segment .text align=IPP_ALIGN_FACTOR
align IPP_ALIGN_FACTOR
UPPER_DWORD_MASK \
DQ 00000000000000000h, 0ffffffff00000000h
PSHUFFLE_BYTE_FLIP_MASK \
DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
align IPP_ALIGN_FACTOR
;*****************************************************************************************
;* Purpose: Update internal digest according to message block
;*
;* void UpdateSHA1ni(DigestSHA1 digest, const Ipp32u* mblk, int mlen, const void* pParam)
;*
;*****************************************************************************************
%ifndef _VXWORKS
IPPASM UpdateSHA1ni,PUBLIC
%assign LOCAL_FRAME 16*2
USES_GPR rsi,rdi
USES_XMM xmm6,xmm7
COMP_ABI 4
%xdefine MBS_SHA1 (64) ; SHA-1 message block length (bytes)
%xdefine HASH_PTR rdi ; 1st arg
%xdefine MSG_PTR rsi ; 2nd arg
%xdefine MSG_LEN rdx ; 3rd arg
%xdefine ABCD xmm0
%xdefine E0 xmm1 ; Need two E's b/c they ping pong
%xdefine E1 xmm2
%xdefine MSG0 xmm3
%xdefine MSG1 xmm4
%xdefine MSG2 xmm5
%xdefine MSG3 xmm6
%xdefine SHUF_MASK xmm7
;
; stack frame
;
%xdefine abcd_save rsp
%xdefine e_save rsp+16
movsxd MSG_LEN, edx ; expand mLen
test MSG_LEN, MSG_LEN
jz .quit
;; load initial hash values
movdqu ABCD, oword [HASH_PTR]
pinsrd E0, dword [HASH_PTR+16], 3
pand E0, oword [rel UPPER_DWORD_MASK]
pshufd ABCD, ABCD, 01Bh
movdqa SHUF_MASK, oword [rel PSHUFFLE_BYTE_FLIP_MASK]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; process next data block
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.sha1_block_loop:
movdqa oword [abcd_save], ABCD
movdqa oword [e_save], E0
;; rounds 0-3
movdqu MSG0, oword [MSG_PTR +0*16]
pshufb MSG0, SHUF_MASK
paddd E0, MSG0
movdqa E1, ABCD
sha1rnds4 ABCD, E0, 0
;movdqu oword [rcx+16*0], ABCD
;; rounds 4-7
movdqu MSG1, oword [MSG_PTR +1*16]
pshufb MSG1, SHUF_MASK
sha1nexte E1, MSG1
movdqa E0, ABCD
sha1rnds4 ABCD, E1, 0
sha1msg1 MSG0, MSG1
;movdqu oword [rcx+16*1], ABCD
;; rounds 8-11
movdqu MSG2, oword [MSG_PTR +2*16]
pshufb MSG2, SHUF_MASK
sha1nexte E0, MSG2
movdqa E1, ABCD
sha1rnds4 ABCD, E0, 0
sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*2], ABCD
;; rounds 12-15
movdqu MSG3, oword [MSG_PTR +3*16]
pshufb MSG3, SHUF_MASK
sha1nexte E1, MSG3
movdqa E0, ABCD
sha1msg2 MSG0, MSG3
sha1rnds4 ABCD, E1, 0
sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*3], ABCD
;; rounds 16-19
sha1nexte E0, MSG0
movdqa E1, ABCD
sha1msg2 MSG1, MSG0
sha1rnds4 ABCD, E0, 0
sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*4], ABCD
;; rounds 20-23
sha1nexte E1, MSG1
movdqa E0, ABCD
sha1msg2 MSG2, MSG1
sha1rnds4 ABCD, E1, 1
sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*5], ABCD
;; rounds 24-27
sha1nexte E0, MSG2
movdqa E1, ABCD
sha1msg2 MSG3, MSG2
sha1rnds4 ABCD, E0, 1
sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*6], ABCD
;; rounds 28-31
sha1nexte E1, MSG3
movdqa E0, ABCD
sha1msg2 MSG0, MSG3
sha1rnds4 ABCD, E1, 1
sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*7], ABCD
;; rounds 32-35
sha1nexte E0, MSG0
movdqa E1, ABCD
sha1msg2 MSG1, MSG0
sha1rnds4 ABCD, E0, 1
sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*8], ABCD
;; rounds 36-39
sha1nexte E1, MSG1
movdqa E0, ABCD
sha1msg2 MSG2, MSG1
sha1rnds4 ABCD, E1, 1
sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*9], ABCD
;; rounds 40-43
sha1nexte E0, MSG2
movdqa E1, ABCD
sha1msg2 MSG3, MSG2
sha1rnds4 ABCD, E0, 2
sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*10], ABCD
;; rounds 44-47
sha1nexte E1, MSG3
movdqa E0, ABCD
sha1msg2 MSG0, MSG3
sha1rnds4 ABCD, E1, 2
sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*11], ABCD
;; rounds 48-51
sha1nexte E0, MSG0
movdqa E1, ABCD
sha1msg2 MSG1, MSG0
sha1rnds4 ABCD, E0, 2
sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*12], ABCD
;; rounds 52-55
sha1nexte E1, MSG1
movdqa E0, ABCD
sha1msg2 MSG2, MSG1
sha1rnds4 ABCD, E1, 2
sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*13], ABCD
;; rounds 56-59
sha1nexte E0, MSG2
movdqa E1, ABCD
sha1msg2 MSG3, MSG2
sha1rnds4 ABCD, E0, 2
sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*14], ABCD
;; rounds 60-63
sha1nexte E1, MSG3
movdqa E0, ABCD
sha1msg2 MSG0, MSG3
sha1rnds4 ABCD, E1, 3
sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*15], ABCD
;; rounds 64-67
sha1nexte E0, MSG0
movdqa E1, ABCD
sha1msg2 MSG1, MSG0
sha1rnds4 ABCD, E0, 3
sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*16], ABCD
;; rounds 68-71
sha1nexte E1, MSG1
movdqa E0, ABCD
sha1msg2 MSG2, MSG1
sha1rnds4 ABCD, E1, 3
pxor MSG3, MSG1
;movdqu oword [rcx+16*17], ABCD
;; rounds 72-75
sha1nexte E0, MSG2
movdqa E1, ABCD
sha1msg2 MSG3, MSG2
sha1rnds4 ABCD, E0, 3
;movdqu oword [rcx+16*18], ABCD
;; rounds 76-79
sha1nexte E1, MSG3
movdqa E0, ABCD
sha1rnds4 ABCD, E1, 3
;movdqu oword [rcx+16*19], ABCD
;; add current hash values with previously saved
sha1nexte E0, oword [e_save]
paddd ABCD, oword [abcd_save]
add MSG_PTR, MBS_SHA1
sub MSG_LEN, MBS_SHA1
jg .sha1_block_loop
;; write hash values back in the correct order
pshufd ABCD, ABCD, 01Bh
movdqu oword [HASH_PTR], ABCD
pextrd dword [HASH_PTR+16], E0, 3
.quit:
REST_XMM
REST_GPR
ret
ENDFUNC UpdateSHA1ni
%else ;; no sha ni support in VxWorks - therefore we temporary use db
IPPASM UpdateSHA1ni,PUBLIC
%assign LOCAL_FRAME 16*2
USES_GPR rsi,rdi
USES_XMM xmm6,xmm7
COMP_ABI 4
%xdefine MBS_SHA1 (64) ; SHA-1 message block length (bytes)
%xdefine HASH_PTR rdi ; 1st arg
%xdefine MSG_PTR rsi ; 2nd arg
%xdefine MSG_LEN rdx ; 3rd arg
%xdefine ABCD xmm0
%xdefine E0 xmm1 ; Need two E's b/c they ping pong
%xdefine E1 xmm2
%xdefine MSG0 xmm3
%xdefine MSG1 xmm4
%xdefine MSG2 xmm5
%xdefine MSG3 xmm6
%xdefine SHUF_MASK xmm7
;
; stack frame
;
%xdefine abcd_save rsp
%xdefine e_save rsp+16
movsxd MSG_LEN, edx ; expand mLen
test MSG_LEN, MSG_LEN
jz .quit
;; load initial hash values
movdqu ABCD, oword [HASH_PTR]
pinsrd E0, dword [HASH_PTR+16], 3
pand E0, oword [rel UPPER_DWORD_MASK]
pshufd ABCD, ABCD, 01Bh
movdqa SHUF_MASK, oword [rel PSHUFFLE_BYTE_FLIP_MASK]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; process next data block
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.sha1_block_loop:
movdqa oword [abcd_save], ABCD
movdqa oword [e_save], E0
;; rounds 0-3
movdqu MSG0, oword [MSG_PTR +0*16]
pshufb MSG0, SHUF_MASK
paddd E0, MSG0
movdqa E1, ABCD
db 0FH,3AH,0CCH,0C1H,00H ;;sha1rnds4 ABCD, E0, 0
;movdqu oword [rcx+16*0], ABCD
;; rounds 4-7
movdqu MSG1, oword [MSG_PTR +1*16]
pshufb MSG1, SHUF_MASK
db 0FH,38H,0C8H,0D4H ;;sha1nexte E1, MSG1
movdqa E0, ABCD
db 0FH,3AH,0CCH,0C2H,00H ;;sha1rnds4 ABCD, E1, 0
db 0FH,38H,0C9H,0DCH ;;sha1msg1 MSG0, MSG1
;movdqu oword [rcx+16*1], ABCD
;; rounds 8-11
movdqu MSG2, oword [MSG_PTR +2*16]
pshufb MSG2, SHUF_MASK
db 0FH,38H,0C8H,0CDH ;;sha1nexte E0, MSG2
movdqa E1, ABCD
db 0Fh,3Ah,0CCh,0C1h,00h ;;sha1rnds4 ABCD, E0, 0
db 0Fh,38h,0C9h,0E5h ;;sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*2], ABCD
;; rounds 12-15
movdqu MSG3, oword [MSG_PTR +3*16]
pshufb MSG3, SHUF_MASK
db 0Fh,38H,0C8h,0D6h ;;sha1nexte E1, MSG3
movdqa E0, ABCD
db 0Fh,38H,0CAh,0DEh ;;sha1msg2 MSG0, MSG3
db 0Fh,3AH,0CCh,0C2h,00h ;;sha1rnds4 ABCD, E1, 0
db 0Fh,38H,0C9h,0EEh ;;sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*3], ABCD
;; rounds 16-19
db 0Fh,38H,0C8h,0CBh ;;sha1nexte E0, MSG0
movdqa E1, ABCD
db 0Fh,38H,0CAh,0E3h ;;sha1msg2 MSG1, MSG0
db 0Fh,3AH,0CCh,0C1h,00h ;;sha1rnds4 ABCD, E0, 0
db 0Fh,38H,0C9h,0F3h ;;sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*4], ABCD
;; rounds 20-23
db 0FH,38H,0C8h,0D4h ;;sha1nexte E1, MSG1
movdqa E0, ABCD
db 0FH,38H,0CAh,0ECH ;;sha1msg2 MSG2, MSG1
db 0FH,3AH,0CCH,0C2H,01H ;;sha1rnds4 ABCD, E1, 1
db 0FH,38H,0C9h,0DCh ;;sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*5], ABCD
;; rounds 24-27
db 0FH,38H,0C8h,0CDh ;;sha1nexte E0, MSG2
movdqa E1, ABCD
db 0FH,38H,0CAh,0F5h ;;sha1msg2 MSG3, MSG2
db 0FH,3AH,0CCh,0C1h,01h ;;sha1rnds4 ABCD, E0, 1
db 0FH,38H,0C9h,0E5h ;;sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*6], ABCD
;; rounds 28-31
db 0FH,38H,0C8H,0D6h ;;sha1nexte E1, MSG3
movdqa E0, ABCD
db 0FH,38H,0CAH,0DEh ;;sha1msg2 MSG0, MSG3
db 0FH,3AH,0CCH,0C2H,01h ;;sha1rnds4 ABCD, E1, 1
db 0FH,38H,0C9H,0EEh ;;sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*7], ABCD
;; rounds 32-35
db 0FH,38H,0C8H,0CBh ;;sha1nexte E0, MSG0
movdqa E1, ABCD
db 0FH,38H,0CAH,0E3h ;;sha1msg2 MSG1, MSG0
db 0FH,3AH,0CCH,0C1H,01h ;;sha1rnds4 ABCD, E0, 1
db 0FH,38H,0C9H,0F3h ;;sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*8], ABCD
;; rounds 36-39
db 0FH,38H,0C8H,0D4h ;;sha1nexte E1, MSG1
movdqa E0, ABCD
db 0FH,38H,0CAH,0ECh ;;sha1msg2 MSG2, MSG1
db 0FH,3AH,0CCH,0C2H,01h ;;sha1rnds4 ABCD, E1, 1
db 0FH,38H,0C9H,0DCh ;;sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*9], ABCD
;; rounds 40-43
db 0FH,38H,0C8H,0CDh ;;sha1nexte E0, MSG2
movdqa E1, ABCD
db 0FH,38H,0CAH,0F5h ;;sha1msg2 MSG3, MSG2
db 0FH,3AH,0CCH,0C1H,02h ;;sha1rnds4 ABCD, E0, 2
db 0FH,38H,0C9H,0E5h ;;sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*10], ABCD
;; rounds 44-47
db 0FH,38H,0C8H,0D6h ;;sha1nexte E1, MSG3
movdqa E0, ABCD
db 0FH,38H,0CAH,0DEh ;;sha1msg2 MSG0, MSG3
db 0FH,3AH,0CCH,0C2h,02h ;;sha1rnds4 ABCD, E1, 2
db 0FH,38H,0C9H,0EEh ;;sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*11], ABCD
;; rounds 48-51
db 0Fh,38H,0C8h,0CBh ;;sha1nexte E0, MSG0
movdqa E1, ABCD
db 0Fh,38H,0CAH,0E3h ;;sha1msg2 MSG1, MSG0
db 0Fh,3AH,0CCH,0C1H,02h ;;sha1rnds4 ABCD, E0, 2
db 0Fh,38H,0C9H,0F3h ;;sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*12], ABCD
;; rounds 52-55
db 0Fh,38H,0C8h,0D4h ;;sha1nexte E1, MSG1
movdqa E0, ABCD
db 0Fh,38H,0CAH,0ECh ;;sha1msg2 MSG2, MSG1
db 0Fh,3AH,0CCH,0C2H,02h ;;sha1rnds4 ABCD, E1, 2
db 0Fh,38H,0C9H,0DCh ;;sha1msg1 MSG0, MSG1
pxor MSG3, MSG1
;movdqu oword [rcx+16*13], ABCD
;; rounds 56-59
db 0Fh,38H,0C8H,0CDh ;;sha1nexte E0, MSG2
movdqa E1, ABCD
db 0Fh,38H,0CAH,0F5h ;;sha1msg2 MSG3, MSG2
db 0Fh,3AH,0CCH,0C1H,02h ;;sha1rnds4 ABCD, E0, 2
db 0Fh,38H,0C9H,0E5h ;;sha1msg1 MSG1, MSG2
pxor MSG0, MSG2
;movdqu oword [rcx+16*14], ABCD
;; rounds 60-63
db 0Fh,38H,0C8H,0D6h ;;sha1nexte E1, MSG3
movdqa E0, ABCD
db 0Fh,38H,0CAH,0DEh ;;sha1msg2 MSG0, MSG3
db 0Fh,3AH,0CCH,0C2H,03h ;;sha1rnds4 ABCD, E1, 3
db 0Fh,38H,0C9H,0EEh ;;sha1msg1 MSG2, MSG3
pxor MSG1, MSG3
;movdqu oword [rcx+16*15], ABCD
;; rounds 64-67
db 0Fh,38H,0C8H,0CBh ;;sha1nexte E0, MSG0
movdqa E1, ABCD
db 0Fh,38H,0CAH,0E3h ;;sha1msg2 MSG1, MSG0
db 0Fh,3AH,0CCH,0C1H,03h ;;sha1rnds4 ABCD, E0, 3
db 0Fh,38H,0C9H,0F3h ;;sha1msg1 MSG3, MSG0
pxor MSG2, MSG0
;movdqu oword [rcx+16*16], ABCD
;; rounds 68-71
db 0Fh,38H,0C8h,0D4h ;;sha1nexte E1, MSG1
movdqa E0, ABCD
db 0Fh,38H,0CAh,0ECh ;;sha1msg2 MSG2, MSG1
db 0Fh,3AH,0CCh,0C2h,03h ;;sha1rnds4 ABCD, E1, 3
pxor MSG3, MSG1
;movdqu oword [rcx+16*17], ABCD
;; rounds 72-75
db 0Fh,38H,0C8h,0CDh ;;sha1nexte E0, MSG2
movdqa E1, ABCD
db 0Fh,38H,0CAh,0F5h ;;sha1msg2 MSG3, MSG2
db 0Fh,3AH,0CCh,0C1h,03h ;;sha1rnds4 ABCD, E0, 3
;movdqu oword [rcx+16*18], ABCD
;; rounds 76-79
db 0Fh,38H,0C8h,0D6h ;;sha1nexte E1, MSG3
movdqa E0, ABCD
db 0Fh,3AH,0CCh,0C2h,03h ;;sha1rnds4 ABCD, E1, 3
;movdqu oword [rcx+16*19], ABCD
;; add current hash values with previously saved
db 0Fh,38H,0C8h,4Ch,24h,10h ;;sha1nexte E0, oword [e_save]
paddd ABCD, oword [abcd_save]
add MSG_PTR, MBS_SHA1
sub MSG_LEN, MBS_SHA1
jg .sha1_block_loop
;; write hash values back in the correct order
pshufd ABCD, ABCD, 01Bh
movdqu oword [HASH_PTR], ABCD
pextrd dword [HASH_PTR+16], E0, 3
.quit:
REST_XMM
REST_GPR
ret
ENDFUNC UpdateSHA1ni
%endif ;; VxWorks
;;%endif ;; (_IPP32E >= _IPP32E_Y8)
%endif ;; _FEATURE_ON_ / _FEATURE_TICKTOCK_
%endif ;; _ENABLE_ALG_SHA1_
|
ORG #6E9C
INCBIN "NETH#"
ORG #7437
CALL INS_
ORG #B2F7
INS_ ;PUSH BC
LD A,#FB
IN A,(#FE)
AND 1+2+4+8+16
CP 1+2
JR NZ,NOSKIP
XOR A
LD (#7C6C),A
INC A
LD (#FF8E),A
NOSKIP LD A,(#FF8E)
;POP BC
RET
ORG #6E9C |
#pragma once
#include <cstdint>
#include <memory>
#include <vector>
#include "abstract_operator.hpp"
#include "concurrency/transaction_context.hpp"
#include "storage/table.hpp"
#include "utils/assert.hpp"
namespace opossum {
enum class ReadWriteOperatorState {
Pending, // The operator has been instantiated.
Executed, // Execution succeeded.
Failed, // Execution failed.
RolledBack, // Changes have been rolled back.
Committed // Changes have been committed.
};
/**
* AbstractReadWriteOperator is the superclass of all operators that need write access to tables.
* It mainly provides the commit_records and rollback_records methods,
* which are used to commit and rollback changes respectively.
*/
class AbstractReadWriteOperator : public AbstractOperator {
public:
explicit AbstractReadWriteOperator(const OperatorType type,
const std::shared_ptr<const AbstractOperator>& left = nullptr,
const std::shared_ptr<const AbstractOperator>& right = nullptr);
void execute() override;
/**
* Commits the operator and triggers any potential work following commits.
*/
void commit_records(const CommitID commit_id);
/**
* Rolls back the operator by unlocking all modified rows. No other action is necessary since commit_records should
* have never been called and the modifications were not made visible in the first place.
* Like commit, the rollback operation cannot fail.
*/
void rollback_records();
/**
* Returns true if a previous call to _on_execute produced an error.
*/
bool execute_failed() const;
ReadWriteOperatorState state() const;
protected:
/**
* Executes the operator. The context parameter is used to lock the rows that should be modified.
* Any modifications are not visible to other operators (that is, if the Validate operator has been applied properly)
* until commit_records has been called on this operator and the transaction manager has finished committing the
* respective transaction.
* The execution may fail if the operator attempts to lock rows that have been locked by other operators.
* In that case, execute_failed returns true after _on_execute has returned.
*
* @returns nullptr, since these operators do not create new intermediate results but modify existing tables
*/
std::shared_ptr<const Table> _on_execute(std::shared_ptr<TransactionContext> context) override = 0;
/**
* Commits the operator by applying the cid to the mvcc data for all modified rows and unlocking them. The
* modifications will be visible as soon as the TransactionManager has completed the commit for this cid.
* Unlike _on_execute, where failures are expected, the commit operation cannot fail.
*/
virtual void _on_commit_records(const CommitID commit_id) = 0;
/**
* Called by rollback_records.
*/
virtual void _on_rollback_records() = 0;
/**
* This method is used in sub classes in their _on_execute() method.
*
* If the execution fails, because for example some records have already been locked,
* mark_as_failed() is called to signal to AbstractReadWriteOperator that the execution failed.
*/
void _mark_as_failed();
private:
ReadWriteOperatorState _state;
};
} // namespace opossum
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x15970, %rax
nop
cmp %r11, %r11
mov $0x6162636465666768, %rbx
movq %rbx, %xmm5
movups %xmm5, (%rax)
nop
cmp %r15, %r15
lea addresses_UC_ht+0x97c0, %rsi
lea addresses_A_ht+0x19bc0, %rdi
nop
nop
nop
cmp %r8, %r8
mov $110, %rcx
rep movsq
nop
nop
nop
nop
nop
add $1008, %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r9
push %rbp
push %rdi
// Store
lea addresses_WT+0x10eb0, %rdi
nop
nop
nop
nop
inc %r13
mov $0x5152535455565758, %r14
movq %r14, %xmm4
vmovups %ymm4, (%rdi)
sub %rbp, %rbp
// Faulty Load
lea addresses_PSE+0x14fc0, %r9
clflush (%r9)
nop
nop
sub %r14, %r14
movups (%r9), %xmm7
vpextrq $0, %xmm7, %r13
lea oracles, %r14
and $0xff, %r13
shlq $12, %r13
mov (%r14,%r13,1), %r13
pop %rdi
pop %rbp
pop %r9
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 4}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 10}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
// Generated from /POI/java/org/apache/poi/ss/formula/functions/Var2or3ArgFunction.java
#include <org/apache/poi/ss/formula/functions/Var2or3ArgFunction.hpp>
#include <java/lang/ArrayStoreException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <org/apache/poi/ss/formula/eval/ErrorEval.hpp>
#include <org/apache/poi/ss/formula/eval/ValueEval.hpp>
#include <ObjectArray.hpp>
#include <SubArray.hpp>
template<typename ComponentType, typename... Bases> struct SubArray;
namespace poi
{
namespace ss
{
namespace formula
{
namespace eval
{
typedef ::SubArray< ::poi::ss::formula::eval::ValueEval, ::java::lang::ObjectArray > ValueEvalArray;
} // eval
} // formula
} // ss
} // poi
template<typename T>
static T* npc(T* t)
{
if(!t) throw new ::java::lang::NullPointerException();
return t;
}
poi::ss::formula::functions::Var2or3ArgFunction::Var2or3ArgFunction(const ::default_init_tag&)
: super(*static_cast< ::default_init_tag* >(0))
{
clinit();
}
poi::ss::formula::functions::Var2or3ArgFunction::Var2or3ArgFunction()
: Var2or3ArgFunction(*static_cast< ::default_init_tag* >(0))
{
ctor();
}
poi::ss::formula::eval::ValueEval* poi::ss::formula::functions::Var2or3ArgFunction::evaluate(::poi::ss::formula::eval::ValueEvalArray* args, int32_t srcRowIndex, int32_t srcColumnIndex)
{
switch (npc(args)->length) {
case int32_t(2):
return evaluate(srcRowIndex, srcColumnIndex, (*args)[int32_t(0)], (*args)[int32_t(1)]);
case int32_t(3):
return evaluate(srcRowIndex, srcColumnIndex, (*args)[int32_t(0)], (*args)[int32_t(1)], (*args)[int32_t(2)]);
}
return ::poi::ss::formula::eval::ErrorEval::VALUE_INVALID();
}
extern java::lang::Class *class_(const char16_t *c, int n);
java::lang::Class* poi::ss::formula::functions::Var2or3ArgFunction::class_()
{
static ::java::lang::Class* c = ::class_(u"org.apache.poi.ss.formula.functions.Var2or3ArgFunction", 54);
return c;
}
java::lang::Class* poi::ss::formula::functions::Var2or3ArgFunction::getClass0()
{
return class_();
}
|
;;****************************************************************************
;;++
;; Name : $RCSfile: isr.asm,v $
;; Title :
;; ASM Author : Jim Page
;; Created : 19/11/96
;;
;; Copyright : 1995-2022 Imagination Technologies (c)
;; License : MIT
;;
;; Description : Bi-modal ISRs for DOS PVR driver (DOS4GW)
;;
;; Program Type: ASM module
;;
;; RCS info:
;;
;; $Date: 1997/04/15 17:30:26 $
;; $Revision: 1.4 $
;; $Locker: $
;; $Log: isr.asm,v $
;; Revision 1.4 1997/04/15 17:30:26 jop
;; sorted out RM ISR to acknowlege interrupt
;;
;; Revision 1.3 1997/04/15 10:42:52 jop
;; Added call to DPMI fn 303 to handle RM ins better
;;
;; Revision 1.2 1997/04/09 12:56:51 jop
;; Fixed ds:/es: bug in protoected mode ISR
;;
;; Revision 1.1 1997/04/09 02:53:30 jop
;; Initial revision
;;
;;
;;--
;;****************************************************************************
PCX_INTSTATUS equ 003h*4
PCX_INTMASK equ 004h*4
PVR_STATUS_EOR equ 2
PVR_STATUS_RETRIG equ 080000000h
SetupPIC MACRO Val
LOCAL SP_001
cmp al, 7
jle SP_001
mov dx, 0A0h
mov al, 20h
out dx, al
SP_001:
mov dx, 20h
mov al, 20h
out dx, al
ENDM
;; real mode info structure passed in to us
RMDATA STRUCT
RMStatusFlags DWORD ?
RMBusDevFnc DWORD ?
RMIRQ DWORD ?
RMDATA ENDS
PMDATA STRUCT
PMStatusFlags DWORD ?
PMRegs DWORD ?
PMIRQ DWORD ?
PMDATA ENDS
;**
;** Assembler code for real-mode and protected-mode
;** INT 0xC interrupt handlers to support the INT 0xC
;** interrupt in both modes
;**
.386
;**
;** The real-mode interrupt handler is in a 16-bit code
;** segment so that the assembler will generate the right
;** code. We will copy this code down to a 16-bit segment
;** in low memory rather than executing it in place.
;**
PUBLIC ISR_pcx_realmode_
PUBLIC ISR_pcx_protmode_
PUBLIC _PMData
PUBLIC _RMData
READ_CONFIGURATION_DWORD_16 equ 0B10Ah
WRITE_CONFIGURATION_DWORD_16 equ 0B10Dh
SavePCIRegs MACRO
mov dx, 0CF8h
in eax, dx
push eax
ENDM
RestorePCIRegs MACRO
pop eax
mov dx, 0CF8h
out dx, eax
ENDM
;
; uses eax, dx
;
WritePCIReg32 MACRO BusDevFnc, Reg, Data
if 0
mov ax, WRITE_CONFIGURATION_DWORD_16
mov bx, WORD PTR BusDevFnc ; bDevFncID
mov di, Reg ; wReg
mov ecx, Data ; Data
int 1Ah
; carry set -> error
; " clr -> ok
else
mov eax, DWORD PTR BusDevFnc
shl eax, 8
mov al, Reg
or eax, 080000000h
mov dx, 0CF8h
out dx, eax
mov eax, Data
mov dx, 0CFCh
out dx, eax
endif
ENDM
;
; uses eax, dx
;
ReadPCIReg32 MACRO BusDevFnc, Reg
if 0
mov ax, READ_CONFIGURATION_DWORD_16
mov bx, WORD PTR BusDevFnc ; bDevFncID
mov di, Reg ; wReg
int 1Ah
; carry set -> error
; " clr -> ok
else
mov eax, DWORD PTR BusDevFnc
shl eax, 8
mov al, Reg
or eax, 080000000h
mov dx, 0CF8h
out dx, eax
mov dx, 0CFCh
in eax, dx
endif
; ecx -> data
ENDM
_TEXT16 SEGMENT BYTE PUBLIC USE16 'CODE'
ASSUME cs:_TEXT16
ISR_pcx_realmode_:
; cli ; already interrupts off?
if 1
; stick an @ sign at the top left of a mono screen
push es
push bx
mov bx, 0B000h
mov es, bx
mov bx, 0
mov BYTE PTR es:[bx], 64
pop bx
pop es
endif
push es
push si
push di
push ecx
push eax
SavePCIRegs
; get data offset from start of ISR. cs will point
; to start of ISR, so this offset is the offset
; to the start of the local data
mov si, _RMData - ISR_pcx_realmode_
; WORKAROUND TIME! move the PCX register base from FF000000 (ish)
; to b8000 (VGA reg space) to acknowlege the interrupt, then
; move it back again and hope noone notices
ReadPCIReg32 cs:[si].RMBusDevFnc, 010h
push eax
WritePCIReg32 cs:[si].RMBusDevFnc, 010h, 000b8000h
; get seg value of base of our register file
mov ax, 0B800h
mov es, ax
xor di, di
mov eax, DWORD PTR es:[di].PCX_INTSTATUS
and eax, DWORD PTR es:[di].PCX_INTMASK
jz not_us_rm
push dx
mov eax, DWORD PTR cs:[si].RMIRQ
SetupPIC
pop dx
or DWORD PTR cs:[si].RMStatusFlags, PVR_STATUS_EOR
not_us_rm:
pop ecx
WritePCIReg32 cs:[si].RMBusDevFnc, 010h, ecx
RestorePCIRegs
pop eax
pop ecx
pop di
pop si
pop es
sti
iret
_RMData RMDATA <>
_TEXT16 ENDS
;**
;** The protected-mode interrupt handler is in a 32-bit code
;** segment. Even so, we have to be sure to force an IRETD
;** at the end of the handler, because MASM doesn't generate
;** one. This handler will be called on a 32-bit stack by
;** DOS/4GW.
;**
;** _DATA is the flat model data segment, which we load into
;** ES so we can write to absolute address 0xB8000. (In the
;** flat model, DS is based at 0.)
;**
_DATA SEGMENT BYTE PUBLIC USE32 'DATA'
_PMData PMDATA <>
_DATA ENDS
DGROUP GROUP _DATA
; Protected mode interrupt handler (the straightforward one!)
_TEXT SEGMENT BYTE PUBLIC USE32 'CODE'
ASSUME cs:_TEXT
ISR_pcx_protmode_:
cli
push es
push eax
push ebx
mov bx,DGROUP
mov es, bx
mov eax, es:[_PMData].PMRegs
mov ebx, es:[eax+PCX_INTSTATUS]
and ebx, es:[eax+PCX_INTMASK]
jz not_us_pm
mov ebx, es:[_PMData].PMStatusFlags
or es:[ebx], PVR_STATUS_EOR
push dx
mov eax, es:[_PMData].PMIRQ
SetupPIC
pop dx
not_us_pm:
pop ebx
pop eax
pop es
sti
iretd
_TEXT ENDS
END
; end of $RCSfile: isr.asm,v $
|
/*
Copyright (C) 2011-2011 Bacula Systems(R) SA
Copyright (C) 2011-2012 Planets Communications B.V.
Copyright (C) 2013-2017 Bareos GmbH & Co. KG
This program is Free Software; you can modify it under the terms of
version three of the GNU Affero General Public License as published by the
Free Software Foundation, which is listed in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
/*
* extracted the TEST_PROGRAM functionality from the files in ..
* and adapted for gtest
*
* Philipp Storz, November 2017
*/
#include <stdio.h>
int err=0;
int nb=0;
void _ok(const char *file, int l, const char *op, int value, const char *label)
{
nb++;
if (!value) {
err++;
printf("ERR %.45s %s:%i on %s\n", label, file, l, op);
} else {
printf("OK %.45s\n", label);
}
}
#define ok(x, label) _ok(__FILE__, __LINE__, #x, (x), label)
void _nok(const char *file, int l, const char *op, int value, const char *label)
{
nb++;
if (value) {
err++;
printf("ERR %.45s %s:%i on !%s\n", label, file, l, op);
} else {
printf("OK %.45s\n", label);
}
}
#define nok(x, label) _nok(__FILE__, __LINE__, #x, (x), label)
int report()
{
printf("Result %i/%i OK\n", nb - err, nb);
return err>0;
}
struct ini_items test_items[] = {
/* name type comment req */
{ "datastore", INI_CFG_TYPE_NAME, "Target Datastore", 0 },
{ "newhost", INI_CFG_TYPE_STR, "New Hostname", 1 },
{ "int64val", INI_CFG_TYPE_INT64, "Int64", 1 },
{ "list", INI_CFG_TYPE_ALIST_STR, "list", 0 },
{ "bool", INI_CFG_TYPE_BOOL, "Bool", 0 },
{ "pint64", INI_CFG_TYPE_PINT64, "pint", 0 },
{ "int32", INI_CFG_TYPE_INT32, "int 32bit", 0 },
{ "plugin.test", INI_CFG_TYPE_STR, "test with .", 0 },
{ NULL, NULL, NULL, 0 }
};
int main()
{
FILE *fp;
int pos;
ConfigFile *ini = new ConfigFile();
POOL_MEM *buf;
nok(ini->register_items(test_items, 5), "Check bad sizeof ini_items");
ok(ini->register_items(test_items, sizeof(struct ini_items)), "Check sizeof ini_items");
if ((fp = fopen("test.cfg", "w")) == NULL) {
exit (1);
}
fprintf(fp, "# this is a comment\ndatastore=datastore1\nnewhost=\"host1\"\n");
fflush(fp);
nok(ini->parse("test.cfg"), "Test missing member");
ini->clear_items();
fprintf(fp, "int64val=12 # with a comment\n");
fprintf(fp, "int64val=10 # with a comment\n");
fprintf(fp, "int32=100\n");
fprintf(fp, "bool=yes\n");
fprintf(fp, "plugin.test=parameter\n");
fflush(fp);
ok(ini->parse("test.cfg"), "Test with all members");
ok(ini->items[0].found, "Test presence of char[]");
ok(!strcmp(ini->items[0].val.nameval, "datastore1"), "Test char[]");
ok(ini->items[1].found, "Test presence of char*");
ok(!strcmp(ini->items[1].val.strval, "host1"), "Test char*");
ok(ini->items[2].found, "Test presence of int");
ok(ini->items[2].val.int64val == 10, "Test int");
ok(ini->items[4].val.boolval == true, "Test bool");
ok(ini->items[6].val.int32val == 100, "Test int 32");
alist *list = ini->items[3].val.alistval;
nok(ini->items[3].found, "Test presence of alist");
fprintf(fp, "list=a\nlist=b\nlist=c\n");
fflush(fp);
ini->clear_items();
ok(ini->parse("test.cfg"), "Test with all members");
list = ini->items[3].val.alistval;
ok(ini->items[3].found, "Test presence of alist");
ok(list != NULL, "Test list member");
ok(list->size() == 3, "Test list size");
ok(!strcmp((char *)list->get(0), "a"), "Testing alist[0]");
ok(!strcmp((char *)list->get(1), "b"), "Testing alist[1]");
ok(!strcmp((char *)list->get(2), "c"), "Testing alist[2]");
system("cp -f test.cfg test3.cfg");
fprintf(fp, "pouet='10, 11, 12'\n");
fprintf(fp, "pint=-100\n");
fprintf(fp, "int64val=-100\n"); /* TODO: fix negative numbers */
fflush(fp);
ini->clear_items();
ok(ini->parse("test.cfg"), "Test with errors");
nok(ini->items[5].found, "Test presence of positive int");
fclose(fp);
ini->clear_items();
ini->free_items();
/* Test */
if ((fp = fopen("test2.cfg", "w")) == NULL) {
exit (1);
}
fprintf(fp,
"# this is a comment\n"
"optprompt=\"Datastore Name\"\n"
"datastore=@NAME@\n"
"optprompt=\"New Hostname to create\"\n"
"newhost=@STR@\n"
"optprompt=\"Some 64 integer\"\n"
"optrequired=yes\n"
"int64val=@INT64@\n"
"list=@ALIST@\n"
"bool=@BOOL@\n"
"pint64=@PINT64@\n"
"pouet=@STR@\n"
"int32=@INT32@\n"
"plugin.test=@STR@\n"
);
fclose(fp);
buf = new POOL_MEM(PM_BSOCK);
ok(ini->unserialize("test2.cfg"), "Test dynamic parse");
ok(ini->serialize("test4.cfg"), "Try to dump the item table in a file");
ok(ini->serialize(buf) > 0, "Try to dump the item table in a buffer");
ok(ini->parse("test3.cfg"), "Parse test file with dynamic grammar");
ok((pos = ini->get_item("datastore")) == 0, "Check datastore definition");
ok(ini->items[pos].found, "Test presence of char[]");
ok(!strcmp(ini->items[pos].val.nameval, "datastore1"), "Test char[]");
ok(!strcmp(ini->items[pos].comment, "Datastore Name"), "Check comment");
ok(ini->items[pos].required == false, "Check required");
ok((pos = ini->get_item("newhost")) == 1, "Check newhost definition");
ok(ini->items[pos].found, "Test presence of char*");
ok(!strcmp(ini->items[pos].val.strval, "host1"), "Test char*");
ok(ini->items[pos].required == false, "Check required");
ok((pos = ini->get_item("int64val")) == 2, "Check int64val definition");
ok(ini->items[pos].found, "Test presence of int");
ok(ini->items[pos].val.int64val == 10, "Test int");
ok(ini->items[pos].required == true, "Check required");
ok((pos = ini->get_item("bool")) == 4, "Check bool definition");
ok(ini->items[pos].val.boolval == true, "Test bool");
ok(ini->dump_results(buf), "Test to dump results");
printf("<%s>\n", buf);
ini->clear_items();
ini->free_items();
report();
delete buf;
exit (0);
}
|
; ===============================================================
; Jan 2014
; ===============================================================
;
; int vscanf_unlocked(const char *format, void *arg)
;
; See C11 specification.
;
; ===============================================================
SECTION code_stdio
PUBLIC asm_vscanf_unlocked
EXTERN _stdin
EXTERN asm_vfscanf_unlocked
asm_vscanf_unlocked:
; enter : de = char *format
; bc = void *stack_param = arg
;
; exit : ix = FILE *stdin
; de = char *format (next unexamined char)
; hl = number of items assigned
; de'= number of chars consumed from the stream
; hl'= number of items assigned
;
; success
;
; carry reset
;
; fail
;
; hl will be -1 on enolck, eof and stream in error state
; carry set, errno set as below
;
; enolck = stream lock could not be acquired
; eacces = stream not open for reading
; eacces = stream is in an error state
; einval = unknown conversion specifier
; einval = error during scanf conversion
; erange = width out of range
;
; more errors may be set by underlying driver
;
; uses : all except ix
ld ix,(_stdin)
jp asm_vfscanf_unlocked
|
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.0.0 #11528 (Linux)
;--------------------------------------------------------
; Processed by Z88DK
;--------------------------------------------------------
EXTERN __divschar
EXTERN __divschar_callee
EXTERN __divsint
EXTERN __divsint_callee
EXTERN __divslong
EXTERN __divslong_callee
EXTERN __divslonglong
EXTERN __divslonglong_callee
EXTERN __divsuchar
EXTERN __divsuchar_callee
EXTERN __divuchar
EXTERN __divuchar_callee
EXTERN __divuint
EXTERN __divuint_callee
EXTERN __divulong
EXTERN __divulong_callee
EXTERN __divulonglong
EXTERN __divulonglong_callee
EXTERN __divuschar
EXTERN __divuschar_callee
EXTERN __modschar
EXTERN __modschar_callee
EXTERN __modsint
EXTERN __modsint_callee
EXTERN __modslong
EXTERN __modslong_callee
EXTERN __modslonglong
EXTERN __modslonglong_callee
EXTERN __modsuchar
EXTERN __modsuchar_callee
EXTERN __moduchar
EXTERN __moduchar_callee
EXTERN __moduint
EXTERN __moduint_callee
EXTERN __modulong
EXTERN __modulong_callee
EXTERN __modulonglong
EXTERN __modulonglong_callee
EXTERN __moduschar
EXTERN __moduschar_callee
EXTERN __mulint
EXTERN __mulint_callee
EXTERN __mullong
EXTERN __mullong_callee
EXTERN __mullonglong
EXTERN __mullonglong_callee
EXTERN __mulschar
EXTERN __mulschar_callee
EXTERN __mulsuchar
EXTERN __mulsuchar_callee
EXTERN __muluschar
EXTERN __muluschar_callee
EXTERN __rlslonglong
EXTERN __rlslonglong_callee
EXTERN __rlulonglong
EXTERN __rlulonglong_callee
EXTERN __rrslonglong
EXTERN __rrslonglong_callee
EXTERN __rrulonglong
EXTERN __rrulonglong_callee
EXTERN ___sdcc_call_hl
EXTERN ___sdcc_call_iy
EXTERN ___sdcc_enter_ix
EXTERN _banked_call
EXTERN _banked_ret
EXTERN ___fs2schar
EXTERN ___fs2schar_callee
EXTERN ___fs2sint
EXTERN ___fs2sint_callee
EXTERN ___fs2slong
EXTERN ___fs2slong_callee
EXTERN ___fs2slonglong
EXTERN ___fs2slonglong_callee
EXTERN ___fs2uchar
EXTERN ___fs2uchar_callee
EXTERN ___fs2uint
EXTERN ___fs2uint_callee
EXTERN ___fs2ulong
EXTERN ___fs2ulong_callee
EXTERN ___fs2ulonglong
EXTERN ___fs2ulonglong_callee
EXTERN ___fsadd
EXTERN ___fsadd_callee
EXTERN ___fsdiv
EXTERN ___fsdiv_callee
EXTERN ___fseq
EXTERN ___fseq_callee
EXTERN ___fsgt
EXTERN ___fsgt_callee
EXTERN ___fslt
EXTERN ___fslt_callee
EXTERN ___fsmul
EXTERN ___fsmul_callee
EXTERN ___fsneq
EXTERN ___fsneq_callee
EXTERN ___fssub
EXTERN ___fssub_callee
EXTERN ___schar2fs
EXTERN ___schar2fs_callee
EXTERN ___sint2fs
EXTERN ___sint2fs_callee
EXTERN ___slong2fs
EXTERN ___slong2fs_callee
EXTERN ___slonglong2fs
EXTERN ___slonglong2fs_callee
EXTERN ___uchar2fs
EXTERN ___uchar2fs_callee
EXTERN ___uint2fs
EXTERN ___uint2fs_callee
EXTERN ___ulong2fs
EXTERN ___ulong2fs_callee
EXTERN ___ulonglong2fs
EXTERN ___ulonglong2fs_callee
EXTERN ____sdcc_2_copy_src_mhl_dst_deix
EXTERN ____sdcc_2_copy_src_mhl_dst_bcix
EXTERN ____sdcc_4_copy_src_mhl_dst_deix
EXTERN ____sdcc_4_copy_src_mhl_dst_bcix
EXTERN ____sdcc_4_copy_src_mhl_dst_mbc
EXTERN ____sdcc_4_ldi_nosave_bc
EXTERN ____sdcc_4_ldi_save_bc
EXTERN ____sdcc_4_push_hlix
EXTERN ____sdcc_4_push_mhl
EXTERN ____sdcc_lib_setmem_hl
EXTERN ____sdcc_ll_add_de_bc_hl
EXTERN ____sdcc_ll_add_de_bc_hlix
EXTERN ____sdcc_ll_add_de_hlix_bc
EXTERN ____sdcc_ll_add_de_hlix_bcix
EXTERN ____sdcc_ll_add_deix_bc_hl
EXTERN ____sdcc_ll_add_deix_hlix
EXTERN ____sdcc_ll_add_hlix_bc_deix
EXTERN ____sdcc_ll_add_hlix_deix_bc
EXTERN ____sdcc_ll_add_hlix_deix_bcix
EXTERN ____sdcc_ll_asr_hlix_a
EXTERN ____sdcc_ll_asr_mbc_a
EXTERN ____sdcc_ll_copy_src_de_dst_hlix
EXTERN ____sdcc_ll_copy_src_de_dst_hlsp
EXTERN ____sdcc_ll_copy_src_deix_dst_hl
EXTERN ____sdcc_ll_copy_src_deix_dst_hlix
EXTERN ____sdcc_ll_copy_src_deixm_dst_hlsp
EXTERN ____sdcc_ll_copy_src_desp_dst_hlsp
EXTERN ____sdcc_ll_copy_src_hl_dst_de
EXTERN ____sdcc_ll_copy_src_hlsp_dst_de
EXTERN ____sdcc_ll_copy_src_hlsp_dst_deixm
EXTERN ____sdcc_ll_lsl_hlix_a
EXTERN ____sdcc_ll_lsl_mbc_a
EXTERN ____sdcc_ll_lsr_hlix_a
EXTERN ____sdcc_ll_lsr_mbc_a
EXTERN ____sdcc_ll_push_hlix
EXTERN ____sdcc_ll_push_mhl
EXTERN ____sdcc_ll_sub_de_bc_hl
EXTERN ____sdcc_ll_sub_de_bc_hlix
EXTERN ____sdcc_ll_sub_de_hlix_bc
EXTERN ____sdcc_ll_sub_de_hlix_bcix
EXTERN ____sdcc_ll_sub_deix_bc_hl
EXTERN ____sdcc_ll_sub_deix_hlix
EXTERN ____sdcc_ll_sub_hlix_bc_deix
EXTERN ____sdcc_ll_sub_hlix_deix_bc
EXTERN ____sdcc_ll_sub_hlix_deix_bcix
EXTERN ____sdcc_load_debc_deix
EXTERN ____sdcc_load_dehl_deix
EXTERN ____sdcc_load_debc_mhl
EXTERN ____sdcc_load_hlde_mhl
EXTERN ____sdcc_store_dehl_bcix
EXTERN ____sdcc_store_debc_hlix
EXTERN ____sdcc_store_debc_mhl
EXTERN ____sdcc_cpu_pop_ei
EXTERN ____sdcc_cpu_pop_ei_jp
EXTERN ____sdcc_cpu_push_di
EXTERN ____sdcc_outi
EXTERN ____sdcc_outi_128
EXTERN ____sdcc_outi_256
EXTERN ____sdcc_ldi
EXTERN ____sdcc_ldi_128
EXTERN ____sdcc_ldi_256
EXTERN ____sdcc_4_copy_srcd_hlix_dst_deix
EXTERN ____sdcc_4_and_src_mbc_mhl_dst_deix
EXTERN ____sdcc_4_or_src_mbc_mhl_dst_deix
EXTERN ____sdcc_4_xor_src_mbc_mhl_dst_deix
EXTERN ____sdcc_4_or_src_dehl_dst_bcix
EXTERN ____sdcc_4_xor_src_dehl_dst_bcix
EXTERN ____sdcc_4_and_src_dehl_dst_bcix
EXTERN ____sdcc_4_xor_src_mbc_mhl_dst_debc
EXTERN ____sdcc_4_or_src_mbc_mhl_dst_debc
EXTERN ____sdcc_4_and_src_mbc_mhl_dst_debc
EXTERN ____sdcc_4_cpl_src_mhl_dst_debc
EXTERN ____sdcc_4_xor_src_debc_mhl_dst_debc
EXTERN ____sdcc_4_or_src_debc_mhl_dst_debc
EXTERN ____sdcc_4_and_src_debc_mhl_dst_debc
EXTERN ____sdcc_4_and_src_debc_hlix_dst_debc
EXTERN ____sdcc_4_or_src_debc_hlix_dst_debc
EXTERN ____sdcc_4_xor_src_debc_hlix_dst_debc
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
GLOBAL _m32_cosf
;--------------------------------------------------------
; Externals used
;--------------------------------------------------------
GLOBAL _m32_polyf
GLOBAL _m32_hypotf
GLOBAL _m32_ldexpf
GLOBAL _m32_frexpf
GLOBAL _m32_invsqrtf
GLOBAL _m32_sqrtf
GLOBAL _m32_invf
GLOBAL _m32_sqrf
GLOBAL _m32_div2f
GLOBAL _m32_mul2f
GLOBAL _m32_modff
GLOBAL _m32_fmodf
GLOBAL _m32_roundf
GLOBAL _m32_floorf
GLOBAL _m32_fabsf
GLOBAL _m32_ceilf
GLOBAL _m32_powf
GLOBAL _m32_log10f
GLOBAL _m32_log2f
GLOBAL _m32_logf
GLOBAL _m32_exp10f
GLOBAL _m32_exp2f
GLOBAL _m32_expf
GLOBAL _m32_atanhf
GLOBAL _m32_acoshf
GLOBAL _m32_asinhf
GLOBAL _m32_tanhf
GLOBAL _m32_coshf
GLOBAL _m32_sinhf
GLOBAL _m32_atan2f
GLOBAL _m32_atanf
GLOBAL _m32_acosf
GLOBAL _m32_asinf
GLOBAL _m32_tanf
GLOBAL _m32_sinf
GLOBAL __MAX_OPEN
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
SECTION bss_compiler
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
IF 0
; .area _INITIALIZED removed by z88dk
ENDIF
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
SECTION IGNORE
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
SECTION code_crt_init
;--------------------------------------------------------
; Home
;--------------------------------------------------------
SECTION IGNORE
;--------------------------------------------------------
; code
;--------------------------------------------------------
SECTION code_compiler
; ---------------------------------
; Function m32_cosf
; ---------------------------------
_m32_cosf:
ld bc,0x3fc9
push bc
ld bc,0x0fdb
push bc
push de
push hl
call ___fsadd_callee
jp _m32_sinf
SECTION IGNORE
|
_missionary1: file format elf32-i386
Disassembly of section .text:
00001000 <main>:
struct{
lock_t lock;
}mutex;
int numBoat = 0;
int main() {
1000: 55 push %ebp
1001: 89 e5 mov %esp,%ebp
1003: 83 e4 f0 and $0xfffffff0,%esp
1006: 83 ec 20 sub $0x20,%esp
lock_acquire(&mutex.lock);
1009: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
1010: e8 b3 0c 00 00 call 1cc8 <lock_acquire>
printf(1,"Created 1 missionary, and 1 Cannibal. There should be no boat rides since there are not enough people. \n");
1015: c7 44 24 04 f0 1f 00 movl $0x1ff0,0x4(%esp)
101c: 00
101d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1024: e8 b0 08 00 00 call 18d9 <printf>
lock_release(&mutex.lock);
1029: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
1030: e8 b2 0c 00 00 call 1ce7 <lock_release>
//sem_init(&M, 0);
//sem_init(&C, 0);
void *mid = thread_create(MissionaryArrives,(void *)0);
1035: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
103c: 00
103d: c7 04 24 8b 10 00 00 movl $0x108b,(%esp)
1044: e8 b9 0c 00 00 call 1d02 <thread_create>
1049: 89 44 24 18 mov %eax,0x18(%esp)
if(mid == 0) exit();
104d: 83 7c 24 18 00 cmpl $0x0,0x18(%esp)
1052: 75 05 jne 1059 <main+0x59>
1054: e8 df 06 00 00 call 1738 <exit>
void *cid = thread_create(CannibalArrives,(void *)0);
1059: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1060: 00
1061: c7 04 24 9c 12 00 00 movl $0x129c,(%esp)
1068: e8 95 0c 00 00 call 1d02 <thread_create>
106d: 89 44 24 1c mov %eax,0x1c(%esp)
if(cid == 0) exit();
1071: 83 7c 24 1c 00 cmpl $0x0,0x1c(%esp)
1076: 75 05 jne 107d <main+0x7d>
1078: e8 bb 06 00 00 call 1738 <exit>
while(wait() > 0);
107d: e8 be 06 00 00 call 1740 <wait>
1082: 85 c0 test %eax,%eax
1084: 7f f7 jg 107d <main+0x7d>
exit();
1086: e8 ad 06 00 00 call 1738 <exit>
0000108b <MissionaryArrives>:
return 0;
}
void MissionaryArrives(void *arg) {
108b: 55 push %ebp
108c: 89 e5 mov %esp,%ebp
108e: 83 ec 18 sub $0x18,%esp
lock_acquire(&mutex.lock);
1091: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
1098: e8 2b 0c 00 00 call 1cc8 <lock_acquire>
if(numMissionaries == 2)
109d: a1 bc 21 00 00 mov 0x21bc,%eax
10a2: 83 f8 02 cmp $0x2,%eax
10a5: 0f 85 c8 00 00 00 jne 1173 <MissionaryArrives+0xe8>
{
//lock_acquire(&mutex.lock);
numMissionaries++; //for num of miss in boat.
10ab: a1 bc 21 00 00 mov 0x21bc,%eax
10b0: 83 c0 01 add $0x1,%eax
10b3: a3 bc 21 00 00 mov %eax,0x21bc
printf(1,"Number of missionaries arrived: %d.\n",numMissionaries);
10b8: a1 bc 21 00 00 mov 0x21bc,%eax
10bd: 89 44 24 08 mov %eax,0x8(%esp)
10c1: c7 44 24 04 5c 20 00 movl $0x205c,0x4(%esp)
10c8: 00
10c9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10d0: e8 04 08 00 00 call 18d9 <printf>
//sem_signal(&M);
//sem_signal(&M);
printf(1,"Number of missionaries on boat: %d.\n",numMissionaries);
10d5: a1 bc 21 00 00 mov 0x21bc,%eax
10da: 89 44 24 08 mov %eax,0x8(%esp)
10de: c7 44 24 04 84 20 00 movl $0x2084,0x4(%esp)
10e5: 00
10e6: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10ed: e8 e7 07 00 00 call 18d9 <printf>
printf(1,"Number of cannibals on boat: %d.\n",0);
10f2: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
10f9: 00
10fa: c7 44 24 04 ac 20 00 movl $0x20ac,0x4(%esp)
1101: 00
1102: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1109: e8 cb 07 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
RowBoat();
110e: e8 8c 03 00 00 call 149f <RowBoat>
//lock_acquire(&mutex.lock);
numMissionaries = numMissionaries - 3;
1113: a1 bc 21 00 00 mov 0x21bc,%eax
1118: 83 e8 03 sub $0x3,%eax
111b: a3 bc 21 00 00 mov %eax,0x21bc
printf(1,"Number of missionaries waiting: %d.\n",numMissionaries);
1120: a1 bc 21 00 00 mov 0x21bc,%eax
1125: 89 44 24 08 mov %eax,0x8(%esp)
1129: c7 44 24 04 d0 20 00 movl $0x20d0,0x4(%esp)
1130: 00
1131: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1138: e8 9c 07 00 00 call 18d9 <printf>
printf(1,"Number of cannibals waiting: %d.\n",numCannibals);
113d: a1 c0 21 00 00 mov 0x21c0,%eax
1142: 89 44 24 08 mov %eax,0x8(%esp)
1146: c7 44 24 04 f8 20 00 movl $0x20f8,0x4(%esp)
114d: 00
114e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1155: e8 7f 07 00 00 call 18d9 <printf>
printf(1,"==============================\n");
115a: c7 44 24 04 1c 21 00 movl $0x211c,0x4(%esp)
1161: 00
1162: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1169: e8 6b 07 00 00 call 18d9 <printf>
116e: e9 18 01 00 00 jmp 128b <MissionaryArrives+0x200>
//lock_release(&mutex.lock);
//texit();
}
else if (numMissionaries == 1 && numCannibals == 1) {
1173: a1 bc 21 00 00 mov 0x21bc,%eax
1178: 83 f8 01 cmp $0x1,%eax
117b: 0f 85 e0 00 00 00 jne 1261 <MissionaryArrives+0x1d6>
1181: a1 c0 21 00 00 mov 0x21c0,%eax
1186: 83 f8 01 cmp $0x1,%eax
1189: 0f 85 d2 00 00 00 jne 1261 <MissionaryArrives+0x1d6>
//lock_acquire(&mutex.lock);
numMissionaries++; //for num of miss in boat.
118f: a1 bc 21 00 00 mov 0x21bc,%eax
1194: 83 c0 01 add $0x1,%eax
1197: a3 bc 21 00 00 mov %eax,0x21bc
printf(1,"Number of missionaries arrived: %d.\n",numMissionaries);
119c: a1 bc 21 00 00 mov 0x21bc,%eax
11a1: 89 44 24 08 mov %eax,0x8(%esp)
11a5: c7 44 24 04 5c 20 00 movl $0x205c,0x4(%esp)
11ac: 00
11ad: c7 04 24 01 00 00 00 movl $0x1,(%esp)
11b4: e8 20 07 00 00 call 18d9 <printf>
//sem_signal(&M);
//sem_signal(&C);
printf(1,"Number of missionaries on boat: %d.\n",numMissionaries);
11b9: a1 bc 21 00 00 mov 0x21bc,%eax
11be: 89 44 24 08 mov %eax,0x8(%esp)
11c2: c7 44 24 04 84 20 00 movl $0x2084,0x4(%esp)
11c9: 00
11ca: c7 04 24 01 00 00 00 movl $0x1,(%esp)
11d1: e8 03 07 00 00 call 18d9 <printf>
printf(1,"Number of cannibals on boat: %d.\n",1);
11d6: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
11dd: 00
11de: c7 44 24 04 ac 20 00 movl $0x20ac,0x4(%esp)
11e5: 00
11e6: c7 04 24 01 00 00 00 movl $0x1,(%esp)
11ed: e8 e7 06 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
RowBoat();
11f2: e8 a8 02 00 00 call 149f <RowBoat>
//lock_acquire(&mutex.lock);
numMissionaries = numMissionaries - 2;
11f7: a1 bc 21 00 00 mov 0x21bc,%eax
11fc: 83 e8 02 sub $0x2,%eax
11ff: a3 bc 21 00 00 mov %eax,0x21bc
numCannibals--;
1204: a1 c0 21 00 00 mov 0x21c0,%eax
1209: 83 e8 01 sub $0x1,%eax
120c: a3 c0 21 00 00 mov %eax,0x21c0
printf(1,"Number of missionaries waiting: %d.\n",numMissionaries);
1211: a1 bc 21 00 00 mov 0x21bc,%eax
1216: 89 44 24 08 mov %eax,0x8(%esp)
121a: c7 44 24 04 d0 20 00 movl $0x20d0,0x4(%esp)
1221: 00
1222: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1229: e8 ab 06 00 00 call 18d9 <printf>
printf(1,"Number of cannibals waiting: %d.\n",numCannibals);
122e: a1 c0 21 00 00 mov 0x21c0,%eax
1233: 89 44 24 08 mov %eax,0x8(%esp)
1237: c7 44 24 04 f8 20 00 movl $0x20f8,0x4(%esp)
123e: 00
123f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1246: e8 8e 06 00 00 call 18d9 <printf>
printf(1,"==============================\n");
124b: c7 44 24 04 1c 21 00 movl $0x211c,0x4(%esp)
1252: 00
1253: c7 04 24 01 00 00 00 movl $0x1,(%esp)
125a: e8 7a 06 00 00 call 18d9 <printf>
printf(1,"Number of cannibals waiting: %d.\n",numCannibals);
printf(1,"==============================\n");
//lock_release(&mutex.lock);
//texit();
}
else if (numMissionaries == 1 && numCannibals == 1) {
125f: eb 2a jmp 128b <MissionaryArrives+0x200>
//texit();
}
else {
//lock_acquire(&mutex.lock);
numMissionaries++;
1261: a1 bc 21 00 00 mov 0x21bc,%eax
1266: 83 c0 01 add $0x1,%eax
1269: a3 bc 21 00 00 mov %eax,0x21bc
printf(1,"Number of missionaries arrived: %d.\n",numMissionaries);
126e: a1 bc 21 00 00 mov 0x21bc,%eax
1273: 89 44 24 08 mov %eax,0x8(%esp)
1277: c7 44 24 04 5c 20 00 movl $0x205c,0x4(%esp)
127e: 00
127f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1286: e8 4e 06 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
//texit();
}
lock_release(&mutex.lock);
128b: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
1292: e8 50 0a 00 00 call 1ce7 <lock_release>
texit();
1297: e8 44 05 00 00 call 17e0 <texit>
0000129c <CannibalArrives>:
}
void CannibalArrives(void *arg) {
129c: 55 push %ebp
129d: 89 e5 mov %esp,%ebp
129f: 83 ec 18 sub $0x18,%esp
lock_acquire(&mutex.lock);
12a2: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
12a9: e8 1a 0a 00 00 call 1cc8 <lock_acquire>
if(numCannibals == 2)
12ae: a1 c0 21 00 00 mov 0x21c0,%eax
12b3: 83 f8 02 cmp $0x2,%eax
12b6: 0f 85 c8 00 00 00 jne 1384 <CannibalArrives+0xe8>
{
//lock_acquire(&mutex.lock);
numCannibals++; //for num of can in boat.
12bc: a1 c0 21 00 00 mov 0x21c0,%eax
12c1: 83 c0 01 add $0x1,%eax
12c4: a3 c0 21 00 00 mov %eax,0x21c0
printf(1,"Number of cannibals arrived: %d.\n",numCannibals);
12c9: a1 c0 21 00 00 mov 0x21c0,%eax
12ce: 89 44 24 08 mov %eax,0x8(%esp)
12d2: c7 44 24 04 3c 21 00 movl $0x213c,0x4(%esp)
12d9: 00
12da: c7 04 24 01 00 00 00 movl $0x1,(%esp)
12e1: e8 f3 05 00 00 call 18d9 <printf>
printf(1, "Number of cannibals on boat: %d.\n",numCannibals);
12e6: a1 c0 21 00 00 mov 0x21c0,%eax
12eb: 89 44 24 08 mov %eax,0x8(%esp)
12ef: c7 44 24 04 ac 20 00 movl $0x20ac,0x4(%esp)
12f6: 00
12f7: c7 04 24 01 00 00 00 movl $0x1,(%esp)
12fe: e8 d6 05 00 00 call 18d9 <printf>
printf(1, "Number of missionaries on boat: %d.\n",0);
1303: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp)
130a: 00
130b: c7 44 24 04 84 20 00 movl $0x2084,0x4(%esp)
1312: 00
1313: c7 04 24 01 00 00 00 movl $0x1,(%esp)
131a: e8 ba 05 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
//sem_signal(&C);
//sem_signal(&C);
RowBoat();
131f: e8 7b 01 00 00 call 149f <RowBoat>
//lock_acquire(&mutex.lock);
numCannibals = numCannibals -3;
1324: a1 c0 21 00 00 mov 0x21c0,%eax
1329: 83 e8 03 sub $0x3,%eax
132c: a3 c0 21 00 00 mov %eax,0x21c0
printf(1,"Number of missionaries waiting: %d.\n",numMissionaries);
1331: a1 bc 21 00 00 mov 0x21bc,%eax
1336: 89 44 24 08 mov %eax,0x8(%esp)
133a: c7 44 24 04 d0 20 00 movl $0x20d0,0x4(%esp)
1341: 00
1342: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1349: e8 8b 05 00 00 call 18d9 <printf>
printf(1,"Number of cannibals waiting: %d.\n",numCannibals);
134e: a1 c0 21 00 00 mov 0x21c0,%eax
1353: 89 44 24 08 mov %eax,0x8(%esp)
1357: c7 44 24 04 f8 20 00 movl $0x20f8,0x4(%esp)
135e: 00
135f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1366: e8 6e 05 00 00 call 18d9 <printf>
printf(1,"==============================\n");
136b: c7 44 24 04 1c 21 00 movl $0x211c,0x4(%esp)
1372: 00
1373: c7 04 24 01 00 00 00 movl $0x1,(%esp)
137a: e8 5a 05 00 00 call 18d9 <printf>
137f: e9 0a 01 00 00 jmp 148e <CannibalArrives+0x1f2>
//lock_release(&mutex.lock);
//texit();
}
else if(numMissionaries == 2) {
1384: a1 bc 21 00 00 mov 0x21bc,%eax
1389: 83 f8 02 cmp $0x2,%eax
138c: 0f 85 d2 00 00 00 jne 1464 <CannibalArrives+0x1c8>
//lock_acquire(&mutex.lock);
numCannibals++; //for num of can in boat.
1392: a1 c0 21 00 00 mov 0x21c0,%eax
1397: 83 c0 01 add $0x1,%eax
139a: a3 c0 21 00 00 mov %eax,0x21c0
printf(1,"Number of cannibals arrived: %d.\n",numCannibals);
139f: a1 c0 21 00 00 mov 0x21c0,%eax
13a4: 89 44 24 08 mov %eax,0x8(%esp)
13a8: c7 44 24 04 3c 21 00 movl $0x213c,0x4(%esp)
13af: 00
13b0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
13b7: e8 1d 05 00 00 call 18d9 <printf>
printf(1, "Number of cannibals on boat: %d.\n",numCannibals);
13bc: a1 c0 21 00 00 mov 0x21c0,%eax
13c1: 89 44 24 08 mov %eax,0x8(%esp)
13c5: c7 44 24 04 ac 20 00 movl $0x20ac,0x4(%esp)
13cc: 00
13cd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
13d4: e8 00 05 00 00 call 18d9 <printf>
printf(1, "Number of missionaries on boat: %d.\n",2);
13d9: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
13e0: 00
13e1: c7 44 24 04 84 20 00 movl $0x2084,0x4(%esp)
13e8: 00
13e9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
13f0: e8 e4 04 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
//sem_signal(&M);
//sem_signal(&M);
RowBoat();
13f5: e8 a5 00 00 00 call 149f <RowBoat>
//lock_acquire(&mutex.lock);
numCannibals--;
13fa: a1 c0 21 00 00 mov 0x21c0,%eax
13ff: 83 e8 01 sub $0x1,%eax
1402: a3 c0 21 00 00 mov %eax,0x21c0
numMissionaries = numMissionaries -2;
1407: a1 bc 21 00 00 mov 0x21bc,%eax
140c: 83 e8 02 sub $0x2,%eax
140f: a3 bc 21 00 00 mov %eax,0x21bc
printf(1,"Number of missionaries waiting: %d.\n",numMissionaries);
1414: a1 bc 21 00 00 mov 0x21bc,%eax
1419: 89 44 24 08 mov %eax,0x8(%esp)
141d: c7 44 24 04 d0 20 00 movl $0x20d0,0x4(%esp)
1424: 00
1425: c7 04 24 01 00 00 00 movl $0x1,(%esp)
142c: e8 a8 04 00 00 call 18d9 <printf>
printf(1,"Number of cannibals waiting: %d.\n",numCannibals);
1431: a1 c0 21 00 00 mov 0x21c0,%eax
1436: 89 44 24 08 mov %eax,0x8(%esp)
143a: c7 44 24 04 f8 20 00 movl $0x20f8,0x4(%esp)
1441: 00
1442: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1449: e8 8b 04 00 00 call 18d9 <printf>
printf(1,"==============================\n");
144e: c7 44 24 04 1c 21 00 movl $0x211c,0x4(%esp)
1455: 00
1456: c7 04 24 01 00 00 00 movl $0x1,(%esp)
145d: e8 77 04 00 00 call 18d9 <printf>
1462: eb 2a jmp 148e <CannibalArrives+0x1f2>
//lock_release(&mutex.lock);
//texit();
}
else {
//lock_acquire(&mutex.lock);
numCannibals++;
1464: a1 c0 21 00 00 mov 0x21c0,%eax
1469: 83 c0 01 add $0x1,%eax
146c: a3 c0 21 00 00 mov %eax,0x21c0
printf(1, "Number of cannibals arrived: %d.\n",numCannibals);
1471: a1 c0 21 00 00 mov 0x21c0,%eax
1476: 89 44 24 08 mov %eax,0x8(%esp)
147a: c7 44 24 04 3c 21 00 movl $0x213c,0x4(%esp)
1481: 00
1482: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1489: e8 4b 04 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
//texit();
}
lock_release(&mutex.lock);
148e: c7 04 24 d4 21 00 00 movl $0x21d4,(%esp)
1495: e8 4d 08 00 00 call 1ce7 <lock_release>
texit();
149a: e8 41 03 00 00 call 17e0 <texit>
0000149f <RowBoat>:
}
void RowBoat() {
149f: 55 push %ebp
14a0: 89 e5 mov %esp,%ebp
14a2: 83 ec 18 sub $0x18,%esp
//lock_acquire(&mutex.lock);
//printf(1,"Number of cannibals in boat: %d.\n",numCannibals);
//printf(1,"Number of missionaries in boat: %d.\n",numMissionaries);
numBoat++;
14a5: a1 c4 21 00 00 mov 0x21c4,%eax
14aa: 83 c0 01 add $0x1,%eax
14ad: a3 c4 21 00 00 mov %eax,0x21c4
printf(1,"Rowing boat: %d.\n",numBoat);
14b2: a1 c4 21 00 00 mov 0x21c4,%eax
14b7: 89 44 24 08 mov %eax,0x8(%esp)
14bb: c7 44 24 04 5e 21 00 movl $0x215e,0x4(%esp)
14c2: 00
14c3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
14ca: e8 0a 04 00 00 call 18d9 <printf>
//lock_release(&mutex.lock);
}
14cf: c9 leave
14d0: c3 ret
14d1: 90 nop
14d2: 90 nop
14d3: 90 nop
000014d4 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
14d4: 55 push %ebp
14d5: 89 e5 mov %esp,%ebp
14d7: 57 push %edi
14d8: 53 push %ebx
asm volatile("cld; rep stosb" :
14d9: 8b 4d 08 mov 0x8(%ebp),%ecx
14dc: 8b 55 10 mov 0x10(%ebp),%edx
14df: 8b 45 0c mov 0xc(%ebp),%eax
14e2: 89 cb mov %ecx,%ebx
14e4: 89 df mov %ebx,%edi
14e6: 89 d1 mov %edx,%ecx
14e8: fc cld
14e9: f3 aa rep stos %al,%es:(%edi)
14eb: 89 ca mov %ecx,%edx
14ed: 89 fb mov %edi,%ebx
14ef: 89 5d 08 mov %ebx,0x8(%ebp)
14f2: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
14f5: 5b pop %ebx
14f6: 5f pop %edi
14f7: 5d pop %ebp
14f8: c3 ret
000014f9 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
14f9: 55 push %ebp
14fa: 89 e5 mov %esp,%ebp
14fc: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
14ff: 8b 45 08 mov 0x8(%ebp),%eax
1502: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
1505: 8b 45 0c mov 0xc(%ebp),%eax
1508: 0f b6 10 movzbl (%eax),%edx
150b: 8b 45 08 mov 0x8(%ebp),%eax
150e: 88 10 mov %dl,(%eax)
1510: 8b 45 08 mov 0x8(%ebp),%eax
1513: 0f b6 00 movzbl (%eax),%eax
1516: 84 c0 test %al,%al
1518: 0f 95 c0 setne %al
151b: 83 45 08 01 addl $0x1,0x8(%ebp)
151f: 83 45 0c 01 addl $0x1,0xc(%ebp)
1523: 84 c0 test %al,%al
1525: 75 de jne 1505 <strcpy+0xc>
;
return os;
1527: 8b 45 fc mov -0x4(%ebp),%eax
}
152a: c9 leave
152b: c3 ret
0000152c <strcmp>:
int
strcmp(const char *p, const char *q)
{
152c: 55 push %ebp
152d: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
152f: eb 08 jmp 1539 <strcmp+0xd>
p++, q++;
1531: 83 45 08 01 addl $0x1,0x8(%ebp)
1535: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1539: 8b 45 08 mov 0x8(%ebp),%eax
153c: 0f b6 00 movzbl (%eax),%eax
153f: 84 c0 test %al,%al
1541: 74 10 je 1553 <strcmp+0x27>
1543: 8b 45 08 mov 0x8(%ebp),%eax
1546: 0f b6 10 movzbl (%eax),%edx
1549: 8b 45 0c mov 0xc(%ebp),%eax
154c: 0f b6 00 movzbl (%eax),%eax
154f: 38 c2 cmp %al,%dl
1551: 74 de je 1531 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
1553: 8b 45 08 mov 0x8(%ebp),%eax
1556: 0f b6 00 movzbl (%eax),%eax
1559: 0f b6 d0 movzbl %al,%edx
155c: 8b 45 0c mov 0xc(%ebp),%eax
155f: 0f b6 00 movzbl (%eax),%eax
1562: 0f b6 c0 movzbl %al,%eax
1565: 89 d1 mov %edx,%ecx
1567: 29 c1 sub %eax,%ecx
1569: 89 c8 mov %ecx,%eax
}
156b: 5d pop %ebp
156c: c3 ret
0000156d <strlen>:
uint
strlen(char *s)
{
156d: 55 push %ebp
156e: 89 e5 mov %esp,%ebp
1570: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
1573: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
157a: eb 04 jmp 1580 <strlen+0x13>
157c: 83 45 fc 01 addl $0x1,-0x4(%ebp)
1580: 8b 45 fc mov -0x4(%ebp),%eax
1583: 03 45 08 add 0x8(%ebp),%eax
1586: 0f b6 00 movzbl (%eax),%eax
1589: 84 c0 test %al,%al
158b: 75 ef jne 157c <strlen+0xf>
;
return n;
158d: 8b 45 fc mov -0x4(%ebp),%eax
}
1590: c9 leave
1591: c3 ret
00001592 <memset>:
void*
memset(void *dst, int c, uint n)
{
1592: 55 push %ebp
1593: 89 e5 mov %esp,%ebp
1595: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
1598: 8b 45 10 mov 0x10(%ebp),%eax
159b: 89 44 24 08 mov %eax,0x8(%esp)
159f: 8b 45 0c mov 0xc(%ebp),%eax
15a2: 89 44 24 04 mov %eax,0x4(%esp)
15a6: 8b 45 08 mov 0x8(%ebp),%eax
15a9: 89 04 24 mov %eax,(%esp)
15ac: e8 23 ff ff ff call 14d4 <stosb>
return dst;
15b1: 8b 45 08 mov 0x8(%ebp),%eax
}
15b4: c9 leave
15b5: c3 ret
000015b6 <strchr>:
char*
strchr(const char *s, char c)
{
15b6: 55 push %ebp
15b7: 89 e5 mov %esp,%ebp
15b9: 83 ec 04 sub $0x4,%esp
15bc: 8b 45 0c mov 0xc(%ebp),%eax
15bf: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
15c2: eb 14 jmp 15d8 <strchr+0x22>
if(*s == c)
15c4: 8b 45 08 mov 0x8(%ebp),%eax
15c7: 0f b6 00 movzbl (%eax),%eax
15ca: 3a 45 fc cmp -0x4(%ebp),%al
15cd: 75 05 jne 15d4 <strchr+0x1e>
return (char*)s;
15cf: 8b 45 08 mov 0x8(%ebp),%eax
15d2: eb 13 jmp 15e7 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
15d4: 83 45 08 01 addl $0x1,0x8(%ebp)
15d8: 8b 45 08 mov 0x8(%ebp),%eax
15db: 0f b6 00 movzbl (%eax),%eax
15de: 84 c0 test %al,%al
15e0: 75 e2 jne 15c4 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
15e2: b8 00 00 00 00 mov $0x0,%eax
}
15e7: c9 leave
15e8: c3 ret
000015e9 <gets>:
char*
gets(char *buf, int max)
{
15e9: 55 push %ebp
15ea: 89 e5 mov %esp,%ebp
15ec: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
15ef: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
15f6: eb 44 jmp 163c <gets+0x53>
cc = read(0, &c, 1);
15f8: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
15ff: 00
1600: 8d 45 ef lea -0x11(%ebp),%eax
1603: 89 44 24 04 mov %eax,0x4(%esp)
1607: c7 04 24 00 00 00 00 movl $0x0,(%esp)
160e: e8 3d 01 00 00 call 1750 <read>
1613: 89 45 f4 mov %eax,-0xc(%ebp)
if(cc < 1)
1616: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
161a: 7e 2d jle 1649 <gets+0x60>
break;
buf[i++] = c;
161c: 8b 45 f0 mov -0x10(%ebp),%eax
161f: 03 45 08 add 0x8(%ebp),%eax
1622: 0f b6 55 ef movzbl -0x11(%ebp),%edx
1626: 88 10 mov %dl,(%eax)
1628: 83 45 f0 01 addl $0x1,-0x10(%ebp)
if(c == '\n' || c == '\r')
162c: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1630: 3c 0a cmp $0xa,%al
1632: 74 16 je 164a <gets+0x61>
1634: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1638: 3c 0d cmp $0xd,%al
163a: 74 0e je 164a <gets+0x61>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
163c: 8b 45 f0 mov -0x10(%ebp),%eax
163f: 83 c0 01 add $0x1,%eax
1642: 3b 45 0c cmp 0xc(%ebp),%eax
1645: 7c b1 jl 15f8 <gets+0xf>
1647: eb 01 jmp 164a <gets+0x61>
cc = read(0, &c, 1);
if(cc < 1)
break;
1649: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
164a: 8b 45 f0 mov -0x10(%ebp),%eax
164d: 03 45 08 add 0x8(%ebp),%eax
1650: c6 00 00 movb $0x0,(%eax)
return buf;
1653: 8b 45 08 mov 0x8(%ebp),%eax
}
1656: c9 leave
1657: c3 ret
00001658 <stat>:
int
stat(char *n, struct stat *st)
{
1658: 55 push %ebp
1659: 89 e5 mov %esp,%ebp
165b: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
165e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1665: 00
1666: 8b 45 08 mov 0x8(%ebp),%eax
1669: 89 04 24 mov %eax,(%esp)
166c: e8 07 01 00 00 call 1778 <open>
1671: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd < 0)
1674: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1678: 79 07 jns 1681 <stat+0x29>
return -1;
167a: b8 ff ff ff ff mov $0xffffffff,%eax
167f: eb 23 jmp 16a4 <stat+0x4c>
r = fstat(fd, st);
1681: 8b 45 0c mov 0xc(%ebp),%eax
1684: 89 44 24 04 mov %eax,0x4(%esp)
1688: 8b 45 f0 mov -0x10(%ebp),%eax
168b: 89 04 24 mov %eax,(%esp)
168e: e8 fd 00 00 00 call 1790 <fstat>
1693: 89 45 f4 mov %eax,-0xc(%ebp)
close(fd);
1696: 8b 45 f0 mov -0x10(%ebp),%eax
1699: 89 04 24 mov %eax,(%esp)
169c: e8 bf 00 00 00 call 1760 <close>
return r;
16a1: 8b 45 f4 mov -0xc(%ebp),%eax
}
16a4: c9 leave
16a5: c3 ret
000016a6 <atoi>:
int
atoi(const char *s)
{
16a6: 55 push %ebp
16a7: 89 e5 mov %esp,%ebp
16a9: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
16ac: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
16b3: eb 24 jmp 16d9 <atoi+0x33>
n = n*10 + *s++ - '0';
16b5: 8b 55 fc mov -0x4(%ebp),%edx
16b8: 89 d0 mov %edx,%eax
16ba: c1 e0 02 shl $0x2,%eax
16bd: 01 d0 add %edx,%eax
16bf: 01 c0 add %eax,%eax
16c1: 89 c2 mov %eax,%edx
16c3: 8b 45 08 mov 0x8(%ebp),%eax
16c6: 0f b6 00 movzbl (%eax),%eax
16c9: 0f be c0 movsbl %al,%eax
16cc: 8d 04 02 lea (%edx,%eax,1),%eax
16cf: 83 e8 30 sub $0x30,%eax
16d2: 89 45 fc mov %eax,-0x4(%ebp)
16d5: 83 45 08 01 addl $0x1,0x8(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
16d9: 8b 45 08 mov 0x8(%ebp),%eax
16dc: 0f b6 00 movzbl (%eax),%eax
16df: 3c 2f cmp $0x2f,%al
16e1: 7e 0a jle 16ed <atoi+0x47>
16e3: 8b 45 08 mov 0x8(%ebp),%eax
16e6: 0f b6 00 movzbl (%eax),%eax
16e9: 3c 39 cmp $0x39,%al
16eb: 7e c8 jle 16b5 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
16ed: 8b 45 fc mov -0x4(%ebp),%eax
}
16f0: c9 leave
16f1: c3 ret
000016f2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
16f2: 55 push %ebp
16f3: 89 e5 mov %esp,%ebp
16f5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
16f8: 8b 45 08 mov 0x8(%ebp),%eax
16fb: 89 45 f8 mov %eax,-0x8(%ebp)
src = vsrc;
16fe: 8b 45 0c mov 0xc(%ebp),%eax
1701: 89 45 fc mov %eax,-0x4(%ebp)
while(n-- > 0)
1704: eb 13 jmp 1719 <memmove+0x27>
*dst++ = *src++;
1706: 8b 45 fc mov -0x4(%ebp),%eax
1709: 0f b6 10 movzbl (%eax),%edx
170c: 8b 45 f8 mov -0x8(%ebp),%eax
170f: 88 10 mov %dl,(%eax)
1711: 83 45 f8 01 addl $0x1,-0x8(%ebp)
1715: 83 45 fc 01 addl $0x1,-0x4(%ebp)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1719: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
171d: 0f 9f c0 setg %al
1720: 83 6d 10 01 subl $0x1,0x10(%ebp)
1724: 84 c0 test %al,%al
1726: 75 de jne 1706 <memmove+0x14>
*dst++ = *src++;
return vdst;
1728: 8b 45 08 mov 0x8(%ebp),%eax
}
172b: c9 leave
172c: c3 ret
172d: 90 nop
172e: 90 nop
172f: 90 nop
00001730 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
1730: b8 01 00 00 00 mov $0x1,%eax
1735: cd 40 int $0x40
1737: c3 ret
00001738 <exit>:
SYSCALL(exit)
1738: b8 02 00 00 00 mov $0x2,%eax
173d: cd 40 int $0x40
173f: c3 ret
00001740 <wait>:
SYSCALL(wait)
1740: b8 03 00 00 00 mov $0x3,%eax
1745: cd 40 int $0x40
1747: c3 ret
00001748 <pipe>:
SYSCALL(pipe)
1748: b8 04 00 00 00 mov $0x4,%eax
174d: cd 40 int $0x40
174f: c3 ret
00001750 <read>:
SYSCALL(read)
1750: b8 05 00 00 00 mov $0x5,%eax
1755: cd 40 int $0x40
1757: c3 ret
00001758 <write>:
SYSCALL(write)
1758: b8 10 00 00 00 mov $0x10,%eax
175d: cd 40 int $0x40
175f: c3 ret
00001760 <close>:
SYSCALL(close)
1760: b8 15 00 00 00 mov $0x15,%eax
1765: cd 40 int $0x40
1767: c3 ret
00001768 <kill>:
SYSCALL(kill)
1768: b8 06 00 00 00 mov $0x6,%eax
176d: cd 40 int $0x40
176f: c3 ret
00001770 <exec>:
SYSCALL(exec)
1770: b8 07 00 00 00 mov $0x7,%eax
1775: cd 40 int $0x40
1777: c3 ret
00001778 <open>:
SYSCALL(open)
1778: b8 0f 00 00 00 mov $0xf,%eax
177d: cd 40 int $0x40
177f: c3 ret
00001780 <mknod>:
SYSCALL(mknod)
1780: b8 11 00 00 00 mov $0x11,%eax
1785: cd 40 int $0x40
1787: c3 ret
00001788 <unlink>:
SYSCALL(unlink)
1788: b8 12 00 00 00 mov $0x12,%eax
178d: cd 40 int $0x40
178f: c3 ret
00001790 <fstat>:
SYSCALL(fstat)
1790: b8 08 00 00 00 mov $0x8,%eax
1795: cd 40 int $0x40
1797: c3 ret
00001798 <link>:
SYSCALL(link)
1798: b8 13 00 00 00 mov $0x13,%eax
179d: cd 40 int $0x40
179f: c3 ret
000017a0 <mkdir>:
SYSCALL(mkdir)
17a0: b8 14 00 00 00 mov $0x14,%eax
17a5: cd 40 int $0x40
17a7: c3 ret
000017a8 <chdir>:
SYSCALL(chdir)
17a8: b8 09 00 00 00 mov $0x9,%eax
17ad: cd 40 int $0x40
17af: c3 ret
000017b0 <dup>:
SYSCALL(dup)
17b0: b8 0a 00 00 00 mov $0xa,%eax
17b5: cd 40 int $0x40
17b7: c3 ret
000017b8 <getpid>:
SYSCALL(getpid)
17b8: b8 0b 00 00 00 mov $0xb,%eax
17bd: cd 40 int $0x40
17bf: c3 ret
000017c0 <sbrk>:
SYSCALL(sbrk)
17c0: b8 0c 00 00 00 mov $0xc,%eax
17c5: cd 40 int $0x40
17c7: c3 ret
000017c8 <sleep>:
SYSCALL(sleep)
17c8: b8 0d 00 00 00 mov $0xd,%eax
17cd: cd 40 int $0x40
17cf: c3 ret
000017d0 <uptime>:
SYSCALL(uptime)
17d0: b8 0e 00 00 00 mov $0xe,%eax
17d5: cd 40 int $0x40
17d7: c3 ret
000017d8 <clone>:
SYSCALL(clone)
17d8: b8 16 00 00 00 mov $0x16,%eax
17dd: cd 40 int $0x40
17df: c3 ret
000017e0 <texit>:
SYSCALL(texit)
17e0: b8 17 00 00 00 mov $0x17,%eax
17e5: cd 40 int $0x40
17e7: c3 ret
000017e8 <tsleep>:
SYSCALL(tsleep)
17e8: b8 18 00 00 00 mov $0x18,%eax
17ed: cd 40 int $0x40
17ef: c3 ret
000017f0 <twakeup>:
SYSCALL(twakeup)
17f0: b8 19 00 00 00 mov $0x19,%eax
17f5: cd 40 int $0x40
17f7: c3 ret
000017f8 <thread_yield>:
SYSCALL(thread_yield)
17f8: b8 1a 00 00 00 mov $0x1a,%eax
17fd: cd 40 int $0x40
17ff: c3 ret
00001800 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
1800: 55 push %ebp
1801: 89 e5 mov %esp,%ebp
1803: 83 ec 28 sub $0x28,%esp
1806: 8b 45 0c mov 0xc(%ebp),%eax
1809: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
180c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1813: 00
1814: 8d 45 f4 lea -0xc(%ebp),%eax
1817: 89 44 24 04 mov %eax,0x4(%esp)
181b: 8b 45 08 mov 0x8(%ebp),%eax
181e: 89 04 24 mov %eax,(%esp)
1821: e8 32 ff ff ff call 1758 <write>
}
1826: c9 leave
1827: c3 ret
00001828 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
1828: 55 push %ebp
1829: 89 e5 mov %esp,%ebp
182b: 53 push %ebx
182c: 83 ec 44 sub $0x44,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
182f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
1836: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
183a: 74 17 je 1853 <printint+0x2b>
183c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1840: 79 11 jns 1853 <printint+0x2b>
neg = 1;
1842: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
1849: 8b 45 0c mov 0xc(%ebp),%eax
184c: f7 d8 neg %eax
184e: 89 45 f4 mov %eax,-0xc(%ebp)
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
1851: eb 06 jmp 1859 <printint+0x31>
neg = 1;
x = -xx;
} else {
x = xx;
1853: 8b 45 0c mov 0xc(%ebp),%eax
1856: 89 45 f4 mov %eax,-0xc(%ebp)
}
i = 0;
1859: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
do{
buf[i++] = digits[x % base];
1860: 8b 4d ec mov -0x14(%ebp),%ecx
1863: 8b 5d 10 mov 0x10(%ebp),%ebx
1866: 8b 45 f4 mov -0xc(%ebp),%eax
1869: ba 00 00 00 00 mov $0x0,%edx
186e: f7 f3 div %ebx
1870: 89 d0 mov %edx,%eax
1872: 0f b6 80 a4 21 00 00 movzbl 0x21a4(%eax),%eax
1879: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
187d: 83 45 ec 01 addl $0x1,-0x14(%ebp)
}while((x /= base) != 0);
1881: 8b 45 10 mov 0x10(%ebp),%eax
1884: 89 45 d4 mov %eax,-0x2c(%ebp)
1887: 8b 45 f4 mov -0xc(%ebp),%eax
188a: ba 00 00 00 00 mov $0x0,%edx
188f: f7 75 d4 divl -0x2c(%ebp)
1892: 89 45 f4 mov %eax,-0xc(%ebp)
1895: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1899: 75 c5 jne 1860 <printint+0x38>
if(neg)
189b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
189f: 74 28 je 18c9 <printint+0xa1>
buf[i++] = '-';
18a1: 8b 45 ec mov -0x14(%ebp),%eax
18a4: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
18a9: 83 45 ec 01 addl $0x1,-0x14(%ebp)
while(--i >= 0)
18ad: eb 1a jmp 18c9 <printint+0xa1>
putc(fd, buf[i]);
18af: 8b 45 ec mov -0x14(%ebp),%eax
18b2: 0f b6 44 05 dc movzbl -0x24(%ebp,%eax,1),%eax
18b7: 0f be c0 movsbl %al,%eax
18ba: 89 44 24 04 mov %eax,0x4(%esp)
18be: 8b 45 08 mov 0x8(%ebp),%eax
18c1: 89 04 24 mov %eax,(%esp)
18c4: e8 37 ff ff ff call 1800 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
18c9: 83 6d ec 01 subl $0x1,-0x14(%ebp)
18cd: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
18d1: 79 dc jns 18af <printint+0x87>
putc(fd, buf[i]);
}
18d3: 83 c4 44 add $0x44,%esp
18d6: 5b pop %ebx
18d7: 5d pop %ebp
18d8: c3 ret
000018d9 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
18d9: 55 push %ebp
18da: 89 e5 mov %esp,%ebp
18dc: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
18df: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
ap = (uint*)(void*)&fmt + 1;
18e6: 8d 45 0c lea 0xc(%ebp),%eax
18e9: 83 c0 04 add $0x4,%eax
18ec: 89 45 f4 mov %eax,-0xc(%ebp)
for(i = 0; fmt[i]; i++){
18ef: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
18f6: e9 7e 01 00 00 jmp 1a79 <printf+0x1a0>
c = fmt[i] & 0xff;
18fb: 8b 55 0c mov 0xc(%ebp),%edx
18fe: 8b 45 ec mov -0x14(%ebp),%eax
1901: 8d 04 02 lea (%edx,%eax,1),%eax
1904: 0f b6 00 movzbl (%eax),%eax
1907: 0f be c0 movsbl %al,%eax
190a: 25 ff 00 00 00 and $0xff,%eax
190f: 89 45 e8 mov %eax,-0x18(%ebp)
if(state == 0){
1912: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1916: 75 2c jne 1944 <printf+0x6b>
if(c == '%'){
1918: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
191c: 75 0c jne 192a <printf+0x51>
state = '%';
191e: c7 45 f0 25 00 00 00 movl $0x25,-0x10(%ebp)
1925: e9 4b 01 00 00 jmp 1a75 <printf+0x19c>
} else {
putc(fd, c);
192a: 8b 45 e8 mov -0x18(%ebp),%eax
192d: 0f be c0 movsbl %al,%eax
1930: 89 44 24 04 mov %eax,0x4(%esp)
1934: 8b 45 08 mov 0x8(%ebp),%eax
1937: 89 04 24 mov %eax,(%esp)
193a: e8 c1 fe ff ff call 1800 <putc>
193f: e9 31 01 00 00 jmp 1a75 <printf+0x19c>
}
} else if(state == '%'){
1944: 83 7d f0 25 cmpl $0x25,-0x10(%ebp)
1948: 0f 85 27 01 00 00 jne 1a75 <printf+0x19c>
if(c == 'd'){
194e: 83 7d e8 64 cmpl $0x64,-0x18(%ebp)
1952: 75 2d jne 1981 <printf+0xa8>
printint(fd, *ap, 10, 1);
1954: 8b 45 f4 mov -0xc(%ebp),%eax
1957: 8b 00 mov (%eax),%eax
1959: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
1960: 00
1961: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
1968: 00
1969: 89 44 24 04 mov %eax,0x4(%esp)
196d: 8b 45 08 mov 0x8(%ebp),%eax
1970: 89 04 24 mov %eax,(%esp)
1973: e8 b0 fe ff ff call 1828 <printint>
ap++;
1978: 83 45 f4 04 addl $0x4,-0xc(%ebp)
197c: e9 ed 00 00 00 jmp 1a6e <printf+0x195>
} else if(c == 'x' || c == 'p'){
1981: 83 7d e8 78 cmpl $0x78,-0x18(%ebp)
1985: 74 06 je 198d <printf+0xb4>
1987: 83 7d e8 70 cmpl $0x70,-0x18(%ebp)
198b: 75 2d jne 19ba <printf+0xe1>
printint(fd, *ap, 16, 0);
198d: 8b 45 f4 mov -0xc(%ebp),%eax
1990: 8b 00 mov (%eax),%eax
1992: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
1999: 00
199a: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
19a1: 00
19a2: 89 44 24 04 mov %eax,0x4(%esp)
19a6: 8b 45 08 mov 0x8(%ebp),%eax
19a9: 89 04 24 mov %eax,(%esp)
19ac: e8 77 fe ff ff call 1828 <printint>
ap++;
19b1: 83 45 f4 04 addl $0x4,-0xc(%ebp)
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
19b5: e9 b4 00 00 00 jmp 1a6e <printf+0x195>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
19ba: 83 7d e8 73 cmpl $0x73,-0x18(%ebp)
19be: 75 46 jne 1a06 <printf+0x12d>
s = (char*)*ap;
19c0: 8b 45 f4 mov -0xc(%ebp),%eax
19c3: 8b 00 mov (%eax),%eax
19c5: 89 45 e4 mov %eax,-0x1c(%ebp)
ap++;
19c8: 83 45 f4 04 addl $0x4,-0xc(%ebp)
if(s == 0)
19cc: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
19d0: 75 27 jne 19f9 <printf+0x120>
s = "(null)";
19d2: c7 45 e4 70 21 00 00 movl $0x2170,-0x1c(%ebp)
while(*s != 0){
19d9: eb 1f jmp 19fa <printf+0x121>
putc(fd, *s);
19db: 8b 45 e4 mov -0x1c(%ebp),%eax
19de: 0f b6 00 movzbl (%eax),%eax
19e1: 0f be c0 movsbl %al,%eax
19e4: 89 44 24 04 mov %eax,0x4(%esp)
19e8: 8b 45 08 mov 0x8(%ebp),%eax
19eb: 89 04 24 mov %eax,(%esp)
19ee: e8 0d fe ff ff call 1800 <putc>
s++;
19f3: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
19f7: eb 01 jmp 19fa <printf+0x121>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
19f9: 90 nop
19fa: 8b 45 e4 mov -0x1c(%ebp),%eax
19fd: 0f b6 00 movzbl (%eax),%eax
1a00: 84 c0 test %al,%al
1a02: 75 d7 jne 19db <printf+0x102>
1a04: eb 68 jmp 1a6e <printf+0x195>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
1a06: 83 7d e8 63 cmpl $0x63,-0x18(%ebp)
1a0a: 75 1d jne 1a29 <printf+0x150>
putc(fd, *ap);
1a0c: 8b 45 f4 mov -0xc(%ebp),%eax
1a0f: 8b 00 mov (%eax),%eax
1a11: 0f be c0 movsbl %al,%eax
1a14: 89 44 24 04 mov %eax,0x4(%esp)
1a18: 8b 45 08 mov 0x8(%ebp),%eax
1a1b: 89 04 24 mov %eax,(%esp)
1a1e: e8 dd fd ff ff call 1800 <putc>
ap++;
1a23: 83 45 f4 04 addl $0x4,-0xc(%ebp)
1a27: eb 45 jmp 1a6e <printf+0x195>
} else if(c == '%'){
1a29: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
1a2d: 75 17 jne 1a46 <printf+0x16d>
putc(fd, c);
1a2f: 8b 45 e8 mov -0x18(%ebp),%eax
1a32: 0f be c0 movsbl %al,%eax
1a35: 89 44 24 04 mov %eax,0x4(%esp)
1a39: 8b 45 08 mov 0x8(%ebp),%eax
1a3c: 89 04 24 mov %eax,(%esp)
1a3f: e8 bc fd ff ff call 1800 <putc>
1a44: eb 28 jmp 1a6e <printf+0x195>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
1a46: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
1a4d: 00
1a4e: 8b 45 08 mov 0x8(%ebp),%eax
1a51: 89 04 24 mov %eax,(%esp)
1a54: e8 a7 fd ff ff call 1800 <putc>
putc(fd, c);
1a59: 8b 45 e8 mov -0x18(%ebp),%eax
1a5c: 0f be c0 movsbl %al,%eax
1a5f: 89 44 24 04 mov %eax,0x4(%esp)
1a63: 8b 45 08 mov 0x8(%ebp),%eax
1a66: 89 04 24 mov %eax,(%esp)
1a69: e8 92 fd ff ff call 1800 <putc>
}
state = 0;
1a6e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
1a75: 83 45 ec 01 addl $0x1,-0x14(%ebp)
1a79: 8b 55 0c mov 0xc(%ebp),%edx
1a7c: 8b 45 ec mov -0x14(%ebp),%eax
1a7f: 8d 04 02 lea (%edx,%eax,1),%eax
1a82: 0f b6 00 movzbl (%eax),%eax
1a85: 84 c0 test %al,%al
1a87: 0f 85 6e fe ff ff jne 18fb <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
1a8d: c9 leave
1a8e: c3 ret
1a8f: 90 nop
00001a90 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1a90: 55 push %ebp
1a91: 89 e5 mov %esp,%ebp
1a93: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
1a96: 8b 45 08 mov 0x8(%ebp),%eax
1a99: 83 e8 08 sub $0x8,%eax
1a9c: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1a9f: a1 d0 21 00 00 mov 0x21d0,%eax
1aa4: 89 45 fc mov %eax,-0x4(%ebp)
1aa7: eb 24 jmp 1acd <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1aa9: 8b 45 fc mov -0x4(%ebp),%eax
1aac: 8b 00 mov (%eax),%eax
1aae: 3b 45 fc cmp -0x4(%ebp),%eax
1ab1: 77 12 ja 1ac5 <free+0x35>
1ab3: 8b 45 f8 mov -0x8(%ebp),%eax
1ab6: 3b 45 fc cmp -0x4(%ebp),%eax
1ab9: 77 24 ja 1adf <free+0x4f>
1abb: 8b 45 fc mov -0x4(%ebp),%eax
1abe: 8b 00 mov (%eax),%eax
1ac0: 3b 45 f8 cmp -0x8(%ebp),%eax
1ac3: 77 1a ja 1adf <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1ac5: 8b 45 fc mov -0x4(%ebp),%eax
1ac8: 8b 00 mov (%eax),%eax
1aca: 89 45 fc mov %eax,-0x4(%ebp)
1acd: 8b 45 f8 mov -0x8(%ebp),%eax
1ad0: 3b 45 fc cmp -0x4(%ebp),%eax
1ad3: 76 d4 jbe 1aa9 <free+0x19>
1ad5: 8b 45 fc mov -0x4(%ebp),%eax
1ad8: 8b 00 mov (%eax),%eax
1ada: 3b 45 f8 cmp -0x8(%ebp),%eax
1add: 76 ca jbe 1aa9 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
1adf: 8b 45 f8 mov -0x8(%ebp),%eax
1ae2: 8b 40 04 mov 0x4(%eax),%eax
1ae5: c1 e0 03 shl $0x3,%eax
1ae8: 89 c2 mov %eax,%edx
1aea: 03 55 f8 add -0x8(%ebp),%edx
1aed: 8b 45 fc mov -0x4(%ebp),%eax
1af0: 8b 00 mov (%eax),%eax
1af2: 39 c2 cmp %eax,%edx
1af4: 75 24 jne 1b1a <free+0x8a>
bp->s.size += p->s.ptr->s.size;
1af6: 8b 45 f8 mov -0x8(%ebp),%eax
1af9: 8b 50 04 mov 0x4(%eax),%edx
1afc: 8b 45 fc mov -0x4(%ebp),%eax
1aff: 8b 00 mov (%eax),%eax
1b01: 8b 40 04 mov 0x4(%eax),%eax
1b04: 01 c2 add %eax,%edx
1b06: 8b 45 f8 mov -0x8(%ebp),%eax
1b09: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
1b0c: 8b 45 fc mov -0x4(%ebp),%eax
1b0f: 8b 00 mov (%eax),%eax
1b11: 8b 10 mov (%eax),%edx
1b13: 8b 45 f8 mov -0x8(%ebp),%eax
1b16: 89 10 mov %edx,(%eax)
1b18: eb 0a jmp 1b24 <free+0x94>
} else
bp->s.ptr = p->s.ptr;
1b1a: 8b 45 fc mov -0x4(%ebp),%eax
1b1d: 8b 10 mov (%eax),%edx
1b1f: 8b 45 f8 mov -0x8(%ebp),%eax
1b22: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
1b24: 8b 45 fc mov -0x4(%ebp),%eax
1b27: 8b 40 04 mov 0x4(%eax),%eax
1b2a: c1 e0 03 shl $0x3,%eax
1b2d: 03 45 fc add -0x4(%ebp),%eax
1b30: 3b 45 f8 cmp -0x8(%ebp),%eax
1b33: 75 20 jne 1b55 <free+0xc5>
p->s.size += bp->s.size;
1b35: 8b 45 fc mov -0x4(%ebp),%eax
1b38: 8b 50 04 mov 0x4(%eax),%edx
1b3b: 8b 45 f8 mov -0x8(%ebp),%eax
1b3e: 8b 40 04 mov 0x4(%eax),%eax
1b41: 01 c2 add %eax,%edx
1b43: 8b 45 fc mov -0x4(%ebp),%eax
1b46: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
1b49: 8b 45 f8 mov -0x8(%ebp),%eax
1b4c: 8b 10 mov (%eax),%edx
1b4e: 8b 45 fc mov -0x4(%ebp),%eax
1b51: 89 10 mov %edx,(%eax)
1b53: eb 08 jmp 1b5d <free+0xcd>
} else
p->s.ptr = bp;
1b55: 8b 45 fc mov -0x4(%ebp),%eax
1b58: 8b 55 f8 mov -0x8(%ebp),%edx
1b5b: 89 10 mov %edx,(%eax)
freep = p;
1b5d: 8b 45 fc mov -0x4(%ebp),%eax
1b60: a3 d0 21 00 00 mov %eax,0x21d0
}
1b65: c9 leave
1b66: c3 ret
00001b67 <morecore>:
static Header*
morecore(uint nu)
{
1b67: 55 push %ebp
1b68: 89 e5 mov %esp,%ebp
1b6a: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
1b6d: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
1b74: 77 07 ja 1b7d <morecore+0x16>
nu = 4096;
1b76: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
1b7d: 8b 45 08 mov 0x8(%ebp),%eax
1b80: c1 e0 03 shl $0x3,%eax
1b83: 89 04 24 mov %eax,(%esp)
1b86: e8 35 fc ff ff call 17c0 <sbrk>
1b8b: 89 45 f0 mov %eax,-0x10(%ebp)
if(p == (char*)-1)
1b8e: 83 7d f0 ff cmpl $0xffffffff,-0x10(%ebp)
1b92: 75 07 jne 1b9b <morecore+0x34>
return 0;
1b94: b8 00 00 00 00 mov $0x0,%eax
1b99: eb 22 jmp 1bbd <morecore+0x56>
hp = (Header*)p;
1b9b: 8b 45 f0 mov -0x10(%ebp),%eax
1b9e: 89 45 f4 mov %eax,-0xc(%ebp)
hp->s.size = nu;
1ba1: 8b 45 f4 mov -0xc(%ebp),%eax
1ba4: 8b 55 08 mov 0x8(%ebp),%edx
1ba7: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
1baa: 8b 45 f4 mov -0xc(%ebp),%eax
1bad: 83 c0 08 add $0x8,%eax
1bb0: 89 04 24 mov %eax,(%esp)
1bb3: e8 d8 fe ff ff call 1a90 <free>
return freep;
1bb8: a1 d0 21 00 00 mov 0x21d0,%eax
}
1bbd: c9 leave
1bbe: c3 ret
00001bbf <malloc>:
void*
malloc(uint nbytes)
{
1bbf: 55 push %ebp
1bc0: 89 e5 mov %esp,%ebp
1bc2: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1bc5: 8b 45 08 mov 0x8(%ebp),%eax
1bc8: 83 c0 07 add $0x7,%eax
1bcb: c1 e8 03 shr $0x3,%eax
1bce: 83 c0 01 add $0x1,%eax
1bd1: 89 45 f4 mov %eax,-0xc(%ebp)
if((prevp = freep) == 0){
1bd4: a1 d0 21 00 00 mov 0x21d0,%eax
1bd9: 89 45 f0 mov %eax,-0x10(%ebp)
1bdc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1be0: 75 23 jne 1c05 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
1be2: c7 45 f0 c8 21 00 00 movl $0x21c8,-0x10(%ebp)
1be9: 8b 45 f0 mov -0x10(%ebp),%eax
1bec: a3 d0 21 00 00 mov %eax,0x21d0
1bf1: a1 d0 21 00 00 mov 0x21d0,%eax
1bf6: a3 c8 21 00 00 mov %eax,0x21c8
base.s.size = 0;
1bfb: c7 05 cc 21 00 00 00 movl $0x0,0x21cc
1c02: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1c05: 8b 45 f0 mov -0x10(%ebp),%eax
1c08: 8b 00 mov (%eax),%eax
1c0a: 89 45 ec mov %eax,-0x14(%ebp)
if(p->s.size >= nunits){
1c0d: 8b 45 ec mov -0x14(%ebp),%eax
1c10: 8b 40 04 mov 0x4(%eax),%eax
1c13: 3b 45 f4 cmp -0xc(%ebp),%eax
1c16: 72 4d jb 1c65 <malloc+0xa6>
if(p->s.size == nunits)
1c18: 8b 45 ec mov -0x14(%ebp),%eax
1c1b: 8b 40 04 mov 0x4(%eax),%eax
1c1e: 3b 45 f4 cmp -0xc(%ebp),%eax
1c21: 75 0c jne 1c2f <malloc+0x70>
prevp->s.ptr = p->s.ptr;
1c23: 8b 45 ec mov -0x14(%ebp),%eax
1c26: 8b 10 mov (%eax),%edx
1c28: 8b 45 f0 mov -0x10(%ebp),%eax
1c2b: 89 10 mov %edx,(%eax)
1c2d: eb 26 jmp 1c55 <malloc+0x96>
else {
p->s.size -= nunits;
1c2f: 8b 45 ec mov -0x14(%ebp),%eax
1c32: 8b 40 04 mov 0x4(%eax),%eax
1c35: 89 c2 mov %eax,%edx
1c37: 2b 55 f4 sub -0xc(%ebp),%edx
1c3a: 8b 45 ec mov -0x14(%ebp),%eax
1c3d: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
1c40: 8b 45 ec mov -0x14(%ebp),%eax
1c43: 8b 40 04 mov 0x4(%eax),%eax
1c46: c1 e0 03 shl $0x3,%eax
1c49: 01 45 ec add %eax,-0x14(%ebp)
p->s.size = nunits;
1c4c: 8b 45 ec mov -0x14(%ebp),%eax
1c4f: 8b 55 f4 mov -0xc(%ebp),%edx
1c52: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
1c55: 8b 45 f0 mov -0x10(%ebp),%eax
1c58: a3 d0 21 00 00 mov %eax,0x21d0
return (void*)(p + 1);
1c5d: 8b 45 ec mov -0x14(%ebp),%eax
1c60: 83 c0 08 add $0x8,%eax
1c63: eb 38 jmp 1c9d <malloc+0xde>
}
if(p == freep)
1c65: a1 d0 21 00 00 mov 0x21d0,%eax
1c6a: 39 45 ec cmp %eax,-0x14(%ebp)
1c6d: 75 1b jne 1c8a <malloc+0xcb>
if((p = morecore(nunits)) == 0)
1c6f: 8b 45 f4 mov -0xc(%ebp),%eax
1c72: 89 04 24 mov %eax,(%esp)
1c75: e8 ed fe ff ff call 1b67 <morecore>
1c7a: 89 45 ec mov %eax,-0x14(%ebp)
1c7d: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1c81: 75 07 jne 1c8a <malloc+0xcb>
return 0;
1c83: b8 00 00 00 00 mov $0x0,%eax
1c88: eb 13 jmp 1c9d <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
1c8a: 8b 45 ec mov -0x14(%ebp),%eax
1c8d: 89 45 f0 mov %eax,-0x10(%ebp)
1c90: 8b 45 ec mov -0x14(%ebp),%eax
1c93: 8b 00 mov (%eax),%eax
1c95: 89 45 ec mov %eax,-0x14(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
1c98: e9 70 ff ff ff jmp 1c0d <malloc+0x4e>
}
1c9d: c9 leave
1c9e: c3 ret
1c9f: 90 nop
00001ca0 <xchg>:
asm volatile("sti");
}
static inline uint
xchg(volatile uint *addr, uint newval)
{
1ca0: 55 push %ebp
1ca1: 89 e5 mov %esp,%ebp
1ca3: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
1ca6: 8b 55 08 mov 0x8(%ebp),%edx
1ca9: 8b 45 0c mov 0xc(%ebp),%eax
1cac: 8b 4d 08 mov 0x8(%ebp),%ecx
1caf: f0 87 02 lock xchg %eax,(%edx)
1cb2: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
1cb5: 8b 45 fc mov -0x4(%ebp),%eax
}
1cb8: c9 leave
1cb9: c3 ret
00001cba <lock_init>:
#include "x86.h"
#include "proc.h"
unsigned long rands = 1;
void lock_init(lock_t *lock){
1cba: 55 push %ebp
1cbb: 89 e5 mov %esp,%ebp
lock->locked = 0;
1cbd: 8b 45 08 mov 0x8(%ebp),%eax
1cc0: c7 00 00 00 00 00 movl $0x0,(%eax)
}
1cc6: 5d pop %ebp
1cc7: c3 ret
00001cc8 <lock_acquire>:
void lock_acquire(lock_t *lock){
1cc8: 55 push %ebp
1cc9: 89 e5 mov %esp,%ebp
1ccb: 83 ec 08 sub $0x8,%esp
while(xchg(&lock->locked,1) != 0);
1cce: 8b 45 08 mov 0x8(%ebp),%eax
1cd1: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
1cd8: 00
1cd9: 89 04 24 mov %eax,(%esp)
1cdc: e8 bf ff ff ff call 1ca0 <xchg>
1ce1: 85 c0 test %eax,%eax
1ce3: 75 e9 jne 1cce <lock_acquire+0x6>
}
1ce5: c9 leave
1ce6: c3 ret
00001ce7 <lock_release>:
void lock_release(lock_t *lock){
1ce7: 55 push %ebp
1ce8: 89 e5 mov %esp,%ebp
1cea: 83 ec 08 sub $0x8,%esp
xchg(&lock->locked,0);
1ced: 8b 45 08 mov 0x8(%ebp),%eax
1cf0: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1cf7: 00
1cf8: 89 04 24 mov %eax,(%esp)
1cfb: e8 a0 ff ff ff call 1ca0 <xchg>
}
1d00: c9 leave
1d01: c3 ret
00001d02 <thread_create>:
void *thread_create(void(*start_routine)(void*), void *arg){
1d02: 55 push %ebp
1d03: 89 e5 mov %esp,%ebp
1d05: 83 ec 28 sub $0x28,%esp
int tid;
void * stack = malloc(2 * 4096);
1d08: c7 04 24 00 20 00 00 movl $0x2000,(%esp)
1d0f: e8 ab fe ff ff call 1bbf <malloc>
1d14: 89 45 f0 mov %eax,-0x10(%ebp)
void *garbage_stack = stack;
1d17: 8b 45 f0 mov -0x10(%ebp),%eax
1d1a: 89 45 f4 mov %eax,-0xc(%ebp)
// printf(1,"start routine addr : %d\n",(uint)start_routine);
if((uint)stack % 4096){
1d1d: 8b 45 f0 mov -0x10(%ebp),%eax
1d20: 25 ff 0f 00 00 and $0xfff,%eax
1d25: 85 c0 test %eax,%eax
1d27: 74 15 je 1d3e <thread_create+0x3c>
stack = stack + (4096 - (uint)stack % 4096);
1d29: 8b 45 f0 mov -0x10(%ebp),%eax
1d2c: 89 c2 mov %eax,%edx
1d2e: 81 e2 ff 0f 00 00 and $0xfff,%edx
1d34: b8 00 10 00 00 mov $0x1000,%eax
1d39: 29 d0 sub %edx,%eax
1d3b: 01 45 f0 add %eax,-0x10(%ebp)
}
if (stack == 0){
1d3e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1d42: 75 1b jne 1d5f <thread_create+0x5d>
printf(1,"malloc fail \n");
1d44: c7 44 24 04 77 21 00 movl $0x2177,0x4(%esp)
1d4b: 00
1d4c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1d53: e8 81 fb ff ff call 18d9 <printf>
return 0;
1d58: b8 00 00 00 00 mov $0x0,%eax
1d5d: eb 6f jmp 1dce <thread_create+0xcc>
}
tid = clone((uint)stack,PSIZE,(uint)start_routine,(int)arg);
1d5f: 8b 4d 0c mov 0xc(%ebp),%ecx
1d62: 8b 55 08 mov 0x8(%ebp),%edx
1d65: 8b 45 f0 mov -0x10(%ebp),%eax
1d68: 89 4c 24 0c mov %ecx,0xc(%esp)
1d6c: 89 54 24 08 mov %edx,0x8(%esp)
1d70: c7 44 24 04 00 10 00 movl $0x1000,0x4(%esp)
1d77: 00
1d78: 89 04 24 mov %eax,(%esp)
1d7b: e8 58 fa ff ff call 17d8 <clone>
1d80: 89 45 ec mov %eax,-0x14(%ebp)
if(tid < 0){
1d83: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1d87: 79 1b jns 1da4 <thread_create+0xa2>
printf(1,"clone fails\n");
1d89: c7 44 24 04 85 21 00 movl $0x2185,0x4(%esp)
1d90: 00
1d91: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1d98: e8 3c fb ff ff call 18d9 <printf>
return 0;
1d9d: b8 00 00 00 00 mov $0x0,%eax
1da2: eb 2a jmp 1dce <thread_create+0xcc>
}
if(tid > 0){
1da4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1da8: 7e 05 jle 1daf <thread_create+0xad>
//store threads on thread table
return garbage_stack;
1daa: 8b 45 f4 mov -0xc(%ebp),%eax
1dad: eb 1f jmp 1dce <thread_create+0xcc>
}
if(tid == 0){
1daf: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1db3: 75 14 jne 1dc9 <thread_create+0xc7>
printf(1,"tid = 0 return \n");
1db5: c7 44 24 04 92 21 00 movl $0x2192,0x4(%esp)
1dbc: 00
1dbd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1dc4: e8 10 fb ff ff call 18d9 <printf>
}
// wait();
// free(garbage_stack);
return 0;
1dc9: b8 00 00 00 00 mov $0x0,%eax
}
1dce: c9 leave
1dcf: c3 ret
00001dd0 <random>:
// generate 0 -> max random number exclude max.
int random(int max){
1dd0: 55 push %ebp
1dd1: 89 e5 mov %esp,%ebp
rands = rands * 1664525 + 1013904233;
1dd3: a1 b8 21 00 00 mov 0x21b8,%eax
1dd8: 69 c0 0d 66 19 00 imul $0x19660d,%eax,%eax
1dde: 05 69 f3 6e 3c add $0x3c6ef369,%eax
1de3: a3 b8 21 00 00 mov %eax,0x21b8
return (int)(rands % max);
1de8: a1 b8 21 00 00 mov 0x21b8,%eax
1ded: 8b 4d 08 mov 0x8(%ebp),%ecx
1df0: ba 00 00 00 00 mov $0x0,%edx
1df5: f7 f1 div %ecx
1df7: 89 d0 mov %edx,%eax
}
1df9: 5d pop %ebp
1dfa: c3 ret
1dfb: 90 nop
00001dfc <init_q>:
#include "queue.h"
#include "types.h"
#include "user.h"
void init_q(struct queue *q){
1dfc: 55 push %ebp
1dfd: 89 e5 mov %esp,%ebp
q->size = 0;
1dff: 8b 45 08 mov 0x8(%ebp),%eax
1e02: c7 00 00 00 00 00 movl $0x0,(%eax)
q->head = 0;
1e08: 8b 45 08 mov 0x8(%ebp),%eax
1e0b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
1e12: 8b 45 08 mov 0x8(%ebp),%eax
1e15: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
1e1c: 5d pop %ebp
1e1d: c3 ret
00001e1e <add_q>:
void add_q(struct queue *q, int v){
1e1e: 55 push %ebp
1e1f: 89 e5 mov %esp,%ebp
1e21: 83 ec 28 sub $0x28,%esp
struct node * n = malloc(sizeof(struct node));
1e24: c7 04 24 08 00 00 00 movl $0x8,(%esp)
1e2b: e8 8f fd ff ff call 1bbf <malloc>
1e30: 89 45 f4 mov %eax,-0xc(%ebp)
n->next = 0;
1e33: 8b 45 f4 mov -0xc(%ebp),%eax
1e36: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
n->value = v;
1e3d: 8b 45 f4 mov -0xc(%ebp),%eax
1e40: 8b 55 0c mov 0xc(%ebp),%edx
1e43: 89 10 mov %edx,(%eax)
if(q->head == 0){
1e45: 8b 45 08 mov 0x8(%ebp),%eax
1e48: 8b 40 04 mov 0x4(%eax),%eax
1e4b: 85 c0 test %eax,%eax
1e4d: 75 0b jne 1e5a <add_q+0x3c>
q->head = n;
1e4f: 8b 45 08 mov 0x8(%ebp),%eax
1e52: 8b 55 f4 mov -0xc(%ebp),%edx
1e55: 89 50 04 mov %edx,0x4(%eax)
1e58: eb 0c jmp 1e66 <add_q+0x48>
}else{
q->tail->next = n;
1e5a: 8b 45 08 mov 0x8(%ebp),%eax
1e5d: 8b 40 08 mov 0x8(%eax),%eax
1e60: 8b 55 f4 mov -0xc(%ebp),%edx
1e63: 89 50 04 mov %edx,0x4(%eax)
}
q->tail = n;
1e66: 8b 45 08 mov 0x8(%ebp),%eax
1e69: 8b 55 f4 mov -0xc(%ebp),%edx
1e6c: 89 50 08 mov %edx,0x8(%eax)
q->size++;
1e6f: 8b 45 08 mov 0x8(%ebp),%eax
1e72: 8b 00 mov (%eax),%eax
1e74: 8d 50 01 lea 0x1(%eax),%edx
1e77: 8b 45 08 mov 0x8(%ebp),%eax
1e7a: 89 10 mov %edx,(%eax)
}
1e7c: c9 leave
1e7d: c3 ret
00001e7e <empty_q>:
int empty_q(struct queue *q){
1e7e: 55 push %ebp
1e7f: 89 e5 mov %esp,%ebp
if(q->size == 0)
1e81: 8b 45 08 mov 0x8(%ebp),%eax
1e84: 8b 00 mov (%eax),%eax
1e86: 85 c0 test %eax,%eax
1e88: 75 07 jne 1e91 <empty_q+0x13>
return 1;
1e8a: b8 01 00 00 00 mov $0x1,%eax
1e8f: eb 05 jmp 1e96 <empty_q+0x18>
else
return 0;
1e91: b8 00 00 00 00 mov $0x0,%eax
}
1e96: 5d pop %ebp
1e97: c3 ret
00001e98 <pop_q>:
int pop_q(struct queue *q){
1e98: 55 push %ebp
1e99: 89 e5 mov %esp,%ebp
1e9b: 83 ec 28 sub $0x28,%esp
int val;
struct node *destroy;
if(!empty_q(q)){
1e9e: 8b 45 08 mov 0x8(%ebp),%eax
1ea1: 89 04 24 mov %eax,(%esp)
1ea4: e8 d5 ff ff ff call 1e7e <empty_q>
1ea9: 85 c0 test %eax,%eax
1eab: 75 5d jne 1f0a <pop_q+0x72>
val = q->head->value;
1ead: 8b 45 08 mov 0x8(%ebp),%eax
1eb0: 8b 40 04 mov 0x4(%eax),%eax
1eb3: 8b 00 mov (%eax),%eax
1eb5: 89 45 f0 mov %eax,-0x10(%ebp)
destroy = q->head;
1eb8: 8b 45 08 mov 0x8(%ebp),%eax
1ebb: 8b 40 04 mov 0x4(%eax),%eax
1ebe: 89 45 f4 mov %eax,-0xc(%ebp)
q->head = q->head->next;
1ec1: 8b 45 08 mov 0x8(%ebp),%eax
1ec4: 8b 40 04 mov 0x4(%eax),%eax
1ec7: 8b 50 04 mov 0x4(%eax),%edx
1eca: 8b 45 08 mov 0x8(%ebp),%eax
1ecd: 89 50 04 mov %edx,0x4(%eax)
free(destroy);
1ed0: 8b 45 f4 mov -0xc(%ebp),%eax
1ed3: 89 04 24 mov %eax,(%esp)
1ed6: e8 b5 fb ff ff call 1a90 <free>
q->size--;
1edb: 8b 45 08 mov 0x8(%ebp),%eax
1ede: 8b 00 mov (%eax),%eax
1ee0: 8d 50 ff lea -0x1(%eax),%edx
1ee3: 8b 45 08 mov 0x8(%ebp),%eax
1ee6: 89 10 mov %edx,(%eax)
if(q->size == 0){
1ee8: 8b 45 08 mov 0x8(%ebp),%eax
1eeb: 8b 00 mov (%eax),%eax
1eed: 85 c0 test %eax,%eax
1eef: 75 14 jne 1f05 <pop_q+0x6d>
q->head = 0;
1ef1: 8b 45 08 mov 0x8(%ebp),%eax
1ef4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
1efb: 8b 45 08 mov 0x8(%ebp),%eax
1efe: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
return val;
1f05: 8b 45 f0 mov -0x10(%ebp),%eax
1f08: eb 05 jmp 1f0f <pop_q+0x77>
}
return -1;
1f0a: b8 ff ff ff ff mov $0xffffffff,%eax
}
1f0f: c9 leave
1f10: c3 ret
1f11: 90 nop
1f12: 90 nop
1f13: 90 nop
00001f14 <sem_acquire>:
#include "semaphore.h"
void sem_acquire(struct Semaphore *s)
{
1f14: 55 push %ebp
1f15: 89 e5 mov %esp,%ebp
1f17: 83 ec 18 sub $0x18,%esp
lock_acquire(&s->lock);
1f1a: 8b 45 08 mov 0x8(%ebp),%eax
1f1d: 89 04 24 mov %eax,(%esp)
1f20: e8 a3 fd ff ff call 1cc8 <lock_acquire>
s->count--;
1f25: 8b 45 08 mov 0x8(%ebp),%eax
1f28: 8b 40 04 mov 0x4(%eax),%eax
1f2b: 8d 50 ff lea -0x1(%eax),%edx
1f2e: 8b 45 08 mov 0x8(%ebp),%eax
1f31: 89 50 04 mov %edx,0x4(%eax)
if( s->count < 0)
1f34: 8b 45 08 mov 0x8(%ebp),%eax
1f37: 8b 40 04 mov 0x4(%eax),%eax
1f3a: 85 c0 test %eax,%eax
1f3c: 79 27 jns 1f65 <sem_acquire+0x51>
{
add_q(&s->q, getpid());
1f3e: e8 75 f8 ff ff call 17b8 <getpid>
1f43: 8b 55 08 mov 0x8(%ebp),%edx
1f46: 83 c2 08 add $0x8,%edx
1f49: 89 44 24 04 mov %eax,0x4(%esp)
1f4d: 89 14 24 mov %edx,(%esp)
1f50: e8 c9 fe ff ff call 1e1e <add_q>
lock_release(&s->lock);
1f55: 8b 45 08 mov 0x8(%ebp),%eax
1f58: 89 04 24 mov %eax,(%esp)
1f5b: e8 87 fd ff ff call 1ce7 <lock_release>
tsleep();
1f60: e8 83 f8 ff ff call 17e8 <tsleep>
}
lock_release(&s->lock);
1f65: 8b 45 08 mov 0x8(%ebp),%eax
1f68: 89 04 24 mov %eax,(%esp)
1f6b: e8 77 fd ff ff call 1ce7 <lock_release>
}
1f70: c9 leave
1f71: c3 ret
00001f72 <sem_signal>:
void sem_signal(struct Semaphore *s)
{
1f72: 55 push %ebp
1f73: 89 e5 mov %esp,%ebp
1f75: 83 ec 28 sub $0x28,%esp
lock_acquire(&s->lock);
1f78: 8b 45 08 mov 0x8(%ebp),%eax
1f7b: 89 04 24 mov %eax,(%esp)
1f7e: e8 45 fd ff ff call 1cc8 <lock_acquire>
s->count++;
1f83: 8b 45 08 mov 0x8(%ebp),%eax
1f86: 8b 40 04 mov 0x4(%eax),%eax
1f89: 8d 50 01 lea 0x1(%eax),%edx
1f8c: 8b 45 08 mov 0x8(%ebp),%eax
1f8f: 89 50 04 mov %edx,0x4(%eax)
if( s->count <= 0)
1f92: 8b 45 08 mov 0x8(%ebp),%eax
1f95: 8b 40 04 mov 0x4(%eax),%eax
1f98: 85 c0 test %eax,%eax
1f9a: 7f 1c jg 1fb8 <sem_signal+0x46>
{
int tid = pop_q(&s->q);
1f9c: 8b 45 08 mov 0x8(%ebp),%eax
1f9f: 83 c0 08 add $0x8,%eax
1fa2: 89 04 24 mov %eax,(%esp)
1fa5: e8 ee fe ff ff call 1e98 <pop_q>
1faa: 89 45 f4 mov %eax,-0xc(%ebp)
twakeup(tid);
1fad: 8b 45 f4 mov -0xc(%ebp),%eax
1fb0: 89 04 24 mov %eax,(%esp)
1fb3: e8 38 f8 ff ff call 17f0 <twakeup>
}
lock_release(&s->lock);
1fb8: 8b 45 08 mov 0x8(%ebp),%eax
1fbb: 89 04 24 mov %eax,(%esp)
1fbe: e8 24 fd ff ff call 1ce7 <lock_release>
}
1fc3: c9 leave
1fc4: c3 ret
00001fc5 <sem_init>:
void sem_init(struct Semaphore *s, int size){
1fc5: 55 push %ebp
1fc6: 89 e5 mov %esp,%ebp
1fc8: 83 ec 18 sub $0x18,%esp
lock_init(&s->lock);
1fcb: 8b 45 08 mov 0x8(%ebp),%eax
1fce: 89 04 24 mov %eax,(%esp)
1fd1: e8 e4 fc ff ff call 1cba <lock_init>
s->count = size;
1fd6: 8b 45 08 mov 0x8(%ebp),%eax
1fd9: 8b 55 0c mov 0xc(%ebp),%edx
1fdc: 89 50 04 mov %edx,0x4(%eax)
init_q(&s->q);
1fdf: 8b 45 08 mov 0x8(%ebp),%eax
1fe2: 83 c0 08 add $0x8,%eax
1fe5: 89 04 24 mov %eax,(%esp)
1fe8: e8 0f fe ff ff call 1dfc <init_q>
}
1fed: c9 leave
1fee: c3 ret
|
; A022278: a(n) = n*(21*n-1)/2.
; 0,10,41,93,166,260,375,511,668,846,1045,1265,1506,1768,2051,2355,2680,3026,3393,3781,4190,4620,5071,5543,6036,6550,7085,7641,8218,8816,9435,10075,10736,11418,12121,12845,13590,14356,15143,15951,16780,17630,18501,19393,20306,21240,22195,23171,24168,25186,26225,27285,28366,29468,30591,31735,32900,34086,35293,36521,37770,39040,40331,41643,42976,44330,45705,47101,48518,49956,51415,52895,54396,55918,57461,59025,60610,62216,63843,65491,67160,68850,70561,72293,74046,75820,77615,79431,81268,83126,85005,86905,88826,90768,92731,94715,96720,98746,100793,102861
mul $0,21
bin $0,2
div $0,21
|
dnl Alpha ev6 nails mpn_add_n and mpn_sub_n.
dnl Copyright 2002, 2006 Free Software Foundation, Inc.
dnl
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public License as
dnl published by the Free Software Foundation; either version 3 of the
dnl License, or (at your option) any later version.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public License
dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
dnl Runs at 2.5 cycles/limb. It would be possible to reach 2.0 cycles/limb
dnl with 8-way unrolling.
include(`../config.m4')
dnl INPUT PARAMETERS
define(`rp',`r16')
define(`up',`r17')
define(`vp',`r18')
define(`n',`r19')
define(`rl0',`r0')
define(`rl1',`r1')
define(`rl2',`r2')
define(`rl3',`r3')
define(`ul0',`r4')
define(`ul1',`r5')
define(`ul2',`r6')
define(`ul3',`r7')
define(`vl0',`r22')
define(`vl1',`r23')
define(`vl2',`r24')
define(`vl3',`r25')
define(`numb_mask',`r21')
define(`NAIL_BITS',`GMP_NAIL_BITS')
define(`CYSH',`GMP_NUMB_BITS')
dnl This declaration is munged by configure
NAILS_SUPPORT(1-63)
ifdef(`OPERATION_add_n', `
define(`OP', addq)
define(`CYSH',`GMP_NUMB_BITS')
define(`func', mpn_add_n)')
ifdef(`OPERATION_sub_n', `
define(`OP', subq)
define(`CYSH',63)
define(`func', mpn_sub_n)')
MULFUNC_PROLOGUE(mpn_add_n mpn_sub_n)
ASM_START()
PROLOGUE(func)
lda numb_mask, -1(r31)
srl numb_mask, NAIL_BITS, numb_mask
bis r31, r31, r20
and n, 3, r25
lda n, -4(n)
beq r25, L(ge4)
L(lp0): ldq ul0, 0(up)
lda up, 8(up)
ldq vl0, 0(vp)
lda vp, 8(vp)
lda rp, 8(rp)
lda r25, -1(r25)
OP ul0, vl0, rl0
OP rl0, r20, rl0
and rl0, numb_mask, r28
stq r28, -8(rp)
srl rl0, CYSH, r20
bne r25, L(lp0)
blt n, L(ret)
L(ge4): ldq ul0, 0(up)
ldq vl0, 0(vp)
ldq ul1, 8(up)
ldq vl1, 8(vp)
ldq ul2, 16(up)
ldq vl2, 16(vp)
ldq ul3, 24(up)
ldq vl3, 24(vp)
lda up, 32(up)
lda vp, 32(vp)
lda n, -4(n)
bge n, L(ge8)
OP ul0, vl0, rl0 C main-add 0
OP rl0, r20, rl0 C cy-add 0
OP ul1, vl1, rl1 C main-add 1
srl rl0, CYSH, r20 C gen cy 0
OP rl1, r20, rl1 C cy-add 1
and rl0,numb_mask, r27
br r31, L(cj0)
L(ge8): OP ul0, vl0, rl0 C main-add 0
ldq ul0, 0(up)
ldq vl0, 0(vp)
OP rl0, r20, rl0 C cy-add 0
OP ul1, vl1, rl1 C main-add 1
srl rl0, CYSH, r20 C gen cy 0
ldq ul1, 8(up)
ldq vl1, 8(vp)
OP rl1, r20, rl1 C cy-add 1
and rl0,numb_mask, r27
OP ul2, vl2, rl2 C main-add 2
srl rl1, CYSH, r20 C gen cy 1
ldq ul2, 16(up)
ldq vl2, 16(vp)
OP rl2, r20, rl2 C cy-add 2
and rl1,numb_mask, r28
stq r27, 0(rp)
OP ul3, vl3, rl3 C main-add 3
srl rl2, CYSH, r20 C gen cy 2
ldq ul3, 24(up)
ldq vl3, 24(vp)
OP rl3, r20, rl3 C cy-add 3
and rl2,numb_mask, r27
stq r28, 8(rp)
lda rp, 32(rp)
lda up, 32(up)
lda vp, 32(vp)
lda n, -4(n)
blt n, L(end)
ALIGN(32)
L(top): OP ul0, vl0, rl0 C main-add 0
srl rl3, CYSH, r20 C gen cy 3
ldq ul0, 0(up)
ldq vl0, 0(vp)
OP rl0, r20, rl0 C cy-add 0
and rl3,numb_mask, r28
stq r27, -16(rp)
bis r31, r31, r31
OP ul1, vl1, rl1 C main-add 1
srl rl0, CYSH, r20 C gen cy 0
ldq ul1, 8(up)
ldq vl1, 8(vp)
OP rl1, r20, rl1 C cy-add 1
and rl0,numb_mask, r27
stq r28, -8(rp)
bis r31, r31, r31
OP ul2, vl2, rl2 C main-add 2
srl rl1, CYSH, r20 C gen cy 1
ldq ul2, 16(up)
ldq vl2, 16(vp)
OP rl2, r20, rl2 C cy-add 2
and rl1,numb_mask, r28
stq r27, 0(rp)
bis r31, r31, r31
OP ul3, vl3, rl3 C main-add 3
srl rl2, CYSH, r20 C gen cy 2
ldq ul3, 24(up)
ldq vl3, 24(vp)
OP rl3, r20, rl3 C cy-add 3
and rl2,numb_mask, r27
stq r28, 8(rp)
bis r31, r31, r31
bis r31, r31, r31
lda n, -4(n)
lda up, 32(up)
lda vp, 32(vp)
bis r31, r31, r31
bis r31, r31, r31
lda rp, 32(rp)
bge n, L(top)
L(end): OP ul0, vl0, rl0 C main-add 0
srl rl3, CYSH, r20 C gen cy 3
OP rl0, r20, rl0 C cy-add 0
and rl3,numb_mask, r28
stq r27, -16(rp)
OP ul1, vl1, rl1 C main-add 1
srl rl0, CYSH, r20 C gen cy 0
OP rl1, r20, rl1 C cy-add 1
and rl0,numb_mask, r27
stq r28, -8(rp)
L(cj0): OP ul2, vl2, rl2 C main-add 2
srl rl1, CYSH, r20 C gen cy 1
OP rl2, r20, rl2 C cy-add 2
and rl1,numb_mask, r28
stq r27, 0(rp)
OP ul3, vl3, rl3 C main-add 3
srl rl2, CYSH, r20 C gen cy 2
OP rl3, r20, rl3 C cy-add 3
and rl2,numb_mask, r27
stq r28, 8(rp)
srl rl3, CYSH, r20 C gen cy 3
and rl3,numb_mask, r28
stq r27, 16(rp)
stq r28, 24(rp)
L(ret): and r20, 1, r0
ret r31, (r26), 1
EPILOGUE()
ASM_END()
|
;/************************************************************************************
;Thu Mar 31 15:04:03 2016
;
;MIT License
;Copyright (c) 2016 zhuzuolang
;
;Permission is hereby granted, free of charge, to any person obtaining a copy
;of this software and associated documentation files (the "Software"), to deal
;in the Software without restriction, including without limitation the rights
;to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;copies of the Software, and to permit persons to whom the Software is
;furnished to do so, subject to the following conditions:
;The above copyright notice and this permission notice shall be included in all
;copies or substantial portions of the Software.
;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;SOFTWARE.
;************************************************************************************/
[FORMAT "WCOFF"] ;
[INSTRSET "i486p"] ;
[BITS 32] ;
[FILE "naskfunc.nas"] ;
GLOBAL _io_hlt ;void io_hlt ( );
GLOBAL _setGdt,_setIdt
GLOBAL _io_in8, _io_in16, _io_in32
GLOBAL _io_out8, _io_out16, _io_out32
GLOBAL _io_delay
GLOBAL _port_read,_port_write
GLOBAL _load_master_maskWord
GLOBAL _load_slave_maskWord
GLOBAL _loadTss,_loadLdt,_loadReg,_runProcess
GLOBAL _hander,_sendEOI_Master,_sendEOI_Slave
GLOBAL _open_interrupt,_close_interrupt
EXTERN _kernel_mutex
[SECTION .text]
_loadReg:
MOV EAX,[ESP+24]
MOV ECX,[ESP+28]
MOV EDX,[ESP+32]
MOV EBX,[ESP+36]
MOV EBP,[ESP+40]
MOV ESI,[ESP+44]
MOV EDI,[ESP+48]
ADD ESP,4
DEC DWORD[_kernel_mutex]
;加载DS寄存器,由于加载后会改变数据段,因此放在上面这段代码之后
PUSH EAX
MOV EAX,[ESP+52];DS
MOV DS,AX
POP EAX
;
IRETD
_loadTss:
LTR [ESP+4]
RET
_loadLdt:
LLDT [ESP+4]
RET
_open_interrupt:
STI
POP EAX
JMP EAX
_close_interrupt:
CLI
POP EAX
JMP EAX
_sendEOI_Master:
MOV AL,0x20
OUT 20H,AL
NOP
NOP
NOP
NOP
RET
_sendEOI_Slave:
MOV AL,0x20
OUT 0XA0,AL
NOP
NOP
NOP
NOP
RET
_hander:
CLI
CALL _sendEOI_Master
STI
IRETD
_io_hlt: ; void io_hlt(void);
PUSH EBP
MOV EBP,ESP
HLT
POP EBP
RET
_setGdt:
PUSH EBP
MOV EBP,ESP
MOV EAX,[EBP+8]
LGDT [EAX]
POP EBP
POP EDX
PUSH 8
PUSH EDX
RETF
RET
_setIdt:
PUSH EBP
MOV EBP,ESP
MOV EAX,[EBP+8]
CLI
LIDT [EAX]
POP EBP
RET
_io_in8: ; int io_in8(int port);
MOV EDX,[ESP+4] ; port
MOV EAX,0
IN AL,DX
RET
_io_in16: ; int io_in16(int port );
MOV EDX,[ESP+4] ; port
MOV EAX,0
IN AX,DX
RET
_io_in32: ; int io_in32(int port );
MOV EDX,[ESP+4] ; port
IN EAX,DX
RET
_io_out8: ; void io_out8(int port, int data );
MOV EDX,[ESP+4] ; port
MOV AL,[ESP+8] ; data
OUT DX,AL
RET
_io_out16: ; void io_out16(int port, int data);
MOV EDX,[ESP+4] ; port
MOV EAX,[ESP+8] ; data
OUT DX,AX
RET
_io_out32: ; void io_out32(int port, int data);
MOV EDX,[ESP+4] ; port
MOV EAX,[ESP+8] ; data
OUT DX,EAX
RET
; ========================================================================
; void port_read(u16 port, void* buf, int n);
; ========================================================================
_port_read:
PUSHAD
MOV EDX, [ESP + 4] ; port
MOV EDI, [ESP + 8] ; buf
MOV ECX, [ESP + 12] ; n
SHR ECX, 1
CLD
REP INSW
POPAD
RET
; ========================================================================
; void port_write(u16 port, void* buf, int n);
; ========================================================================
_port_write:
MOV EDX, [ESP+4] ; port
MOV ESI, [ESP+8] ; buf
MOV ECX, [ESP+12] ; n
SHR ECX, 1
CLD
REP OUTSW
RET
_io_delay:
NOP
NOP
NOP
NOP
RET
_load_master_maskWord: ;void load load_master_maskWord(u_int8 word);
MOV AL,[ESP+4]
OUT 0X21,AL
RET
_load_slave_maskWord: ;void load load_slave_maskWord (u_int8 word);
MOV AL,[ESP+4]
OUT 0Xa1,AL
RET
|
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Simon Hausmann <hausmann@kde.org>
* Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
* reserved.
* (C) 2006 Graham Dennis (graham.dennis@gmail.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this 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.
*/
#include "third_party/blink/renderer/core/html/html_anchor_element.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_prescient_networking.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h"
#include "third_party/blink/renderer/core/events/keyboard_event.h"
#include "third_party/blink/renderer/core/events/mouse_event.h"
#include "third_party/blink/renderer/core/frame/ad_tracker.h"
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/anchor_element_metrics.h"
#include "third_party/blink/renderer/core/html/anchor_element_metrics_sender.h"
#include "third_party/blink/renderer/core/html/conversion_measurement_parsing.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/loader/frame_load_request.h"
#include "third_party/blink/renderer/core/loader/navigation_policy.h"
#include "third_party/blink/renderer/core/loader/ping_loader.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/heap/heap.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
namespace blink {
namespace {
// Note: Here it covers download originated from clicking on <a download> link
// that results in direct download. Features in this method can also be logged
// from browser for download due to navigations to non-web-renderable content.
bool ShouldInterveneDownloadByFramePolicy(LocalFrame* frame) {
bool should_intervene_download = false;
Document& document = *(frame->GetDocument());
UseCounter::Count(document, WebFeature::kDownloadPrePolicyCheck);
bool has_gesture = LocalFrame::HasTransientUserActivation(frame);
if (!has_gesture) {
UseCounter::Count(document, WebFeature::kDownloadWithoutUserGesture);
}
if (frame->IsAdSubframe()) {
UseCounter::Count(document, WebFeature::kDownloadInAdFrame);
if (!has_gesture) {
UseCounter::Count(document,
WebFeature::kDownloadInAdFrameWithoutUserGesture);
if (base::FeatureList::IsEnabled(
blink::features::
kBlockingDownloadsInAdFrameWithoutUserActivation))
should_intervene_download = true;
}
}
if (frame->DomWindow()->IsSandboxed(
network::mojom::blink::WebSandboxFlags::kDownloads)) {
UseCounter::Count(document, WebFeature::kDownloadInSandbox);
if (RuntimeEnabledFeatures::BlockingDownloadsInSandboxEnabled())
should_intervene_download = true;
}
if (!should_intervene_download)
UseCounter::Count(document, WebFeature::kDownloadPostPolicyCheck);
return should_intervene_download;
}
} // namespace
HTMLAnchorElement::HTMLAnchorElement(Document& document)
: HTMLAnchorElement(html_names::kATag, document) {}
HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tag_name,
Document& document)
: HTMLElement(tag_name, document),
link_relations_(0),
cached_visited_link_hash_(0),
rel_list_(MakeGarbageCollected<RelList>(this)) {}
HTMLAnchorElement::~HTMLAnchorElement() = default;
bool HTMLAnchorElement::SupportsFocus() const {
if (HasEditableStyle(*this))
return HTMLElement::SupportsFocus();
// If not a link we should still be able to focus the element if it has
// tabIndex.
return IsLink() || HTMLElement::SupportsFocus();
}
bool HTMLAnchorElement::ShouldHaveFocusAppearance() const {
return (GetDocument().LastFocusType() != mojom::blink::FocusType::kMouse) ||
HTMLElement::SupportsFocus();
}
bool HTMLAnchorElement::IsMouseFocusable() const {
if (IsLink())
return SupportsFocus();
return HTMLElement::IsMouseFocusable();
}
bool HTMLAnchorElement::IsKeyboardFocusable() const {
DCHECK(GetDocument().IsActive());
if (IsFocusable() && Element::SupportsFocus())
return HTMLElement::IsKeyboardFocusable();
if (IsLink() && !GetDocument().GetPage()->GetChromeClient().TabsToLinks())
return false;
return HTMLElement::IsKeyboardFocusable();
}
static void AppendServerMapMousePosition(StringBuilder& url, Event* event) {
auto* mouse_event = DynamicTo<MouseEvent>(event);
if (!mouse_event)
return;
DCHECK(event->target());
Node* target = event->target()->ToNode();
DCHECK(target);
auto* image_element = DynamicTo<HTMLImageElement>(target);
if (!image_element || !image_element->IsServerMap())
return;
LayoutObject* layout_object = image_element->GetLayoutObject();
if (!layout_object || !layout_object->IsBox())
return;
// The coordinates sent in the query string are relative to the height and
// width of the image element, ignoring CSS transform/zoom.
FloatPoint map_point = layout_object->AbsoluteToLocalFloatPoint(
FloatPoint(mouse_event->AbsoluteLocation()));
// The origin (0,0) is at the upper left of the content area, inside the
// padding and border.
map_point -=
FloatSize(To<LayoutBox>(layout_object)->PhysicalContentBoxOffset());
// CSS zoom is not reflected in the map coordinates.
float scale_factor = 1 / layout_object->Style()->EffectiveZoom();
map_point.Scale(scale_factor, scale_factor);
// Negative coordinates are clamped to 0 such that clicks in the left and
// top padding/border areas receive an X or Y coordinate of 0.
IntPoint clamped_point(RoundedIntPoint(map_point));
clamped_point.ClampNegativeToZero();
url.Append('?');
url.AppendNumber(clamped_point.X());
url.Append(',');
url.AppendNumber(clamped_point.Y());
}
void HTMLAnchorElement::DefaultEventHandler(Event& event) {
if (IsLink()) {
if (IsFocused() && IsEnterKeyKeydownEvent(event) && IsLiveLink()) {
event.SetDefaultHandled();
DispatchSimulatedClick(&event);
return;
}
if (IsLinkClick(event) && IsLiveLink()) {
HandleClick(event);
return;
}
}
HTMLElement::DefaultEventHandler(event);
}
bool HTMLAnchorElement::HasActivationBehavior() const {
return true;
}
void HTMLAnchorElement::SetActive(bool active) {
if (active && HasEditableStyle(*this))
return;
HTMLElement::SetActive(active);
}
void HTMLAnchorElement::AttributeChanged(
const AttributeModificationParams& params) {
HTMLElement::AttributeChanged(params);
if (params.reason != AttributeModificationReason::kDirectly)
return;
if (params.name != html_names::kHrefAttr)
return;
if (!IsLink() && AdjustedFocusedElementInTreeScope() == this)
blur();
}
void HTMLAnchorElement::ParseAttribute(
const AttributeModificationParams& params) {
if (params.name == html_names::kHrefAttr) {
bool was_link = IsLink();
SetIsLink(!params.new_value.IsNull());
if (was_link || IsLink()) {
PseudoStateChanged(CSSSelector::kPseudoLink);
PseudoStateChanged(CSSSelector::kPseudoVisited);
PseudoStateChanged(CSSSelector::kPseudoWebkitAnyLink);
PseudoStateChanged(CSSSelector::kPseudoAnyLink);
}
if (IsLink()) {
String parsed_url = StripLeadingAndTrailingHTMLSpaces(params.new_value);
// GetDocument().GetFrame() could be null if this method is called from
// DOMParser::parseFromString(), which internally creates a document
// and eventually calls this.
if (GetDocument().IsDNSPrefetchEnabled() && GetDocument().GetFrame()) {
if (ProtocolIs(parsed_url, "http") || ProtocolIs(parsed_url, "https") ||
parsed_url.StartsWith("//")) {
WebPrescientNetworking* web_prescient_networking =
GetDocument().GetFrame()->PrescientNetworking();
if (web_prescient_networking) {
web_prescient_networking->PrefetchDNS(
GetDocument().CompleteURL(parsed_url).Host());
}
}
}
}
InvalidateCachedVisitedLinkHash();
LogUpdateAttributeIfIsolatedWorldAndInDocument("a", params);
} else if (params.name == html_names::kNameAttr ||
params.name == html_names::kTitleAttr) {
// Do nothing.
} else if (params.name == html_names::kRelAttr) {
SetRel(params.new_value);
rel_list_->DidUpdateAttributeValue(params.old_value, params.new_value);
} else {
HTMLElement::ParseAttribute(params);
}
}
bool HTMLAnchorElement::IsURLAttribute(const Attribute& attribute) const {
return attribute.GetName().LocalName() == html_names::kHrefAttr ||
HTMLElement::IsURLAttribute(attribute);
}
bool HTMLAnchorElement::HasLegalLinkAttribute(const QualifiedName& name) const {
return name == html_names::kHrefAttr ||
HTMLElement::HasLegalLinkAttribute(name);
}
bool HTMLAnchorElement::CanStartSelection() const {
if (!IsLink())
return HTMLElement::CanStartSelection();
return HasEditableStyle(*this);
}
bool HTMLAnchorElement::draggable() const {
// Should be draggable if we have an href attribute.
const AtomicString& value = FastGetAttribute(html_names::kDraggableAttr);
if (EqualIgnoringASCIICase(value, "true"))
return true;
if (EqualIgnoringASCIICase(value, "false"))
return false;
return FastHasAttribute(html_names::kHrefAttr);
}
KURL HTMLAnchorElement::Href() const {
return GetDocument().CompleteURL(StripLeadingAndTrailingHTMLSpaces(
FastGetAttribute(html_names::kHrefAttr)));
}
void HTMLAnchorElement::SetHref(const AtomicString& value) {
setAttribute(html_names::kHrefAttr, value);
}
KURL HTMLAnchorElement::Url() const {
return Href();
}
void HTMLAnchorElement::SetURL(const KURL& url) {
SetHref(AtomicString(url.GetString()));
}
String HTMLAnchorElement::Input() const {
return FastGetAttribute(html_names::kHrefAttr);
}
void HTMLAnchorElement::SetInput(const String& value) {
SetHref(AtomicString(value));
}
bool HTMLAnchorElement::HasRel(uint32_t relation) const {
return link_relations_ & relation;
}
void HTMLAnchorElement::SetRel(const AtomicString& value) {
link_relations_ = 0;
SpaceSplitString new_link_relations(value.LowerASCII());
// FIXME: Add link relations as they are implemented
if (new_link_relations.Contains("noreferrer"))
link_relations_ |= kRelationNoReferrer;
if (new_link_relations.Contains("noopener"))
link_relations_ |= kRelationNoOpener;
if (new_link_relations.Contains("opener"))
link_relations_ |= kRelationOpener;
}
const AtomicString& HTMLAnchorElement::GetName() const {
return GetNameAttribute();
}
const AtomicString& HTMLAnchorElement::GetEffectiveTarget() const {
const AtomicString& target = FastGetAttribute(html_names::kTargetAttr);
if (!target.IsEmpty())
return target;
return GetDocument().BaseTarget();
}
int HTMLAnchorElement::DefaultTabIndex() const {
return 0;
}
bool HTMLAnchorElement::IsLiveLink() const {
return IsLink() && !HasEditableStyle(*this);
}
bool HTMLAnchorElement::HasImpression() const {
return hasAttribute(html_names::kImpressiondataAttr) &&
hasAttribute(html_names::kConversiondestinationAttr);
}
void HTMLAnchorElement::SendPings(const KURL& destination_url) const {
const AtomicString& ping_value = FastGetAttribute(html_names::kPingAttr);
if (ping_value.IsNull() || !GetDocument().GetSettings() ||
!GetDocument().GetSettings()->GetHyperlinkAuditingEnabled()) {
return;
}
// Pings should not be sent if MHTML page is loaded.
if (GetDocument().Fetcher()->Archive())
return;
if ((ping_value.Contains('\n') || ping_value.Contains('\r') ||
ping_value.Contains('\t')) &&
ping_value.Contains('<')) {
Deprecation::CountDeprecation(
GetExecutionContext(), WebFeature::kCanRequestURLHTTPContainingNewline);
return;
}
UseCounter::Count(GetDocument(), WebFeature::kHTMLAnchorElementPingAttribute);
SpaceSplitString ping_urls(ping_value);
for (unsigned i = 0; i < ping_urls.size(); i++) {
PingLoader::SendLinkAuditPing(GetDocument().GetFrame(),
GetDocument().CompleteURL(ping_urls[i]),
destination_url);
}
}
void HTMLAnchorElement::HandleClick(Event& event) {
event.SetDefaultHandled();
LocalDOMWindow* window = GetDocument().domWindow();
if (!window)
return;
if (!isConnected()) {
UseCounter::Count(GetDocument(),
WebFeature::kAnchorClickDispatchForNonConnectedNode);
}
AnchorElementMetrics::MaybeReportClickedMetricsOnClick(this);
StringBuilder url;
url.Append(StripLeadingAndTrailingHTMLSpaces(
FastGetAttribute(html_names::kHrefAttr)));
AppendServerMapMousePosition(url, &event);
KURL completed_url = GetDocument().CompleteURL(url.ToString());
// Schedule the ping before the frame load. Prerender in Chrome may kill the
// renderer as soon as the navigation is sent out.
SendPings(completed_url);
ResourceRequest request(completed_url);
network::mojom::ReferrerPolicy policy;
if (FastHasAttribute(html_names::kReferrerpolicyAttr) &&
SecurityPolicy::ReferrerPolicyFromString(
FastGetAttribute(html_names::kReferrerpolicyAttr),
kSupportReferrerPolicyLegacyKeywords, &policy) &&
!HasRel(kRelationNoReferrer)) {
UseCounter::Count(GetDocument(),
WebFeature::kHTMLAnchorElementReferrerPolicyAttribute);
request.SetReferrerPolicy(policy);
}
// Ignore the download attribute if we either can't read the content, or
// the event is an alt-click or similar.
LocalFrame* frame = window->GetFrame();
if (FastHasAttribute(html_names::kDownloadAttr) &&
NavigationPolicyFromEvent(&event) != kNavigationPolicyDownload &&
window->GetSecurityOrigin()->CanReadContent(completed_url)) {
if (ShouldInterveneDownloadByFramePolicy(frame))
return;
request.SetSuggestedFilename(
static_cast<String>(FastGetAttribute(html_names::kDownloadAttr)));
request.SetRequestContext(mojom::blink::RequestContextType::DOWNLOAD);
request.SetRequestorOrigin(window->GetSecurityOrigin());
network::mojom::ReferrerPolicy referrer_policy =
request.GetReferrerPolicy();
if (referrer_policy == network::mojom::ReferrerPolicy::kDefault)
referrer_policy = window->GetReferrerPolicy();
Referrer referrer = SecurityPolicy::GenerateReferrer(
referrer_policy, completed_url, window->OutgoingReferrer());
request.SetReferrerString(referrer.referrer);
request.SetReferrerPolicy(referrer.referrer_policy);
frame->DownloadURL(request, network::mojom::blink::RedirectMode::kManual);
return;
}
request.SetRequestContext(mojom::blink::RequestContextType::HYPERLINK);
request.SetHasUserGesture(LocalFrame::HasTransientUserActivation(frame));
const AtomicString& target = GetEffectiveTarget();
FrameLoadRequest frame_request(window, request);
frame_request.SetNavigationPolicy(NavigationPolicyFromEvent(&event));
frame_request.SetClientRedirectReason(ClientNavigationReason::kAnchorClick);
if (HasRel(kRelationNoReferrer)) {
frame_request.SetNoReferrer();
frame_request.SetNoOpener();
}
if (HasRel(kRelationNoOpener) ||
(EqualIgnoringASCIICase(target, "_blank") && !HasRel(kRelationOpener) &&
RuntimeEnabledFeatures::TargetBlankImpliesNoOpenerEnabled() &&
frame->GetSettings()
->GetTargetBlankImpliesNoOpenerEnabledWillBeRemoved())) {
frame_request.SetNoOpener();
}
frame_request.SetTriggeringEventInfo(
event.isTrusted()
? mojom::blink::TriggeringEventInfo::kFromTrustedEvent
: mojom::blink::TriggeringEventInfo::kFromUntrustedEvent);
frame_request.SetInputStartTime(event.PlatformTimeStamp());
frame->MaybeLogAdClickNavigation();
if (request.HasUserGesture() && HasImpression()) {
// An impression must be attached prior to the
// FindOrCreateFrameForNavigation() call, as that call may result in
// performing a navigation if the call results in creating a new window with
// noopener set.
// At this time we don't know if the navigation will navigate a main frame
// or subframe. For example, a middle click on the anchor element will
// set `target_frame` to `frame`, but end up targeting a new window.
// Attach the impression regardless, the embedder will be able to drop
// impressions for subframe navigations.
base::Optional<WebImpression> impression = GetImpressionForAnchor(this);
if (impression)
frame_request.SetImpression(*impression);
}
Frame* target_frame =
frame->Tree().FindOrCreateFrameForNavigation(frame_request, target).frame;
// If hrefTranslate is enabled and set restrict processing it
// to same frame or navigations with noopener set.
if (RuntimeEnabledFeatures::HrefTranslateEnabled(GetExecutionContext()) &&
FastHasAttribute(html_names::kHreftranslateAttr) &&
(target_frame == frame || frame_request.GetWindowFeatures().noopener)) {
frame_request.SetHrefTranslate(
FastGetAttribute(html_names::kHreftranslateAttr));
UseCounter::Count(GetDocument(),
WebFeature::kHTMLAnchorElementHrefTranslateAttribute);
}
if (target_frame)
target_frame->Navigate(frame_request, WebFrameLoadType::kStandard);
}
bool IsEnterKeyKeydownEvent(Event& event) {
auto* keyboard_event = DynamicTo<KeyboardEvent>(event);
return event.type() == event_type_names::kKeydown && keyboard_event &&
keyboard_event->key() == "Enter" && !keyboard_event->repeat();
}
bool IsLinkClick(Event& event) {
auto* mouse_event = DynamicTo<MouseEvent>(event);
if ((event.type() != event_type_names::kClick &&
event.type() != event_type_names::kAuxclick) ||
!mouse_event) {
return false;
}
int16_t button = mouse_event->button();
return (button == static_cast<int16_t>(WebPointerProperties::Button::kLeft) ||
button ==
static_cast<int16_t>(WebPointerProperties::Button::kMiddle));
}
bool HTMLAnchorElement::WillRespondToMouseClickEvents() {
return IsLink() || HTMLElement::WillRespondToMouseClickEvents();
}
bool HTMLAnchorElement::IsInteractiveContent() const {
return IsLink();
}
Node::InsertionNotificationRequest HTMLAnchorElement::InsertedInto(
ContainerNode& insertion_point) {
InsertionNotificationRequest request =
HTMLElement::InsertedInto(insertion_point);
LogAddElementIfIsolatedWorldAndInDocument("a", html_names::kHrefAttr);
Document& top_document = GetDocument().TopDocument();
if (AnchorElementMetricsSender::HasAnchorElementMetricsSender(top_document))
AnchorElementMetricsSender::From(top_document)->AddAnchorElement(*this);
return request;
}
void HTMLAnchorElement::Trace(Visitor* visitor) const {
visitor->Trace(rel_list_);
HTMLElement::Trace(visitor);
}
} // namespace blink
|
# Scrivere un programma in linguaggio assembly MIPS che legga una stringa introdotta da tastiera. La stringa contiene sia caratteri maiuscoli che caratteri minuscoli,
# e complessivamente al più 255 caratteri. Il programma deve svolgere le seguenti operazioni:
# - visualizzare la stringa inserita
# - stampare a video l'uppercase della stringa
# Ad esempio la frase "Che Bella Giornata" diviene "CHE BELLA GIORNATA".
.text
.globl main
main:
la $a0, stringa
li $a1, 255
li $v0, 8
syscall
li $v0, 4
syscall
li $t4, 122
li $t6, 96
loop:
beq $t0, $a1, fine
lb $t2, stringa($t0)
slt $t3, $t2, $t4
sgt $t5, $t2, $t6
and $t7, $t3, $t5
bne $t7, 1, gia_upper
subi $t2, $t2, 32
gia_upper:
sb $t2, stringa($t0)
addi $t0, $t0, 1
j loop
fine:
li $v0, 4
syscall
li $v0, 10
syscall
.data
stringa: .space 255 |
; A183866: n+floor(2*sqrt(n-1)); complement of A035106.
; 1,4,5,7,9,10,11,13,14,16,17,18,19,21,22,23,25,26,27,28,29,31,32,33,34,36,37,38,39,40,41,43,44,45,46,47,49,50,51,52,53,54,55,57,58,59,60,61,62,64,65,66,67,68,69,70,71,73,74,75,76,77,78,79,81,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,100,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119
mov $1,$0
mul $0,4
mov $2,$1
add $2,2
mov $1,$2
add $1,7
lpb $0
add $1,1
sub $3,$4
add $3,3
trn $0,$3
mov $4,1
lpe
sub $1,8
|
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this 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.
*/
#include "core/css/MediaQueryMatcher.h"
#include "core/css/MediaList.h"
#include "core/css/MediaQueryEvaluator.h"
#include "core/css/MediaQueryList.h"
#include "core/css/MediaQueryListEvent.h"
#include "core/css/MediaQueryListListener.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Document.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/LocalFrameView.h"
#include "platform/wtf/Vector.h"
namespace blink {
MediaQueryMatcher* MediaQueryMatcher::Create(Document& document) {
return new MediaQueryMatcher(document);
}
MediaQueryMatcher::MediaQueryMatcher(Document& document)
: document_(&document) {
DCHECK(document_);
}
MediaQueryMatcher::~MediaQueryMatcher() {}
void MediaQueryMatcher::DocumentDetached() {
document_ = nullptr;
evaluator_ = nullptr;
}
MediaQueryEvaluator* MediaQueryMatcher::CreateEvaluator() const {
if (!document_ || !document_->GetFrame())
return nullptr;
return new MediaQueryEvaluator(document_->GetFrame());
}
bool MediaQueryMatcher::Evaluate(const MediaQuerySet* media) {
DCHECK(!document_ || document_->GetFrame() || !evaluator_);
if (!media)
return false;
// Cache the evaluator to avoid allocating one per evaluation.
if (!evaluator_)
evaluator_ = CreateEvaluator();
if (evaluator_)
return evaluator_->Eval(*media);
return false;
}
MediaQueryList* MediaQueryMatcher::MatchMedia(const String& query) {
if (!document_)
return nullptr;
RefPtr<MediaQuerySet> media = MediaQuerySet::Create(query);
return MediaQueryList::Create(document_, this, media);
}
void MediaQueryMatcher::AddMediaQueryList(MediaQueryList* query) {
if (!document_)
return;
media_lists_.insert(query);
}
void MediaQueryMatcher::RemoveMediaQueryList(MediaQueryList* query) {
if (!document_)
return;
media_lists_.erase(query);
}
void MediaQueryMatcher::AddViewportListener(MediaQueryListListener* listener) {
if (!document_)
return;
viewport_listeners_.insert(listener);
}
void MediaQueryMatcher::RemoveViewportListener(
MediaQueryListListener* listener) {
if (!document_)
return;
viewport_listeners_.erase(listener);
}
void MediaQueryMatcher::MediaFeaturesChanged() {
if (!document_)
return;
HeapVector<Member<MediaQueryListListener>> listeners_to_notify;
for (const auto& list : media_lists_) {
if (list->MediaFeaturesChanged(&listeners_to_notify)) {
Event* event = MediaQueryListEvent::Create(list);
event->SetTarget(list);
document_->EnqueueUniqueAnimationFrameEvent(event);
}
}
document_->EnqueueMediaQueryChangeListeners(listeners_to_notify);
}
void MediaQueryMatcher::ViewportChanged() {
if (!document_)
return;
HeapVector<Member<MediaQueryListListener>> listeners_to_notify;
for (const auto& listener : viewport_listeners_)
listeners_to_notify.push_back(listener);
document_->EnqueueMediaQueryChangeListeners(listeners_to_notify);
}
DEFINE_TRACE(MediaQueryMatcher) {
visitor->Trace(document_);
visitor->Trace(evaluator_);
visitor->Trace(media_lists_);
visitor->Trace(viewport_listeners_);
}
} // namespace blink
|
; A081009: a(n) = Fibonacci(4n+3) - 1, or Fibonacci(2n+2)*Lucas(2n+1).
; 1,12,88,609,4180,28656,196417,1346268,9227464,63245985,433494436,2971215072,20365011073,139583862444,956722026040,6557470319841,44945570212852,308061521170128,2111485077978049,14472334024676220,99194853094755496,679891637638612257,4660046610375530308,31940434634990099904,218922995834555169025,1500520536206896083276,10284720757613717413912,70492524767089125814113,483162952612010163284884,3311648143516982017180080,22698374052006863956975681,155576970220531065681649692,1066340417491710595814572168
mul $0,2
mov $1,1
mov $2,1
lpb $0
sub $0,1
add $2,1
add $2,$1
add $1,$2
lpe
mov $0,$1
|
; A010972: a(n) = binomial(n,19).
; 1,20,210,1540,8855,42504,177100,657800,2220075,6906900,20030010,54627300,141120525,347373600,818809200,1855967520,4059928950,8597496600,17672631900,35345263800,68923264410,131282408400,244662670200,446775310800,800472431850,1408831480056,2438362177020,4154246671960,6973199770790,11541847896480,18851684897584,30405943383200,48459472266975,76360380541900,119032357903550,183649923622620,280576272201225,424655979547800,636983969321700,947309492837400,1397281501935165,2044802197953900
add $0,19
bin $0,19
|
object_const_def ; object_event constants
const BURNEDTOWERB1F_BOULDER
const BURNEDTOWERB1F_RAIKOU1
const BURNEDTOWERB1F_ENTEI1
const BURNEDTOWERB1F_SUICUNE1
const BURNEDTOWERB1F_RAIKOU2
const BURNEDTOWERB1F_ENTEI2
const BURNEDTOWERB1F_SUICUNE2
const BURNEDTOWERB1F_POKE_BALL
const BURNEDTOWERB1F_EUSINE
BurnedTowerB1F_MapScripts:
db 2 ; scene scripts
scene_script .DummyScene0 ; SCENE_DEFAULT
scene_script .DummyScene1 ; SCENE_FINISHED
db 1 ; callbacks
callback MAPCALLBACK_TILES, .LadderCallback
.DummyScene0:
end
.DummyScene1:
end
.LadderCallback:
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .HideLadder
changeblock 6, 14, $02 ; floor
.HideLadder:
return
ReleaseTheBeasts:
playmusic MUSIC_NONE
pause 30
appear BURNEDTOWERB1F_RAIKOU1
turnobject PLAYER, UP
pause 5
disappear BURNEDTOWERB1F_RAIKOU2
pause 15
cry RAIKOU
appear BURNEDTOWERB1F_ENTEI1
turnobject PLAYER, UP
pause 5
disappear BURNEDTOWERB1F_ENTEI2
pause 15
cry ENTEI
appear BURNEDTOWERB1F_SUICUNE1
turnobject PLAYER, UP
pause 5
disappear BURNEDTOWERB1F_SUICUNE2
pause 15
cry SUICUNE
pause 15
playsound SFX_WARP_FROM
turnobject PLAYER, LEFT
applymovement BURNEDTOWERB1F_RAIKOU1, BurnedTowerRaikouMovement
disappear BURNEDTOWERB1F_RAIKOU1
waitsfx
playsound SFX_WARP_FROM
turnobject PLAYER, RIGHT
applymovement BURNEDTOWERB1F_ENTEI1, BurnedTowerEnteiMovement
disappear BURNEDTOWERB1F_ENTEI1
waitsfx
pause 15
playsound SFX_WARP_FROM
turnobject PLAYER, UP
applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement1
playsound SFX_WARP_FROM
turnobject PLAYER, DOWN
applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement2
turnobject PLAYER, UP
pause 20
cry SUICUNE
pause 30
playsound SFX_WARP_FROM
applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement3
turnobject PLAYER, DOWN
disappear BURNEDTOWERB1F_SUICUNE1
waitsfx
special RestartMapMusic
setscene SCENE_FINISHED
setevent EVENT_RELEASED_THE_BEASTS
special InitRoamMons
setmapscene ECRUTEAK_GYM, SCENE_FINISHED
setmapscene CIANWOOD_CITY, SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE
clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
setevent EVENT_ECRUTEAK_GYM_GRAMPS
clearevent EVENT_ECRUTEAK_CITY_GRAMPS
setevent EVENT_BURNED_TOWER_MORTY
setevent EVENT_BURNED_TOWER_1F_EUSINE
appear BURNEDTOWERB1F_EUSINE
refreshscreen
changeblock 6, 14, $1b ; ladder
reloadmappart
closetext
setscene SCENE_FINISHED
end
BurnedTowerB1FEusine:
faceplayer
opentext
writetext BurnedTowerB1FEusineText
waitbutton
closetext
readvar VAR_FACING
ifequal UP, .Movement2
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1
sjump .Finish
.Movement2:
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement2
.Finish:
disappear BURNEDTOWERB1F_EUSINE
playsound SFX_EXIT_BUILDING
waitsfx
end
BurnedTowerB1FTMEndure:
tmhmball TM_ENDURE
BurnedTowerB1FBoulder:
jumpstd strengthboulder
BurnedTowerRaikouMovement:
set_sliding
fast_jump_step DOWN
fast_jump_step LEFT
remove_sliding
step_end
BurnedTowerEnteiMovement:
set_sliding
fast_jump_step RIGHT
fast_jump_step DOWN
fast_jump_step RIGHT
remove_sliding
step_end
BurnedTowerSuicuneMovement1:
set_sliding
fast_jump_step RIGHT
fast_jump_step DOWN
fast_jump_step DOWN
fast_jump_step LEFT
remove_sliding
step_end
BurnedTowerSuicuneMovement2:
set_sliding
fast_jump_step LEFT
fast_jump_step UP
big_step UP
fast_jump_step RIGHT
remove_sliding
step_end
BurnedTowerUnusedMovement:
; unreferenced
set_sliding
big_step DOWN
remove_sliding
step_end
BurnedTowerSuicuneMovement3:
set_sliding
big_step UP
fast_jump_step RIGHT
fast_jump_step DOWN
fast_jump_step DOWN
fast_jump_step DOWN
fast_jump_step DOWN
remove_sliding
step_end
BurnedTowerB1FEusineMovement2:
step LEFT
step LEFT
step DOWN
step DOWN
step LEFT
step DOWN
step_end
BurnedTowerB1FEusineMovement1:
step DOWN
step LEFT
step LEFT
step LEFT
step DOWN
step DOWN
step_end
BurnedTowerB1FEusineText:
text "EUSINE: I dug a"
line "hole here, too…"
para "I was shocked!"
para "SUICUNE raced by"
line "like a blur, right"
para "in front of my"
line "eyes!"
para "For ten years I"
line "chased SUICUNE,"
para "and I finally got"
line "to see it."
para "I'm all choked up!"
para "<PLAYER>, I owe"
line "this all to you!"
para "Thank you!"
para "I heard that the"
line "legendary #MON"
para "of ECRUTEAK test"
line "chosen humans by"
para "allowing them to"
line "get close."
para "I'm going to track"
line "SUICUNE."
para "<PLAYER>, let's"
line "meet again!"
para "Farewell!"
done
BurnedTowerB1F_MapEvents:
db 0, 0 ; filler
db 6 ; warp events
warp_event 10, 9, BURNED_TOWER_1F, 3
warp_event 17, 7, BURNED_TOWER_1F, 7
warp_event 10, 8, BURNED_TOWER_1F, 9
warp_event 3, 13, BURNED_TOWER_1F, 10
warp_event 17, 14, BURNED_TOWER_1F, 12
warp_event 7, 15, BURNED_TOWER_1F, 14
db 1 ; coord events
coord_event 10, 6, SCENE_DEFAULT, ReleaseTheBeasts
db 0 ; bg events
db 9 ; object events
object_event 17, 8, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FBoulder, -1
object_event 7, 3, SPRITE_RAIKOU, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
object_event 12, 3, SPRITE_ENTEI, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
object_event 10, 4, SPRITE_SUICUNE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
object_event 7, 3, SPRITE_RAIKOU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
object_event 12, 3, SPRITE_ENTEI, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
object_event 10, 4, SPRITE_SUICUNE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
object_event 16, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_TMHMBALL, 0, BurnedTowerB1FTMEndure, EVENT_BURNED_TOWER_B1F_TM_ENDURE
object_event 10, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FEusine, EVENT_EUSINE_IN_BURNED_TOWER
|
.data
msg0: .asciiz "Input total no of points you want to compute in the graph -- "#asks for no of points on the graph
msg1: .asciiz "Input X - coordinate " #asks for x coordinate
msg2: .asciiz "Input Y - coordinate " #asks for y coordinate
msg3: .asciiz "Area= " # gives the final answer
msg4: .asciiz "Invalid Input\n" # inconsistent input data
msg5: .asciiz "\n" #new line
#f1-- area f2,f3,f4,f5--xy coordinates t0--iterator f6--x diff f7-mul of ys f8--y sums
#f9--half f10,f11 -squares f13-y mod sums
.text
.globl main
main:
li $v0, 4 # preparing for printing the msg0
la $a0, msg0 # loading message address in $a0
syscall # prints the msg0
li $v0, 5 # preparing to take input
syscall # takes input
move $s0, $v0 # stores the no of points in ($s0==no of points)
ble $s0, 1, invalidPoints #if ($s0<=1) then goes to invlaidPoints
li.s $f1, 0.0 # loads float ($f1==area) and initializes it to 0.0
li $v0, 4 # asking x coordinate
la $a0, msg1
syscall
li $v0, 6 #storing ($f2==x coordinate)
syscall
mov.s $f2, $f0
li $v0, 4 # asking y coordinate
la $a0, msg2
syscall
li $v0, 6 #storing ($f3==y coordinate)
syscall
mov.s $f3, $f0
add $t0, $t0, 1 #iterator variable ($t0==1) initialised
while:
li $v0, 4 # asking x coordinate
la $a0, msg1
syscall
li $v0, 6 #storing ($f4==x coordinate)
syscall
mov.s $f4, $f0
li $v0, 4 # asking y coordinate
la $a0, msg2
syscall
li $v0, 6 #storing ($f5==y coordinate)
syscall
mov.s $f5, $f0
li.s $f9, 0.50 #loaded half
sub.s $f6, $f4, $f2 #created ($f6) --- x coordinates differences
mul.s $f7, $f3, $f5 #created ($f7)
li.s $f15,0.00
c.lt.s $f7, $f15
bc1t oppSidePointsArea #check for opposite sides point
bc1f sameSidePointsArea
oppSidePointsArea:
mul.s $f10, $f3, $f3 #created ($f10)
mul.s $f11, $f5, $f5 #created ($f11)
add.s $f11, $f11, $f10
mul.s $f11, $f11, $f6
mul.s $f11, $f11, $f9
sub.s $f13, $f3, $f5 #created ($f13)
abs.s $f13, $f13
div.s $f11, $f11, $f13
add.s $f1, $f1, $f11
mov.s $f2, $f4 # updated $f2
mov.s $f3, $f5 # updated $f3
j comehere
sameSidePointsArea:
add.s $f8, $f3, $f5 #created ($f8)
mul.s $f8, $f8, $f6
mul.s $f8, $f8, $f9 # calculated temp area
abs.s $f8, $f8 # found absolute value of area
add.s $f1, $f1, $f8 # added partial area to original area
mov.s $f2, $f4 # updated $f2
mov.s $f3, $f5 # updated $f3
comehere:
addi $t0, $t0, 1
blt $t0, $s0, while
li $v0, 4 # preparing for printing the msg3
la $a0, msg3 # loading message address in $a0
syscall # prints the msg3
li $v0, 2
mov.s $f12, $f1
syscall
li $v0, 10
syscall
invalidPoints:
li $v0, 4 # preparing for printing the msg4
la $a0, msg4 # loading message address in $a0
syscall # prints the msg4
li $v0, 10
syscall #exits from process
|
dict:
%define link 1 ; indicates end of list
; we'll later check this when updating pointers
%macro start_def 3
%strlen namelen %3
global code_%2
def_%2: dq link
%assign link def_%2 - core
db %1
dd end_%2 - code_%2
dd code_%2 - def_%2
db namelen
name_%2:
db %3 ; name as ASCII
code_%2:
%endmacro
%macro end_def 1
end_%1: ret
%endmacro
|
#include "taichi/gui/gui.h"
#if defined(TI_GUI_X11)
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <cstdlib>
// Undo terrible unprefixed macros in X.h
#ifdef None
#undef None
#endif
#ifdef Success
#undef Success
#endif
TI_NAMESPACE_BEGIN
class CXImage {
public:
XImage *image;
std::vector<uint8> image_data;
void *fast_data{nullptr};
int width, height;
CXImage(Display *display, Visual *visual, int width, int height)
: width(width), height(height) {
image_data.resize(width * height * 4);
image = XCreateImage(display, visual, 24, ZPixmap, 0,
(char *)image_data.data(), width, height, 32, 0);
TI_ASSERT((void *)image->data == image_data.data());
}
CXImage(Display *display,
Visual *visual,
void *fast_data,
int width,
int height)
: width(width), height(height) {
image = XCreateImage(display, visual, 24, ZPixmap, 0, (char *)fast_data,
width, height, 32, 0);
TI_ASSERT((void *)image->data == fast_data);
}
void set_data(const Array2D<Vector4> &color) {
auto p = image_data.data();
for (int j = 0; j < height; j++) {
for (int i = 0; i < width; i++) {
auto c = color[i][height - j - 1];
*p++ = uint8(clamp(int(c[2] * 255.0_f), 0, 255));
*p++ = uint8(clamp(int(c[1] * 255.0_f), 0, 255));
*p++ = uint8(clamp(int(c[0] * 255.0_f), 0, 255));
*p++ = 0;
}
}
}
~CXImage() {
delete image; // image->data is automatically released in image_data
}
};
static std::string lookup_keysym(XEvent *ev) {
int key = XLookupKeysym(&ev->xkey, 0);
if (isascii(key))
return std::string(1, key);
else
return XKeysymToString(key);
}
static std::string lookup_button(XEvent *ev) {
switch (ev->xbutton.button) {
case 1:
return "LMB";
case 2:
return "MMB";
case 3:
return "RMB";
default:
return fmt::format("Button{}", ev->xbutton.button);
}
}
void GUI::process_event() {
while (XPending((Display *)display)) {
XEvent ev;
XNextEvent((Display *)display, &ev);
switch (ev.type) {
case Expose:
break;
case ClientMessage:
// https://stackoverflow.com/questions/10792361/how-do-i-gracefully-exit-an-x11-event-loop
if (ev.xclient.data.l[0] == *(Atom *)wmDeleteMessage.data()) {
send_window_close_message();
}
break;
case MotionNotify:
set_mouse_pos(ev.xbutton.x, height - ev.xbutton.y - 1);
mouse_event(MouseEvent{MouseEvent::Type::move, cursor_pos});
key_events.push_back(
KeyEvent{KeyEvent::Type::move, "Motion", cursor_pos});
break;
case ButtonPress:
set_mouse_pos(ev.xbutton.x, height - ev.xbutton.y - 1);
mouse_event(MouseEvent{MouseEvent::Type::press, cursor_pos});
switch (ev.xbutton.button) {
case 4: // wheel up
key_events.push_back(KeyEvent{KeyEvent::Type::move, "Wheel",
cursor_pos, Vector2i{0, +120}});
break;
case 5: // wheel down
key_events.push_back(KeyEvent{KeyEvent::Type::move, "Wheel",
cursor_pos, Vector2i{0, -120}});
break;
case 6: // wheel right
key_events.push_back(KeyEvent{KeyEvent::Type::move, "Wheel",
cursor_pos, Vector2i{+120, 0}});
break;
case 7: // wheel left
key_events.push_back(KeyEvent{KeyEvent::Type::move, "Wheel",
cursor_pos, Vector2i{-120, 0}});
break;
default: // normal mouse button
key_events.push_back(KeyEvent{KeyEvent::Type::press,
lookup_button(&ev), cursor_pos});
break;
}
break;
case ButtonRelease:
set_mouse_pos(ev.xbutton.x, height - ev.xbutton.y - 1);
mouse_event(MouseEvent{MouseEvent::Type::release, cursor_pos});
key_events.push_back(
KeyEvent{KeyEvent::Type::release, lookup_button(&ev), cursor_pos});
break;
case KeyPress:
key_pressed = true;
key_events.push_back(
KeyEvent{KeyEvent::Type::press, lookup_keysym(&ev), cursor_pos});
break;
case KeyRelease:
key_events.push_back(
KeyEvent{KeyEvent::Type::release, lookup_keysym(&ev), cursor_pos});
break;
}
}
}
void GUI::create_window() {
display = XOpenDisplay(nullptr);
TI_ASSERT_INFO(display,
"Taichi fails to create a window."
" This is probably due to the lack of an X11 GUI environment."
" Consider using the `ti.GUI(show_gui=False)` option, see"
" https://docs.taichi.graphics/lang/articles/gui_system");
visual = DefaultVisual(display, 0);
window =
XCreateSimpleWindow((Display *)display, RootWindow((Display *)display, 0),
0, 0, width, height, 1, 0, 0);
TI_ASSERT_INFO(window, "failed to create X window");
if (fullscreen) {
// https://stackoverflow.com/questions/9083273/x11-fullscreen-window-opengl
Atom atoms[2] = {
XInternAtom((Display *)display, "_NET_WM_STATE_FULLSCREEN", False), 0};
Atom wmstate = XInternAtom((Display *)display, "_NET_WM_STATE", False);
XChangeProperty((Display *)display, window, wmstate, XA_ATOM, 32,
PropModeReplace, (unsigned char *)atoms, 1);
}
XSelectInput((Display *)display, window,
ButtonPressMask | ExposureMask | KeyPressMask | KeyReleaseMask |
ButtonPress | ButtonReleaseMask | EnterWindowMask |
LeaveWindowMask | PointerMotionMask);
wmDeleteMessage = std::vector<char>(sizeof(Atom));
*(Atom *)wmDeleteMessage.data() =
XInternAtom((Display *)display, "WM_DELETE_WINDOW", False);
XSetWMProtocols((Display *)display, window, (Atom *)wmDeleteMessage.data(),
1);
XMapWindow((Display *)display, window);
if (!fast_gui)
img = new CXImage((Display *)display, (Visual *)visual, width, height);
else
img = new CXImage((Display *)display, (Visual *)visual, (void *)fast_buf,
width, height);
}
void GUI::redraw() {
if (!fast_gui)
img->set_data(buffer);
XPutImage((Display *)display, window, DefaultGC(display, 0), img->image, 0, 0,
0, 0, width, height);
}
void GUI::set_title(std::string title) {
XStoreName((Display *)display, window, title.c_str());
}
GUI::~GUI() {
if (show_gui) {
XCloseDisplay((Display *)display);
delete img;
}
}
TI_NAMESPACE_END
#endif
|
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0x7861626364656667", "0x4871727374757677"],
"XMM2": ["0x7861626364656667", "0x4871727374757677"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x7172737475767778
mov [rdx + 8 * 3], rax
movapd xmm0, [rdx]
movapd xmm1, [rdx + 16]
palignr xmm0, xmm1, 1
movapd xmm2, [rdx]
movapd xmm3, [rdx + 16]
db 0x48 ; Glues Rex.W to the start of the instruction
palignr xmm2, xmm3, 1
hlt
|
[CPU 486]
[BITS 32]
GLOBAL api_putstr0
section .text
api_putstr0: ; void api_putstr0(char *s)
PUSH EBX
MOV EDX, 2
MOV EBX, [ESP + 8] ; s
INT 0x40
POP EBX
RET |
; A269620: Number of length-4 0..n arrays with no repeated value differing from the previous repeated value by other than plus two, zero or minus 1.
; 15,78,249,612,1275,2370,4053,6504,9927,14550,20625,28428,38259,50442,65325,83280,104703,130014,159657,194100,233835,279378,331269,390072,456375,530790,613953,706524,809187,922650,1047645,1184928,1335279,1499502,1678425,1872900,2083803,2312034,2558517,2824200,3110055,3417078,3746289,4098732,4475475,4877610,5306253,5762544,6247647,6762750,7309065,7887828,8500299,9147762,9831525,10552920,11313303,12114054,12956577,13842300,14772675,15749178,16773309,17846592,18970575,20146830,21376953,22662564,24005307,25406850,26868885,28393128,29981319,31635222,33356625,35147340,37009203,38944074,40953837,43040400,45205695,47451678,49780329,52193652,54693675,57282450,59962053,62734584,65602167,68566950,71631105,74796828,78066339,81441882,84925725,88520160,92227503,96050094,99990297,104050500,108233115,112540578,116975349,121539912,126236775,131068470,136037553,141146604,146398227,151795050,157339725,163034928,168883359,174887742,181050825,187375380,193864203,200520114,207345957,214344600,221518935,228871878,236406369,244125372,252031875,260128890,268419453,276906624,285593487,294483150,303578745,312883428,322400379,332132802,342083925,352257000,362655303,373282134,384140817,395234700,406567155,418141578,429961389,442030032,454350975,466927710,479763753,492862644,506227947,519863250,533772165,547958328,562425399,577177062,592217025,607549020,623176803,639104154,655334877,671872800,688721775,705885678,723368409,741173892,759306075,777768930,796566453,815702664,835181607,855007350,875183985,895715628,916606419,937860522,959482125,981475440,1003844703,1026594174,1049728137,1073250900,1097166795,1121480178,1146195429,1171316952,1196849175,1222796550,1249163553,1275954684,1303174467,1330827450,1358918205,1387451328,1416431439,1445863182,1475751225,1506100260,1536915003,1568200194,1599960597,1632201000,1664926215,1698141078,1731850449,1766059212,1800772275,1835994570,1871731053,1907986704,1944766527,1982075550
mov $3,$0
add $0,2
mov $2,$0
lpb $0,1
lpb $0,1
sub $0,1
add $4,$2
lpe
mov $2,0
lpb $4,1
add $1,$2
add $2,2
sub $4,1
lpe
sub $1,2
lpe
lpb $3,1
add $1,3
sub $3,1
lpe
add $1,5
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Microsoft Research Singularity
;;;
;;; Copyright (c) Microsoft Corporation. All rights reserved.
;;;
;;; This file contains ARM-specific assembly code.
;;;
GBLL except_s
GET except.asm
END
|
#define NDEBUG
#define RAPIDJSON_HAS_STDSTRING 1
#include "rapidjson/reader.h"
#include "rapidjson/document.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/filereadstream.h"
#include "rapidjson/filewritestream.h"
#include "rapidjson/encodedstream.h"
#include "rapidjson/error/en.h"
#include <stdio.h>
#include <string>
#include <vector>
#include "common.h"
using namespace std;
/********************************************************************************************/
vector<string> vstring;
vector<string> vstring2;
static void
bench_vector_string_init(size_t n)
{
for(size_t i = 0; i < n; i++)
{
char buff[100];
snprintf(buff, sizeof(buff), "%zu", i);
std::string s(buff);
vstring.push_back(s);
}
}
static void
bench_vector_string_init_big(size_t n)
{
for(size_t i = 0; i < n; i++)
{
char buff[100];
snprintf(buff, sizeof(buff), "%zu%zu%zu%zu%zu%zu", i, i, i, i, i, i);
std::string s(buff);
vstring.push_back(s);
}
}
static void
bench_vector_string_json_run(size_t n)
{
if (vstring.size() != n) {
printf("Size are different!\n");
abort();
}
FILE *f = fopen("tmp-serial.json", "wt");
if (!f) abort();
{
// Prepare writer and output stream.
char writeBuffer[65536];
typedef rapidjson::AutoUTFOutputStream<unsigned, rapidjson::FileWriteStream> OutputStream;
rapidjson::FileWriteStream os(f, writeBuffer, sizeof(writeBuffer));
OutputStream eos(os, rapidjson::kUTF8, false);
rapidjson::PrettyWriter<OutputStream, rapidjson::UTF8<>, rapidjson::AutoUTF<unsigned> > writer(eos);
writer.StartArray();
for(size_t i = 0; i < n; i++){
writer.String(vstring[i]);
}
writer.EndArray();
}
fclose(f);
f = fopen("tmp-serial.json", "rt");
if (!f) abort();
{
char readBuffer[65536];
rapidjson::FileReadStream is(f, readBuffer, sizeof(readBuffer));
rapidjson::Document d;
d.ParseStream(is);
for(size_t i = 0; i < d.Size(); i++) {
rapidjson::Value& s = d[i];
vstring2.push_back(s.GetString());
}
}
fclose(f);
if (vstring2.size() != n) {
printf("Size are different!\n");
abort();
}
}
static void
bench_vector_string_clear(void)
{
if (vstring != vstring2) {
printf("Array are different!\n");
abort();
}
}
/********************************************************************************************/
vector<unsigned long> vulong;
vector<unsigned long> vulong2;
static void
bench_vector_ulong_init(size_t n)
{
for(size_t i = 0; i < n; i++)
{
vulong.push_back(i*i);
}
}
static void
bench_vector_ulong_json_run(size_t n)
{
if (vulong.size() != n) {
printf("Size are different!\n");
abort();
}
FILE *f = fopen("tmp-serial.json", "wt");
if (!f) abort();
{
// Prepare writer and output stream.
char writeBuffer[65536];
typedef rapidjson::AutoUTFOutputStream<unsigned, rapidjson::FileWriteStream> OutputStream;
rapidjson::FileWriteStream os(f, writeBuffer, sizeof(writeBuffer));
OutputStream eos(os, rapidjson::kUTF8, false);
rapidjson::PrettyWriter<OutputStream, rapidjson::UTF8<>, rapidjson::AutoUTF<unsigned> > writer(eos);
writer.StartArray();
for(size_t i = 0; i < n; i++){
writer.Int64(vulong[i]);
}
writer.EndArray();
}
fclose(f);
f = fopen("tmp-serial.json", "rt");
if (!f) abort();
{
char readBuffer[65536];
rapidjson::FileReadStream is(f, readBuffer, sizeof(readBuffer));
rapidjson::Document d;
d.ParseStream(is);
for(size_t i = 0; i < d.Size(); i++) {
rapidjson::Value& s = d[i];
vulong2.push_back(s.GetInt64());
}
}
fclose(f);
if (vulong2.size() != n) {
printf("Size are different!\n");
abort();
}
}
static void
bench_vector_ulong_clear(void)
{
if (vulong != vulong2) {
printf("Array are different!\n");
abort();
}
}
/********************************************************************************************/
const config_func_t table[] = {
{110, "serial-json STR", 10000000, bench_vector_string_init, bench_vector_string_json_run, bench_vector_string_clear},
{111, "serial-json STR.big", 10000000, bench_vector_string_init_big, bench_vector_string_json_run, bench_vector_string_clear},
{112, "serial-json INT", 10000000, bench_vector_ulong_init, bench_vector_ulong_json_run, bench_vector_ulong_clear}
};
int main(int argc, const char *argv[])
{
test("RAPIDJSON", numberof(table), table, argc, argv);
exit(0);
}
|
; void *p_forward_list_pop_back_fastcall(p_forward_list_t *list)
SECTION code_adt_p_forward_list
PUBLIC _p_forward_list_pop_back_fastcall
_p_forward_list_pop_back_fastcall:
INCLUDE "adt/p_forward_list/z80/asm_p_forward_list_pop_back.asm"
|
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rdi
push %rdx
// Store
lea addresses_UC+0x19f1a, %rdi
nop
nop
nop
nop
nop
add %r8, %r8
mov $0x5152535455565758, %rax
movq %rax, %xmm1
and $0xffffffffffffffc0, %rdi
movaps %xmm1, (%rdi)
and $10558, %r8
// Store
lea addresses_D+0x163be, %r8
nop
nop
xor %r9, %r9
movl $0x51525354, (%r8)
nop
nop
nop
nop
nop
dec %rdi
// Faulty Load
lea addresses_RW+0x191fe, %rdi
nop
nop
nop
nop
and $29420, %rax
mov (%rdi), %dx
lea oracles, %r10
and $0xff, %rdx
shlq $12, %rdx
mov (%r10,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'32': 488}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
; 8 x 8 to 16 bit multiplication
; In: B, C multiplicands
; Out: HL product
; Pollutes: AF, F', BC, DE
INCLUDE "config_rc2014_private.inc"
SECTION code_user
PUBLIC MUL8
MUL8:
ld l,c ; 4
ld c,__IO_LUT_OPERAND_LATCH ; 7 operand latch address
out (c),l ; 12 operand X from L
in l,(c) ; 12 result Z LSB to L
inc c ; 4 result MSB address
in h,(c) ; 12 result Z MSB to H
ret ; 10
|
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#if V8_TARGET_ARCH_IA32
#include "src/base/bits.h"
#include "src/base/division-by-constant.h"
#include "src/bootstrapper.h"
#include "src/codegen.h"
#include "src/debug/debug.h"
#include "src/ia32/frames-ia32.h"
#include "src/ia32/macro-assembler-ia32.h"
#include "src/runtime/runtime.h"
namespace v8 {
namespace internal {
// -------------------------------------------------------------------------
// MacroAssembler implementation.
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
CodeObjectRequired create_code_object)
: Assembler(arg_isolate, buffer, size),
generating_stub_(false),
has_frame_(false) {
if (create_code_object == CodeObjectRequired::kYes) {
code_object_ =
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
}
}
void MacroAssembler::Load(Register dst, const Operand& src, Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8()) {
movsx_b(dst, src);
} else if (r.IsUInteger8()) {
movzx_b(dst, src);
} else if (r.IsInteger16()) {
movsx_w(dst, src);
} else if (r.IsUInteger16()) {
movzx_w(dst, src);
} else {
mov(dst, src);
}
}
void MacroAssembler::Store(Register src, const Operand& dst, Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8() || r.IsUInteger8()) {
mov_b(dst, src);
} else if (r.IsInteger16() || r.IsUInteger16()) {
mov_w(dst, src);
} else {
if (r.IsHeapObject()) {
AssertNotSmi(src);
} else if (r.IsSmi()) {
AssertSmi(src);
}
mov(dst, src);
}
}
void MacroAssembler::LoadRoot(Register destination, Heap::RootListIndex index) {
if (isolate()->heap()->RootCanBeTreatedAsConstant(index)) {
mov(destination, isolate()->heap()->root_handle(index));
return;
}
ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate());
mov(destination, Immediate(index));
mov(destination, Operand::StaticArray(destination,
times_pointer_size,
roots_array_start));
}
void MacroAssembler::StoreRoot(Register source,
Register scratch,
Heap::RootListIndex index) {
DCHECK(Heap::RootCanBeWrittenAfterInitialization(index));
ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate());
mov(scratch, Immediate(index));
mov(Operand::StaticArray(scratch, times_pointer_size, roots_array_start),
source);
}
void MacroAssembler::CompareRoot(Register with,
Register scratch,
Heap::RootListIndex index) {
ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate());
mov(scratch, Immediate(index));
cmp(with, Operand::StaticArray(scratch,
times_pointer_size,
roots_array_start));
}
void MacroAssembler::CompareRoot(Register with, Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
cmp(with, isolate()->heap()->root_handle(index));
}
void MacroAssembler::CompareRoot(const Operand& with,
Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
cmp(with, isolate()->heap()->root_handle(index));
}
void MacroAssembler::PushRoot(Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
Push(isolate()->heap()->root_handle(index));
}
#define REG(Name) \
{ Register::kCode_##Name }
static const Register saved_regs[] = {REG(eax), REG(ecx), REG(edx)};
#undef REG
static const int kNumberOfSavedRegs = sizeof(saved_regs) / sizeof(Register);
void MacroAssembler::PushCallerSaved(SaveFPRegsMode fp_mode,
Register exclusion1, Register exclusion2,
Register exclusion3) {
// We don't allow a GC during a store buffer overflow so there is no need to
// store the registers in any particular way, but we do have to store and
// restore them.
for (int i = 0; i < kNumberOfSavedRegs; i++) {
Register reg = saved_regs[i];
if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) {
push(reg);
}
}
if (fp_mode == kSaveFPRegs) {
sub(esp, Immediate(kDoubleSize * (XMMRegister::kMaxNumRegisters - 1)));
// Save all XMM registers except XMM0.
for (int i = XMMRegister::kMaxNumRegisters - 1; i > 0; i--) {
XMMRegister reg = XMMRegister::from_code(i);
movsd(Operand(esp, (i - 1) * kDoubleSize), reg);
}
}
}
void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1,
Register exclusion2, Register exclusion3) {
if (fp_mode == kSaveFPRegs) {
// Restore all XMM registers except XMM0.
for (int i = XMMRegister::kMaxNumRegisters - 1; i > 0; i--) {
XMMRegister reg = XMMRegister::from_code(i);
movsd(reg, Operand(esp, (i - 1) * kDoubleSize));
}
add(esp, Immediate(kDoubleSize * (XMMRegister::kMaxNumRegisters - 1)));
}
for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) {
Register reg = saved_regs[i];
if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) {
pop(reg);
}
}
}
void MacroAssembler::InNewSpace(Register object, Register scratch, Condition cc,
Label* condition_met,
Label::Distance distance) {
const int mask =
(1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE);
CheckPageFlag(object, scratch, mask, cc, condition_met, distance);
}
void MacroAssembler::RememberedSetHelper(
Register object, // Only used for debug checks.
Register addr,
Register scratch,
SaveFPRegsMode save_fp,
MacroAssembler::RememberedSetFinalAction and_then) {
Label done;
if (emit_debug_code()) {
Label ok;
JumpIfNotInNewSpace(object, scratch, &ok, Label::kNear);
int3();
bind(&ok);
}
// Load store buffer top.
ExternalReference store_buffer =
ExternalReference::store_buffer_top(isolate());
mov(scratch, Operand::StaticVariable(store_buffer));
// Store pointer to buffer.
mov(Operand(scratch, 0), addr);
// Increment buffer top.
add(scratch, Immediate(kPointerSize));
// Write back new top of buffer.
mov(Operand::StaticVariable(store_buffer), scratch);
// Call stub on end of buffer.
// Check for end of buffer.
test(scratch, Immediate(StoreBuffer::kStoreBufferMask));
if (and_then == kReturnAtEnd) {
Label buffer_overflowed;
j(equal, &buffer_overflowed, Label::kNear);
ret(0);
bind(&buffer_overflowed);
} else {
DCHECK(and_then == kFallThroughAtEnd);
j(not_equal, &done, Label::kNear);
}
StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp);
CallStub(&store_buffer_overflow);
if (and_then == kReturnAtEnd) {
ret(0);
} else {
DCHECK(and_then == kFallThroughAtEnd);
bind(&done);
}
}
void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg,
XMMRegister scratch_reg,
Register result_reg) {
Label done;
Label conv_failure;
xorps(scratch_reg, scratch_reg);
cvtsd2si(result_reg, input_reg);
test(result_reg, Immediate(0xFFFFFF00));
j(zero, &done, Label::kNear);
cmp(result_reg, Immediate(0x1));
j(overflow, &conv_failure, Label::kNear);
mov(result_reg, Immediate(0));
setcc(sign, result_reg);
sub(result_reg, Immediate(1));
and_(result_reg, Immediate(255));
jmp(&done, Label::kNear);
bind(&conv_failure);
Move(result_reg, Immediate(0));
ucomisd(input_reg, scratch_reg);
j(below, &done, Label::kNear);
Move(result_reg, Immediate(255));
bind(&done);
}
void MacroAssembler::ClampUint8(Register reg) {
Label done;
test(reg, Immediate(0xFFFFFF00));
j(zero, &done, Label::kNear);
setcc(negative, reg); // 1 if negative, 0 if positive.
dec_b(reg); // 0 if negative, 255 if positive.
bind(&done);
}
void MacroAssembler::SlowTruncateToI(Register result_reg,
Register input_reg,
int offset) {
DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true);
call(stub.GetCode(), RelocInfo::CODE_TARGET);
}
void MacroAssembler::TruncateDoubleToI(Register result_reg,
XMMRegister input_reg) {
Label done;
cvttsd2si(result_reg, Operand(input_reg));
cmp(result_reg, 0x1);
j(no_overflow, &done, Label::kNear);
sub(esp, Immediate(kDoubleSize));
movsd(MemOperand(esp, 0), input_reg);
SlowTruncateToI(result_reg, esp, 0);
add(esp, Immediate(kDoubleSize));
bind(&done);
}
void MacroAssembler::DoubleToI(Register result_reg, XMMRegister input_reg,
XMMRegister scratch,
MinusZeroMode minus_zero_mode,
Label* lost_precision, Label* is_nan,
Label* minus_zero, Label::Distance dst) {
DCHECK(!input_reg.is(scratch));
cvttsd2si(result_reg, Operand(input_reg));
Cvtsi2sd(scratch, Operand(result_reg));
ucomisd(scratch, input_reg);
j(not_equal, lost_precision, dst);
j(parity_even, is_nan, dst);
if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
Label done;
// The integer converted back is equal to the original. We
// only have to test if we got -0 as an input.
test(result_reg, Operand(result_reg));
j(not_zero, &done, Label::kNear);
movmskpd(result_reg, input_reg);
// Bit 0 contains the sign of the double in input_reg.
// If input was positive, we are ok and return 0, otherwise
// jump to minus_zero.
and_(result_reg, 1);
j(not_zero, minus_zero, dst);
bind(&done);
}
}
void MacroAssembler::TruncateHeapNumberToI(Register result_reg,
Register input_reg) {
Label done, slow_case;
if (CpuFeatures::IsSupported(SSE3)) {
CpuFeatureScope scope(this, SSE3);
Label convert;
// Use more powerful conversion when sse3 is available.
// Load x87 register with heap number.
fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset));
// Get exponent alone and check for too-big exponent.
mov(result_reg, FieldOperand(input_reg, HeapNumber::kExponentOffset));
and_(result_reg, HeapNumber::kExponentMask);
const uint32_t kTooBigExponent =
(HeapNumber::kExponentBias + 63) << HeapNumber::kExponentShift;
cmp(Operand(result_reg), Immediate(kTooBigExponent));
j(greater_equal, &slow_case, Label::kNear);
// Reserve space for 64 bit answer.
sub(Operand(esp), Immediate(kDoubleSize));
// Do conversion, which cannot fail because we checked the exponent.
fisttp_d(Operand(esp, 0));
mov(result_reg, Operand(esp, 0)); // Low word of answer is the result.
add(Operand(esp), Immediate(kDoubleSize));
jmp(&done, Label::kNear);
// Slow case.
bind(&slow_case);
if (input_reg.is(result_reg)) {
// Input is clobbered. Restore number from fpu stack
sub(Operand(esp), Immediate(kDoubleSize));
fstp_d(Operand(esp, 0));
SlowTruncateToI(result_reg, esp, 0);
add(esp, Immediate(kDoubleSize));
} else {
fstp(0);
SlowTruncateToI(result_reg, input_reg);
}
} else {
movsd(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset));
cvttsd2si(result_reg, Operand(xmm0));
cmp(result_reg, 0x1);
j(no_overflow, &done, Label::kNear);
// Check if the input was 0x8000000 (kMinInt).
// If no, then we got an overflow and we deoptimize.
ExternalReference min_int = ExternalReference::address_of_min_int();
ucomisd(xmm0, Operand::StaticVariable(min_int));
j(not_equal, &slow_case, Label::kNear);
j(parity_even, &slow_case, Label::kNear); // NaN.
jmp(&done, Label::kNear);
// Slow case.
bind(&slow_case);
if (input_reg.is(result_reg)) {
// Input is clobbered. Restore number from double scratch.
sub(esp, Immediate(kDoubleSize));
movsd(MemOperand(esp, 0), xmm0);
SlowTruncateToI(result_reg, esp, 0);
add(esp, Immediate(kDoubleSize));
} else {
SlowTruncateToI(result_reg, input_reg);
}
}
bind(&done);
}
void MacroAssembler::LoadUint32(XMMRegister dst, const Operand& src) {
Label done;
cmp(src, Immediate(0));
ExternalReference uint32_bias = ExternalReference::address_of_uint32_bias();
Cvtsi2sd(dst, src);
j(not_sign, &done, Label::kNear);
addsd(dst, Operand::StaticVariable(uint32_bias));
bind(&done);
}
void MacroAssembler::RecordWriteArray(
Register object,
Register value,
Register index,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check,
PointersToHereCheck pointers_to_here_check_for_value) {
// First, check if a write barrier is even needed. The tests below
// catch stores of Smis.
Label done;
// Skip barrier if writing a smi.
if (smi_check == INLINE_SMI_CHECK) {
DCHECK_EQ(0, kSmiTag);
test(value, Immediate(kSmiTagMask));
j(zero, &done);
}
// Array access: calculate the destination address in the same manner as
// KeyedStoreIC::GenerateGeneric. Multiply a smi by 2 to get an offset
// into an array of words.
Register dst = index;
lea(dst, Operand(object, index, times_half_pointer_size,
FixedArray::kHeaderSize - kHeapObjectTag));
RecordWrite(object, dst, value, save_fp, remembered_set_action,
OMIT_SMI_CHECK, pointers_to_here_check_for_value);
bind(&done);
// Clobber clobbered input registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
mov(value, Immediate(bit_cast<int32_t>(kZapValue)));
mov(index, Immediate(bit_cast<int32_t>(kZapValue)));
}
}
void MacroAssembler::RecordWriteField(
Register object,
int offset,
Register value,
Register dst,
SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action,
SmiCheck smi_check,
PointersToHereCheck pointers_to_here_check_for_value) {
// First, check if a write barrier is even needed. The tests below
// catch stores of Smis.
Label done;
// Skip barrier if writing a smi.
if (smi_check == INLINE_SMI_CHECK) {
JumpIfSmi(value, &done, Label::kNear);
}
// Although the object register is tagged, the offset is relative to the start
// of the object, so so offset must be a multiple of kPointerSize.
DCHECK(IsAligned(offset, kPointerSize));
lea(dst, FieldOperand(object, offset));
if (emit_debug_code()) {
Label ok;
test_b(dst, Immediate((1 << kPointerSizeLog2) - 1));
j(zero, &ok, Label::kNear);
int3();
bind(&ok);
}
RecordWrite(object, dst, value, save_fp, remembered_set_action,
OMIT_SMI_CHECK, pointers_to_here_check_for_value);
bind(&done);
// Clobber clobbered input registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
mov(value, Immediate(bit_cast<int32_t>(kZapValue)));
mov(dst, Immediate(bit_cast<int32_t>(kZapValue)));
}
}
void MacroAssembler::RecordWriteForMap(
Register object,
Handle<Map> map,
Register scratch1,
Register scratch2,
SaveFPRegsMode save_fp) {
Label done;
Register address = scratch1;
Register value = scratch2;
if (emit_debug_code()) {
Label ok;
lea(address, FieldOperand(object, HeapObject::kMapOffset));
test_b(address, Immediate((1 << kPointerSizeLog2) - 1));
j(zero, &ok, Label::kNear);
int3();
bind(&ok);
}
DCHECK(!object.is(value));
DCHECK(!object.is(address));
DCHECK(!value.is(address));
AssertNotSmi(object);
if (!FLAG_incremental_marking) {
return;
}
// Compute the address.
lea(address, FieldOperand(object, HeapObject::kMapOffset));
// A single check of the map's pages interesting flag suffices, since it is
// only set during incremental collection, and then it's also guaranteed that
// the from object's page's interesting flag is also set. This optimization
// relies on the fact that maps can never be in new space.
DCHECK(!isolate()->heap()->InNewSpace(*map));
CheckPageFlagForMap(map,
MemoryChunk::kPointersToHereAreInterestingMask,
zero,
&done,
Label::kNear);
RecordWriteStub stub(isolate(), object, value, address, OMIT_REMEMBERED_SET,
save_fp);
CallStub(&stub);
bind(&done);
// Count number of write barriers in generated code.
isolate()->counters()->write_barriers_static()->Increment();
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
// Clobber clobbered input registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
mov(value, Immediate(bit_cast<int32_t>(kZapValue)));
mov(scratch1, Immediate(bit_cast<int32_t>(kZapValue)));
mov(scratch2, Immediate(bit_cast<int32_t>(kZapValue)));
}
}
void MacroAssembler::RecordWrite(
Register object,
Register address,
Register value,
SaveFPRegsMode fp_mode,
RememberedSetAction remembered_set_action,
SmiCheck smi_check,
PointersToHereCheck pointers_to_here_check_for_value) {
DCHECK(!object.is(value));
DCHECK(!object.is(address));
DCHECK(!value.is(address));
AssertNotSmi(object);
if (remembered_set_action == OMIT_REMEMBERED_SET &&
!FLAG_incremental_marking) {
return;
}
if (emit_debug_code()) {
Label ok;
cmp(value, Operand(address, 0));
j(equal, &ok, Label::kNear);
int3();
bind(&ok);
}
// First, check if a write barrier is even needed. The tests below
// catch stores of Smis and stores into young gen.
Label done;
if (smi_check == INLINE_SMI_CHECK) {
// Skip barrier if writing a smi.
JumpIfSmi(value, &done, Label::kNear);
}
if (pointers_to_here_check_for_value != kPointersToHereAreAlwaysInteresting) {
CheckPageFlag(value,
value, // Used as scratch.
MemoryChunk::kPointersToHereAreInterestingMask,
zero,
&done,
Label::kNear);
}
CheckPageFlag(object,
value, // Used as scratch.
MemoryChunk::kPointersFromHereAreInterestingMask,
zero,
&done,
Label::kNear);
RecordWriteStub stub(isolate(), object, value, address, remembered_set_action,
fp_mode);
CallStub(&stub);
bind(&done);
// Count number of write barriers in generated code.
isolate()->counters()->write_barriers_static()->Increment();
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
// Clobber clobbered registers when running with the debug-code flag
// turned on to provoke errors.
if (emit_debug_code()) {
mov(address, Immediate(bit_cast<int32_t>(kZapValue)));
mov(value, Immediate(bit_cast<int32_t>(kZapValue)));
}
}
void MacroAssembler::RecordWriteCodeEntryField(Register js_function,
Register code_entry,
Register scratch) {
const int offset = JSFunction::kCodeEntryOffset;
// Since a code entry (value) is always in old space, we don't need to update
// remembered set. If incremental marking is off, there is nothing for us to
// do.
if (!FLAG_incremental_marking) return;
DCHECK(!js_function.is(code_entry));
DCHECK(!js_function.is(scratch));
DCHECK(!code_entry.is(scratch));
AssertNotSmi(js_function);
if (emit_debug_code()) {
Label ok;
lea(scratch, FieldOperand(js_function, offset));
cmp(code_entry, Operand(scratch, 0));
j(equal, &ok, Label::kNear);
int3();
bind(&ok);
}
// First, check if a write barrier is even needed. The tests below
// catch stores of Smis and stores into young gen.
Label done;
CheckPageFlag(code_entry, scratch,
MemoryChunk::kPointersToHereAreInterestingMask, zero, &done,
Label::kNear);
CheckPageFlag(js_function, scratch,
MemoryChunk::kPointersFromHereAreInterestingMask, zero, &done,
Label::kNear);
// Save input registers.
push(js_function);
push(code_entry);
const Register dst = scratch;
lea(dst, FieldOperand(js_function, offset));
// Save caller-saved registers.
PushCallerSaved(kDontSaveFPRegs, js_function, code_entry);
int argument_count = 3;
PrepareCallCFunction(argument_count, code_entry);
mov(Operand(esp, 0 * kPointerSize), js_function);
mov(Operand(esp, 1 * kPointerSize), dst); // Slot.
mov(Operand(esp, 2 * kPointerSize),
Immediate(ExternalReference::isolate_address(isolate())));
{
AllowExternalCallThatCantCauseGC scope(this);
CallCFunction(
ExternalReference::incremental_marking_record_write_code_entry_function(
isolate()),
argument_count);
}
// Restore caller-saved registers.
PopCallerSaved(kDontSaveFPRegs, js_function, code_entry);
// Restore input registers.
pop(code_entry);
pop(js_function);
bind(&done);
}
void MacroAssembler::DebugBreak() {
Move(eax, Immediate(0));
mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement,
isolate())));
CEntryStub ces(isolate(), 1);
call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT);
}
void MacroAssembler::Cvtsi2sd(XMMRegister dst, const Operand& src) {
xorps(dst, dst);
cvtsi2sd(dst, src);
}
void MacroAssembler::Cvtui2ss(XMMRegister dst, Register src, Register tmp) {
Label msb_set_src;
Label jmp_return;
test(src, src);
j(sign, &msb_set_src, Label::kNear);
cvtsi2ss(dst, src);
jmp(&jmp_return, Label::kNear);
bind(&msb_set_src);
mov(tmp, src);
shr(src, 1);
// Recover the least significant bit to avoid rounding errors.
and_(tmp, Immediate(1));
or_(src, tmp);
cvtsi2ss(dst, src);
addss(dst, dst);
bind(&jmp_return);
}
void MacroAssembler::ShlPair(Register high, Register low, uint8_t shift) {
if (shift >= 32) {
mov(high, low);
shl(high, shift - 32);
xor_(low, low);
} else {
shld(high, low, shift);
shl(low, shift);
}
}
void MacroAssembler::ShlPair_cl(Register high, Register low) {
shld_cl(high, low);
shl_cl(low);
Label done;
test(ecx, Immediate(0x20));
j(equal, &done, Label::kNear);
mov(high, low);
xor_(low, low);
bind(&done);
}
void MacroAssembler::ShrPair(Register high, Register low, uint8_t shift) {
if (shift >= 32) {
mov(low, high);
shr(low, shift - 32);
xor_(high, high);
} else {
shrd(high, low, shift);
shr(high, shift);
}
}
void MacroAssembler::ShrPair_cl(Register high, Register low) {
shrd_cl(low, high);
shr_cl(high);
Label done;
test(ecx, Immediate(0x20));
j(equal, &done, Label::kNear);
mov(low, high);
xor_(high, high);
bind(&done);
}
void MacroAssembler::SarPair(Register high, Register low, uint8_t shift) {
if (shift >= 32) {
mov(low, high);
sar(low, shift - 32);
sar(high, 31);
} else {
shrd(high, low, shift);
sar(high, shift);
}
}
void MacroAssembler::SarPair_cl(Register high, Register low) {
shrd_cl(low, high);
sar_cl(high);
Label done;
test(ecx, Immediate(0x20));
j(equal, &done, Label::kNear);
mov(low, high);
sar(high, 31);
bind(&done);
}
bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) {
static const int kMaxImmediateBits = 17;
if (!RelocInfo::IsNone(x.rmode_)) return false;
return !is_intn(x.x_, kMaxImmediateBits);
}
void MacroAssembler::SafeMove(Register dst, const Immediate& x) {
if (IsUnsafeImmediate(x) && jit_cookie() != 0) {
Move(dst, Immediate(x.x_ ^ jit_cookie()));
xor_(dst, jit_cookie());
} else {
Move(dst, x);
}
}
void MacroAssembler::SafePush(const Immediate& x) {
if (IsUnsafeImmediate(x) && jit_cookie() != 0) {
push(Immediate(x.x_ ^ jit_cookie()));
xor_(Operand(esp, 0), Immediate(jit_cookie()));
} else {
push(x);
}
}
void MacroAssembler::CmpObjectType(Register heap_object,
InstanceType type,
Register map) {
mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
CmpInstanceType(map, type);
}
void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
cmpb(FieldOperand(map, Map::kInstanceTypeOffset), Immediate(type));
}
void MacroAssembler::CheckFastElements(Register map,
Label* fail,
Label::Distance distance) {
STATIC_ASSERT(FAST_SMI_ELEMENTS == 0);
STATIC_ASSERT(FAST_HOLEY_SMI_ELEMENTS == 1);
STATIC_ASSERT(FAST_ELEMENTS == 2);
STATIC_ASSERT(FAST_HOLEY_ELEMENTS == 3);
cmpb(FieldOperand(map, Map::kBitField2Offset),
Immediate(Map::kMaximumBitField2FastHoleyElementValue));
j(above, fail, distance);
}
void MacroAssembler::CheckFastObjectElements(Register map,
Label* fail,
Label::Distance distance) {
STATIC_ASSERT(FAST_SMI_ELEMENTS == 0);
STATIC_ASSERT(FAST_HOLEY_SMI_ELEMENTS == 1);
STATIC_ASSERT(FAST_ELEMENTS == 2);
STATIC_ASSERT(FAST_HOLEY_ELEMENTS == 3);
cmpb(FieldOperand(map, Map::kBitField2Offset),
Immediate(Map::kMaximumBitField2FastHoleySmiElementValue));
j(below_equal, fail, distance);
cmpb(FieldOperand(map, Map::kBitField2Offset),
Immediate(Map::kMaximumBitField2FastHoleyElementValue));
j(above, fail, distance);
}
void MacroAssembler::CheckFastSmiElements(Register map,
Label* fail,
Label::Distance distance) {
STATIC_ASSERT(FAST_SMI_ELEMENTS == 0);
STATIC_ASSERT(FAST_HOLEY_SMI_ELEMENTS == 1);
cmpb(FieldOperand(map, Map::kBitField2Offset),
Immediate(Map::kMaximumBitField2FastHoleySmiElementValue));
j(above, fail, distance);
}
void MacroAssembler::StoreNumberToDoubleElements(
Register maybe_number,
Register elements,
Register key,
Register scratch1,
XMMRegister scratch2,
Label* fail,
int elements_offset) {
Label smi_value, done;
JumpIfSmi(maybe_number, &smi_value, Label::kNear);
CheckMap(maybe_number,
isolate()->factory()->heap_number_map(),
fail,
DONT_DO_SMI_CHECK);
// Double value, turn potential sNaN into qNaN.
Move(scratch2, 1.0);
mulsd(scratch2, FieldOperand(maybe_number, HeapNumber::kValueOffset));
jmp(&done, Label::kNear);
bind(&smi_value);
// Value is a smi. Convert to a double and store.
// Preserve original value.
mov(scratch1, maybe_number);
SmiUntag(scratch1);
Cvtsi2sd(scratch2, scratch1);
bind(&done);
movsd(FieldOperand(elements, key, times_4,
FixedDoubleArray::kHeaderSize - elements_offset),
scratch2);
}
void MacroAssembler::CompareMap(Register obj, Handle<Map> map) {
cmp(FieldOperand(obj, HeapObject::kMapOffset), map);
}
void MacroAssembler::CheckMap(Register obj,
Handle<Map> map,
Label* fail,
SmiCheckType smi_check_type) {
if (smi_check_type == DO_SMI_CHECK) {
JumpIfSmi(obj, fail);
}
CompareMap(obj, map);
j(not_equal, fail);
}
void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1,
Register scratch2, Handle<WeakCell> cell,
Handle<Code> success,
SmiCheckType smi_check_type) {
Label fail;
if (smi_check_type == DO_SMI_CHECK) {
JumpIfSmi(obj, &fail);
}
mov(scratch1, FieldOperand(obj, HeapObject::kMapOffset));
CmpWeakValue(scratch1, cell, scratch2);
j(equal, success);
bind(&fail);
}
Condition MacroAssembler::IsObjectStringType(Register heap_object,
Register map,
Register instance_type) {
mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
STATIC_ASSERT(kNotStringTag != 0);
test(instance_type, Immediate(kIsNotStringMask));
return zero;
}
Condition MacroAssembler::IsObjectNameType(Register heap_object,
Register map,
Register instance_type) {
mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
movzx_b(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
cmpb(instance_type, Immediate(LAST_NAME_TYPE));
return below_equal;
}
void MacroAssembler::FCmp() {
fucomip();
fstp(0);
}
void MacroAssembler::AssertNumber(Register object) {
if (emit_debug_code()) {
Label ok;
JumpIfSmi(object, &ok);
cmp(FieldOperand(object, HeapObject::kMapOffset),
isolate()->factory()->heap_number_map());
Check(equal, kOperandNotANumber);
bind(&ok);
}
}
void MacroAssembler::AssertNotNumber(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsANumber);
cmp(FieldOperand(object, HeapObject::kMapOffset),
isolate()->factory()->heap_number_map());
Check(not_equal, kOperandIsANumber);
}
}
void MacroAssembler::AssertSmi(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(equal, kOperandIsNotASmi);
}
}
void MacroAssembler::AssertString(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotAString);
push(object);
mov(object, FieldOperand(object, HeapObject::kMapOffset));
CmpInstanceType(object, FIRST_NONSTRING_TYPE);
pop(object);
Check(below, kOperandIsNotAString);
}
}
void MacroAssembler::AssertName(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotAName);
push(object);
mov(object, FieldOperand(object, HeapObject::kMapOffset));
CmpInstanceType(object, LAST_NAME_TYPE);
pop(object);
Check(below_equal, kOperandIsNotAName);
}
}
void MacroAssembler::AssertFunction(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotAFunction);
Push(object);
CmpObjectType(object, JS_FUNCTION_TYPE, object);
Pop(object);
Check(equal, kOperandIsNotAFunction);
}
}
void MacroAssembler::AssertBoundFunction(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotABoundFunction);
Push(object);
CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object);
Pop(object);
Check(equal, kOperandIsNotABoundFunction);
}
}
void MacroAssembler::AssertGeneratorObject(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotAGeneratorObject);
Push(object);
CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object);
Pop(object);
Check(equal, kOperandIsNotAGeneratorObject);
}
}
void MacroAssembler::AssertReceiver(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmiAndNotAReceiver);
Push(object);
STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object);
Pop(object);
Check(above_equal, kOperandIsNotAReceiver);
}
}
void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) {
if (emit_debug_code()) {
Label done_checking;
AssertNotSmi(object);
cmp(object, isolate()->factory()->undefined_value());
j(equal, &done_checking);
cmp(FieldOperand(object, 0),
Immediate(isolate()->factory()->allocation_site_map()));
Assert(equal, kExpectedUndefinedOrCell);
bind(&done_checking);
}
}
void MacroAssembler::AssertNotSmi(Register object) {
if (emit_debug_code()) {
test(object, Immediate(kSmiTagMask));
Check(not_equal, kOperandIsASmi);
}
}
void MacroAssembler::StubPrologue(StackFrame::Type type) {
push(ebp); // Caller's frame pointer.
mov(ebp, esp);
push(Immediate(Smi::FromInt(type)));
}
void MacroAssembler::Prologue(bool code_pre_aging) {
PredictableCodeSizeScope predictible_code_size_scope(this,
kNoCodeAgeSequenceLength);
if (code_pre_aging) {
// Pre-age the code.
call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
RelocInfo::CODE_AGE_SEQUENCE);
Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength);
} else {
push(ebp); // Caller's frame pointer.
mov(ebp, esp);
push(esi); // Callee's context.
push(edi); // Callee's JS function.
}
}
void MacroAssembler::EmitLoadTypeFeedbackVector(Register vector) {
mov(vector, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
mov(vector, FieldOperand(vector, JSFunction::kSharedFunctionInfoOffset));
mov(vector, FieldOperand(vector, SharedFunctionInfo::kFeedbackVectorOffset));
}
void MacroAssembler::EnterFrame(StackFrame::Type type,
bool load_constant_pool_pointer_reg) {
// Out-of-line constant pool not implemented on ia32.
UNREACHABLE();
}
void MacroAssembler::EnterFrame(StackFrame::Type type) {
push(ebp);
mov(ebp, esp);
push(Immediate(Smi::FromInt(type)));
if (type == StackFrame::INTERNAL) {
push(Immediate(CodeObject()));
}
if (emit_debug_code()) {
cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value()));
Check(not_equal, kCodeObjectNotProperlyPatched);
}
}
void MacroAssembler::LeaveFrame(StackFrame::Type type) {
if (emit_debug_code()) {
cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset),
Immediate(Smi::FromInt(type)));
Check(equal, kStackFrameTypesMustMatch);
}
leave();
}
void MacroAssembler::EnterExitFramePrologue() {
// Set up the frame structure on the stack.
DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement);
DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset);
DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset);
push(ebp);
mov(ebp, esp);
// Reserve room for entry stack pointer and push the code object.
push(Immediate(Smi::FromInt(StackFrame::EXIT)));
DCHECK_EQ(-2 * kPointerSize, ExitFrameConstants::kSPOffset);
push(Immediate(0)); // Saved entry sp, patched before call.
DCHECK_EQ(-3 * kPointerSize, ExitFrameConstants::kCodeOffset);
push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot.
// Save the frame pointer and the context in top.
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
ExternalReference context_address(Isolate::kContextAddress, isolate());
ExternalReference c_function_address(Isolate::kCFunctionAddress, isolate());
mov(Operand::StaticVariable(c_entry_fp_address), ebp);
mov(Operand::StaticVariable(context_address), esi);
mov(Operand::StaticVariable(c_function_address), ebx);
}
void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) {
// Optionally save all XMM registers.
if (save_doubles) {
int space = XMMRegister::kMaxNumRegisters * kDoubleSize +
argc * kPointerSize;
sub(esp, Immediate(space));
const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp;
for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
XMMRegister reg = XMMRegister::from_code(i);
movsd(Operand(ebp, offset - ((i + 1) * kDoubleSize)), reg);
}
} else {
sub(esp, Immediate(argc * kPointerSize));
}
// Get the required frame alignment for the OS.
const int kFrameAlignment = base::OS::ActivationFrameAlignment();
if (kFrameAlignment > 0) {
DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment));
and_(esp, -kFrameAlignment);
}
// Patch the saved entry sp.
mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp);
}
void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) {
EnterExitFramePrologue();
// Set up argc and argv in callee-saved registers.
int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize;
mov(edi, eax);
lea(esi, Operand(ebp, eax, times_4, offset));
// Reserve space for argc, argv and isolate.
EnterExitFrameEpilogue(argc, save_doubles);
}
void MacroAssembler::EnterApiExitFrame(int argc) {
EnterExitFramePrologue();
EnterExitFrameEpilogue(argc, false);
}
void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) {
// Optionally restore all XMM registers.
if (save_doubles) {
const int offset = -ExitFrameConstants::kFixedFrameSizeFromFp;
for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
XMMRegister reg = XMMRegister::from_code(i);
movsd(reg, Operand(ebp, offset - ((i + 1) * kDoubleSize)));
}
}
if (pop_arguments) {
// Get the return address from the stack and restore the frame pointer.
mov(ecx, Operand(ebp, 1 * kPointerSize));
mov(ebp, Operand(ebp, 0 * kPointerSize));
// Pop the arguments and the receiver from the caller stack.
lea(esp, Operand(esi, 1 * kPointerSize));
// Push the return address to get ready to return.
push(ecx);
} else {
// Otherwise just leave the exit frame.
leave();
}
LeaveExitFrameEpilogue(true);
}
void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
// Restore current context from top and clear it in debug mode.
ExternalReference context_address(Isolate::kContextAddress, isolate());
if (restore_context) {
mov(esi, Operand::StaticVariable(context_address));
}
#ifdef DEBUG
mov(Operand::StaticVariable(context_address), Immediate(0));
#endif
// Clear the top frame.
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate());
mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0));
}
void MacroAssembler::LeaveApiExitFrame(bool restore_context) {
mov(esp, ebp);
pop(ebp);
LeaveExitFrameEpilogue(restore_context);
}
void MacroAssembler::PushStackHandler() {
// Adjust this code if not the case.
STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
// Link the current handler as the next handler.
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
push(Operand::StaticVariable(handler_address));
// Set this new handler as the current one.
mov(Operand::StaticVariable(handler_address), esp);
}
void MacroAssembler::PopStackHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
pop(Operand::StaticVariable(handler_address));
add(esp, Immediate(StackHandlerConstants::kSize - kPointerSize));
}
void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
Register scratch1,
Register scratch2,
Label* miss) {
Label same_contexts;
DCHECK(!holder_reg.is(scratch1));
DCHECK(!holder_reg.is(scratch2));
DCHECK(!scratch1.is(scratch2));
// Load current lexical context from the active StandardFrame, which
// may require crawling past STUB frames.
Label load_context;
Label has_context;
mov(scratch2, ebp);
bind(&load_context);
mov(scratch1,
MemOperand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset));
JumpIfNotSmi(scratch1, &has_context);
mov(scratch2, MemOperand(scratch2, CommonFrameConstants::kCallerFPOffset));
jmp(&load_context);
bind(&has_context);
// When generating debug code, make sure the lexical context is set.
if (emit_debug_code()) {
cmp(scratch1, Immediate(0));
Check(not_equal, kWeShouldNotHaveAnEmptyLexicalContext);
}
// Load the native context of the current context.
mov(scratch1, ContextOperand(scratch1, Context::NATIVE_CONTEXT_INDEX));
// Check the context is a native context.
if (emit_debug_code()) {
// Read the first word and compare to native_context_map.
cmp(FieldOperand(scratch1, HeapObject::kMapOffset),
isolate()->factory()->native_context_map());
Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext);
}
// Check if both contexts are the same.
cmp(scratch1, FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
j(equal, &same_contexts);
// Compare security tokens, save holder_reg on the stack so we can use it
// as a temporary register.
//
// Check that the security token in the calling global object is
// compatible with the security token in the receiving global
// object.
mov(scratch2,
FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
// Check the context is a native context.
if (emit_debug_code()) {
cmp(scratch2, isolate()->factory()->null_value());
Check(not_equal, kJSGlobalProxyContextShouldNotBeNull);
// Read the first word and compare to native_context_map(),
cmp(FieldOperand(scratch2, HeapObject::kMapOffset),
isolate()->factory()->native_context_map());
Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext);
}
int token_offset = Context::kHeaderSize +
Context::SECURITY_TOKEN_INDEX * kPointerSize;
mov(scratch1, FieldOperand(scratch1, token_offset));
cmp(scratch1, FieldOperand(scratch2, token_offset));
j(not_equal, miss);
bind(&same_contexts);
}
// Compute the hash code from the untagged key. This must be kept in sync with
// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in
// code-stub-hydrogen.cc
//
// Note: r0 will contain hash code
void MacroAssembler::GetNumberHash(Register r0, Register scratch) {
// Xor original key with a seed.
if (serializer_enabled()) {
ExternalReference roots_array_start =
ExternalReference::roots_array_start(isolate());
mov(scratch, Immediate(Heap::kHashSeedRootIndex));
mov(scratch,
Operand::StaticArray(scratch, times_pointer_size, roots_array_start));
SmiUntag(scratch);
xor_(r0, scratch);
} else {
int32_t seed = isolate()->heap()->HashSeed();
xor_(r0, Immediate(seed));
}
// hash = ~hash + (hash << 15);
mov(scratch, r0);
not_(r0);
shl(scratch, 15);
add(r0, scratch);
// hash = hash ^ (hash >> 12);
mov(scratch, r0);
shr(scratch, 12);
xor_(r0, scratch);
// hash = hash + (hash << 2);
lea(r0, Operand(r0, r0, times_4, 0));
// hash = hash ^ (hash >> 4);
mov(scratch, r0);
shr(scratch, 4);
xor_(r0, scratch);
// hash = hash * 2057;
imul(r0, r0, 2057);
// hash = hash ^ (hash >> 16);
mov(scratch, r0);
shr(scratch, 16);
xor_(r0, scratch);
and_(r0, 0x3fffffff);
}
void MacroAssembler::LoadFromNumberDictionary(Label* miss,
Register elements,
Register key,
Register r0,
Register r1,
Register r2,
Register result) {
// Register use:
//
// elements - holds the slow-case elements of the receiver and is unchanged.
//
// key - holds the smi key on entry and is unchanged.
//
// Scratch registers:
//
// r0 - holds the untagged key on entry and holds the hash once computed.
//
// r1 - used to hold the capacity mask of the dictionary
//
// r2 - used for the index into the dictionary.
//
// result - holds the result on exit if the load succeeds and we fall through.
Label done;
GetNumberHash(r0, r1);
// Compute capacity mask.
mov(r1, FieldOperand(elements, SeededNumberDictionary::kCapacityOffset));
shr(r1, kSmiTagSize); // convert smi to int
dec(r1);
// Generate an unrolled loop that performs a few probes before giving up.
for (int i = 0; i < kNumberDictionaryProbes; i++) {
// Use r2 for index calculations and keep the hash intact in r0.
mov(r2, r0);
// Compute the masked index: (hash + i + i * i) & mask.
if (i > 0) {
add(r2, Immediate(SeededNumberDictionary::GetProbeOffset(i)));
}
and_(r2, r1);
// Scale the index by multiplying by the entry size.
DCHECK(SeededNumberDictionary::kEntrySize == 3);
lea(r2, Operand(r2, r2, times_2, 0)); // r2 = r2 * 3
// Check if the key matches.
cmp(key, FieldOperand(elements,
r2,
times_pointer_size,
SeededNumberDictionary::kElementsStartOffset));
if (i != (kNumberDictionaryProbes - 1)) {
j(equal, &done);
} else {
j(not_equal, miss);
}
}
bind(&done);
// Check that the value is a field property.
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
DCHECK_EQ(DATA, 0);
test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset),
Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize));
j(not_zero, miss);
// Get the value at the masked, scaled index.
const int kValueOffset =
SeededNumberDictionary::kElementsStartOffset + kPointerSize;
mov(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset));
}
void MacroAssembler::LoadAllocationTopHelper(Register result,
Register scratch,
AllocationFlags flags) {
ExternalReference allocation_top =
AllocationUtils::GetAllocationTopReference(isolate(), flags);
// Just return if allocation top is already known.
if ((flags & RESULT_CONTAINS_TOP) != 0) {
// No use of scratch if allocation top is provided.
DCHECK(scratch.is(no_reg));
#ifdef DEBUG
// Assert that result actually contains top on entry.
cmp(result, Operand::StaticVariable(allocation_top));
Check(equal, kUnexpectedAllocationTop);
#endif
return;
}
// Move address of new object to result. Use scratch register if available.
if (scratch.is(no_reg)) {
mov(result, Operand::StaticVariable(allocation_top));
} else {
mov(scratch, Immediate(allocation_top));
mov(result, Operand(scratch, 0));
}
}
void MacroAssembler::UpdateAllocationTopHelper(Register result_end,
Register scratch,
AllocationFlags flags) {
if (emit_debug_code()) {
test(result_end, Immediate(kObjectAlignmentMask));
Check(zero, kUnalignedAllocationInNewSpace);
}
ExternalReference allocation_top =
AllocationUtils::GetAllocationTopReference(isolate(), flags);
// Update new top. Use scratch if available.
if (scratch.is(no_reg)) {
mov(Operand::StaticVariable(allocation_top), result_end);
} else {
mov(Operand(scratch, 0), result_end);
}
}
void MacroAssembler::Allocate(int object_size,
Register result,
Register result_end,
Register scratch,
Label* gc_required,
AllocationFlags flags) {
DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
DCHECK(object_size <= Page::kMaxRegularHeapObjectSize);
DCHECK((flags & ALLOCATION_FOLDED) == 0);
if (!FLAG_inline_new) {
if (emit_debug_code()) {
// Trash the registers to simulate an allocation failure.
mov(result, Immediate(0x7091));
if (result_end.is_valid()) {
mov(result_end, Immediate(0x7191));
}
if (scratch.is_valid()) {
mov(scratch, Immediate(0x7291));
}
}
jmp(gc_required);
return;
}
DCHECK(!result.is(result_end));
// Load address of new object into result.
LoadAllocationTopHelper(result, scratch, flags);
ExternalReference allocation_limit =
AllocationUtils::GetAllocationLimitReference(isolate(), flags);
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
if ((flags & DOUBLE_ALIGNMENT) != 0) {
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
Label aligned;
test(result, Immediate(kDoubleAlignmentMask));
j(zero, &aligned, Label::kNear);
if ((flags & PRETENURE) != 0) {
cmp(result, Operand::StaticVariable(allocation_limit));
j(above_equal, gc_required);
}
mov(Operand(result, 0),
Immediate(isolate()->factory()->one_pointer_filler_map()));
add(result, Immediate(kDoubleSize / 2));
bind(&aligned);
}
// Calculate new top and bail out if space is exhausted.
Register top_reg = result_end.is_valid() ? result_end : result;
if (!top_reg.is(result)) {
mov(top_reg, result);
}
add(top_reg, Immediate(object_size));
cmp(top_reg, Operand::StaticVariable(allocation_limit));
j(above, gc_required);
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) {
// The top pointer is not updated for allocation folding dominators.
UpdateAllocationTopHelper(top_reg, scratch, flags);
}
if (top_reg.is(result)) {
sub(result, Immediate(object_size - kHeapObjectTag));
} else {
// Tag the result.
DCHECK(kHeapObjectTag == 1);
inc(result);
}
}
void MacroAssembler::Allocate(int header_size,
ScaleFactor element_size,
Register element_count,
RegisterValueType element_count_type,
Register result,
Register result_end,
Register scratch,
Label* gc_required,
AllocationFlags flags) {
DCHECK((flags & SIZE_IN_WORDS) == 0);
DCHECK((flags & ALLOCATION_FOLDING_DOMINATOR) == 0);
DCHECK((flags & ALLOCATION_FOLDED) == 0);
if (!FLAG_inline_new) {
if (emit_debug_code()) {
// Trash the registers to simulate an allocation failure.
mov(result, Immediate(0x7091));
mov(result_end, Immediate(0x7191));
if (scratch.is_valid()) {
mov(scratch, Immediate(0x7291));
}
// Register element_count is not modified by the function.
}
jmp(gc_required);
return;
}
DCHECK(!result.is(result_end));
// Load address of new object into result.
LoadAllocationTopHelper(result, scratch, flags);
ExternalReference allocation_limit =
AllocationUtils::GetAllocationLimitReference(isolate(), flags);
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
if ((flags & DOUBLE_ALIGNMENT) != 0) {
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
Label aligned;
test(result, Immediate(kDoubleAlignmentMask));
j(zero, &aligned, Label::kNear);
if ((flags & PRETENURE) != 0) {
cmp(result, Operand::StaticVariable(allocation_limit));
j(above_equal, gc_required);
}
mov(Operand(result, 0),
Immediate(isolate()->factory()->one_pointer_filler_map()));
add(result, Immediate(kDoubleSize / 2));
bind(&aligned);
}
// Calculate new top and bail out if space is exhausted.
// We assume that element_count*element_size + header_size does not
// overflow.
if (element_count_type == REGISTER_VALUE_IS_SMI) {
STATIC_ASSERT(static_cast<ScaleFactor>(times_2 - 1) == times_1);
STATIC_ASSERT(static_cast<ScaleFactor>(times_4 - 1) == times_2);
STATIC_ASSERT(static_cast<ScaleFactor>(times_8 - 1) == times_4);
DCHECK(element_size >= times_2);
DCHECK(kSmiTagSize == 1);
element_size = static_cast<ScaleFactor>(element_size - 1);
} else {
DCHECK(element_count_type == REGISTER_VALUE_IS_INT32);
}
lea(result_end, Operand(element_count, element_size, header_size));
add(result_end, result);
cmp(result_end, Operand::StaticVariable(allocation_limit));
j(above, gc_required);
// Tag result.
DCHECK(kHeapObjectTag == 1);
inc(result);
UpdateAllocationTopHelper(result_end, scratch, flags);
}
void MacroAssembler::Allocate(Register object_size,
Register result,
Register result_end,
Register scratch,
Label* gc_required,
AllocationFlags flags) {
DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0);
DCHECK((flags & ALLOCATION_FOLDED) == 0);
if (!FLAG_inline_new) {
if (emit_debug_code()) {
// Trash the registers to simulate an allocation failure.
mov(result, Immediate(0x7091));
mov(result_end, Immediate(0x7191));
if (scratch.is_valid()) {
mov(scratch, Immediate(0x7291));
}
// object_size is left unchanged by this function.
}
jmp(gc_required);
return;
}
DCHECK(!result.is(result_end));
// Load address of new object into result.
LoadAllocationTopHelper(result, scratch, flags);
ExternalReference allocation_limit =
AllocationUtils::GetAllocationLimitReference(isolate(), flags);
// Align the next allocation. Storing the filler map without checking top is
// safe in new-space because the limit of the heap is aligned there.
if ((flags & DOUBLE_ALIGNMENT) != 0) {
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
Label aligned;
test(result, Immediate(kDoubleAlignmentMask));
j(zero, &aligned, Label::kNear);
if ((flags & PRETENURE) != 0) {
cmp(result, Operand::StaticVariable(allocation_limit));
j(above_equal, gc_required);
}
mov(Operand(result, 0),
Immediate(isolate()->factory()->one_pointer_filler_map()));
add(result, Immediate(kDoubleSize / 2));
bind(&aligned);
}
// Calculate new top and bail out if space is exhausted.
if (!object_size.is(result_end)) {
mov(result_end, object_size);
}
add(result_end, result);
cmp(result_end, Operand::StaticVariable(allocation_limit));
j(above, gc_required);
// Tag result.
DCHECK(kHeapObjectTag == 1);
inc(result);
if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) {
// The top pointer is not updated for allocation folding dominators.
UpdateAllocationTopHelper(result_end, scratch, flags);
}
}
void MacroAssembler::FastAllocate(int object_size, Register result,
Register result_end, AllocationFlags flags) {
DCHECK(!result.is(result_end));
// Load address of new object into result.
LoadAllocationTopHelper(result, no_reg, flags);
if ((flags & DOUBLE_ALIGNMENT) != 0) {
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
Label aligned;
test(result, Immediate(kDoubleAlignmentMask));
j(zero, &aligned, Label::kNear);
mov(Operand(result, 0),
Immediate(isolate()->factory()->one_pointer_filler_map()));
add(result, Immediate(kDoubleSize / 2));
bind(&aligned);
}
lea(result_end, Operand(result, object_size));
UpdateAllocationTopHelper(result_end, no_reg, flags);
DCHECK(kHeapObjectTag == 1);
inc(result);
}
void MacroAssembler::FastAllocate(Register object_size, Register result,
Register result_end, AllocationFlags flags) {
DCHECK(!result.is(result_end));
// Load address of new object into result.
LoadAllocationTopHelper(result, no_reg, flags);
if ((flags & DOUBLE_ALIGNMENT) != 0) {
DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
Label aligned;
test(result, Immediate(kDoubleAlignmentMask));
j(zero, &aligned, Label::kNear);
mov(Operand(result, 0),
Immediate(isolate()->factory()->one_pointer_filler_map()));
add(result, Immediate(kDoubleSize / 2));
bind(&aligned);
}
lea(result_end, Operand(result, object_size, times_1, 0));
UpdateAllocationTopHelper(result_end, no_reg, flags);
DCHECK(kHeapObjectTag == 1);
inc(result);
}
void MacroAssembler::AllocateHeapNumber(Register result,
Register scratch1,
Register scratch2,
Label* gc_required,
MutableMode mode) {
// Allocate heap number in new space.
Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required,
NO_ALLOCATION_FLAGS);
Handle<Map> map = mode == MUTABLE
? isolate()->factory()->mutable_heap_number_map()
: isolate()->factory()->heap_number_map();
// Set the map.
mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map));
}
void MacroAssembler::AllocateTwoByteString(Register result,
Register length,
Register scratch1,
Register scratch2,
Register scratch3,
Label* gc_required) {
// Calculate the number of bytes needed for the characters in the string while
// observing object alignment.
DCHECK((SeqTwoByteString::kHeaderSize & kObjectAlignmentMask) == 0);
DCHECK(kShortSize == 2);
// scratch1 = length * 2 + kObjectAlignmentMask.
lea(scratch1, Operand(length, length, times_1, kObjectAlignmentMask));
and_(scratch1, Immediate(~kObjectAlignmentMask));
// Allocate two byte string in new space.
Allocate(SeqTwoByteString::kHeaderSize, times_1, scratch1,
REGISTER_VALUE_IS_INT32, result, scratch2, scratch3, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map, length and hash field.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->string_map()));
mov(scratch1, length);
SmiTag(scratch1);
mov(FieldOperand(result, String::kLengthOffset), scratch1);
mov(FieldOperand(result, String::kHashFieldOffset),
Immediate(String::kEmptyHashField));
}
void MacroAssembler::AllocateOneByteString(Register result, Register length,
Register scratch1, Register scratch2,
Register scratch3,
Label* gc_required) {
// Calculate the number of bytes needed for the characters in the string while
// observing object alignment.
DCHECK((SeqOneByteString::kHeaderSize & kObjectAlignmentMask) == 0);
mov(scratch1, length);
DCHECK(kCharSize == 1);
add(scratch1, Immediate(kObjectAlignmentMask));
and_(scratch1, Immediate(~kObjectAlignmentMask));
// Allocate one-byte string in new space.
Allocate(SeqOneByteString::kHeaderSize, times_1, scratch1,
REGISTER_VALUE_IS_INT32, result, scratch2, scratch3, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map, length and hash field.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->one_byte_string_map()));
mov(scratch1, length);
SmiTag(scratch1);
mov(FieldOperand(result, String::kLengthOffset), scratch1);
mov(FieldOperand(result, String::kHashFieldOffset),
Immediate(String::kEmptyHashField));
}
void MacroAssembler::AllocateOneByteString(Register result, int length,
Register scratch1, Register scratch2,
Label* gc_required) {
DCHECK(length > 0);
// Allocate one-byte string in new space.
Allocate(SeqOneByteString::SizeFor(length), result, scratch1, scratch2,
gc_required, NO_ALLOCATION_FLAGS);
// Set the map, length and hash field.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->one_byte_string_map()));
mov(FieldOperand(result, String::kLengthOffset),
Immediate(Smi::FromInt(length)));
mov(FieldOperand(result, String::kHashFieldOffset),
Immediate(String::kEmptyHashField));
}
void MacroAssembler::AllocateTwoByteConsString(Register result,
Register scratch1,
Register scratch2,
Label* gc_required) {
// Allocate heap number in new space.
Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map. The other fields are left uninitialized.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->cons_string_map()));
}
void MacroAssembler::AllocateOneByteConsString(Register result,
Register scratch1,
Register scratch2,
Label* gc_required) {
Allocate(ConsString::kSize, result, scratch1, scratch2, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map. The other fields are left uninitialized.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->cons_one_byte_string_map()));
}
void MacroAssembler::AllocateTwoByteSlicedString(Register result,
Register scratch1,
Register scratch2,
Label* gc_required) {
// Allocate heap number in new space.
Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map. The other fields are left uninitialized.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->sliced_string_map()));
}
void MacroAssembler::AllocateOneByteSlicedString(Register result,
Register scratch1,
Register scratch2,
Label* gc_required) {
// Allocate heap number in new space.
Allocate(SlicedString::kSize, result, scratch1, scratch2, gc_required,
NO_ALLOCATION_FLAGS);
// Set the map. The other fields are left uninitialized.
mov(FieldOperand(result, HeapObject::kMapOffset),
Immediate(isolate()->factory()->sliced_one_byte_string_map()));
}
void MacroAssembler::AllocateJSValue(Register result, Register constructor,
Register value, Register scratch,
Label* gc_required) {
DCHECK(!result.is(constructor));
DCHECK(!result.is(scratch));
DCHECK(!result.is(value));
// Allocate JSValue in new space.
Allocate(JSValue::kSize, result, scratch, no_reg, gc_required,
NO_ALLOCATION_FLAGS);
// Initialize the JSValue.
LoadGlobalFunctionInitialMap(constructor, scratch);
mov(FieldOperand(result, HeapObject::kMapOffset), scratch);
LoadRoot(scratch, Heap::kEmptyFixedArrayRootIndex);
mov(FieldOperand(result, JSObject::kPropertiesOffset), scratch);
mov(FieldOperand(result, JSObject::kElementsOffset), scratch);
mov(FieldOperand(result, JSValue::kValueOffset), value);
STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
}
// Copy memory, byte-by-byte, from source to destination. Not optimized for
// long or aligned copies. The contents of scratch and length are destroyed.
// Source and destination are incremented by length.
// Many variants of movsb, loop unrolling, word moves, and indexed operands
// have been tried here already, and this is fastest.
// A simpler loop is faster on small copies, but 30% slower on large ones.
// The cld() instruction must have been emitted, to set the direction flag(),
// before calling this function.
void MacroAssembler::CopyBytes(Register source,
Register destination,
Register length,
Register scratch) {
Label short_loop, len4, len8, len12, done, short_string;
DCHECK(source.is(esi));
DCHECK(destination.is(edi));
DCHECK(length.is(ecx));
cmp(length, Immediate(4));
j(below, &short_string, Label::kNear);
// Because source is 4-byte aligned in our uses of this function,
// we keep source aligned for the rep_movs call by copying the odd bytes
// at the end of the ranges.
mov(scratch, Operand(source, length, times_1, -4));
mov(Operand(destination, length, times_1, -4), scratch);
cmp(length, Immediate(8));
j(below_equal, &len4, Label::kNear);
cmp(length, Immediate(12));
j(below_equal, &len8, Label::kNear);
cmp(length, Immediate(16));
j(below_equal, &len12, Label::kNear);
mov(scratch, ecx);
shr(ecx, 2);
rep_movs();
and_(scratch, Immediate(0x3));
add(destination, scratch);
jmp(&done, Label::kNear);
bind(&len12);
mov(scratch, Operand(source, 8));
mov(Operand(destination, 8), scratch);
bind(&len8);
mov(scratch, Operand(source, 4));
mov(Operand(destination, 4), scratch);
bind(&len4);
mov(scratch, Operand(source, 0));
mov(Operand(destination, 0), scratch);
add(destination, length);
jmp(&done, Label::kNear);
bind(&short_string);
test(length, length);
j(zero, &done, Label::kNear);
bind(&short_loop);
mov_b(scratch, Operand(source, 0));
mov_b(Operand(destination, 0), scratch);
inc(source);
inc(destination);
dec(length);
j(not_zero, &short_loop);
bind(&done);
}
void MacroAssembler::InitializeFieldsWithFiller(Register current_address,
Register end_address,
Register filler) {
Label loop, entry;
jmp(&entry, Label::kNear);
bind(&loop);
mov(Operand(current_address, 0), filler);
add(current_address, Immediate(kPointerSize));
bind(&entry);
cmp(current_address, end_address);
j(below, &loop, Label::kNear);
}
void MacroAssembler::BooleanBitTest(Register object,
int field_offset,
int bit_index) {
bit_index += kSmiTagSize + kSmiShiftSize;
DCHECK(base::bits::IsPowerOfTwo32(kBitsPerByte));
int byte_index = bit_index / kBitsPerByte;
int byte_bit_index = bit_index & (kBitsPerByte - 1);
test_b(FieldOperand(object, field_offset + byte_index),
Immediate(1 << byte_bit_index));
}
void MacroAssembler::NegativeZeroTest(Register result,
Register op,
Label* then_label) {
Label ok;
test(result, result);
j(not_zero, &ok, Label::kNear);
test(op, op);
j(sign, then_label, Label::kNear);
bind(&ok);
}
void MacroAssembler::NegativeZeroTest(Register result,
Register op1,
Register op2,
Register scratch,
Label* then_label) {
Label ok;
test(result, result);
j(not_zero, &ok, Label::kNear);
mov(scratch, op1);
or_(scratch, op2);
j(sign, then_label, Label::kNear);
bind(&ok);
}
void MacroAssembler::GetMapConstructor(Register result, Register map,
Register temp) {
Label done, loop;
mov(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
bind(&loop);
JumpIfSmi(result, &done, Label::kNear);
CmpObjectType(result, MAP_TYPE, temp);
j(not_equal, &done, Label::kNear);
mov(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
jmp(&loop);
bind(&done);
}
void MacroAssembler::TryGetFunctionPrototype(Register function, Register result,
Register scratch, Label* miss) {
// Get the prototype or initial map from the function.
mov(result,
FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
// If the prototype or initial map is the hole, don't return it and
// simply miss the cache instead. This will allow us to allocate a
// prototype object on-demand in the runtime system.
cmp(result, Immediate(isolate()->factory()->the_hole_value()));
j(equal, miss);
// If the function does not have an initial map, we're done.
Label done;
CmpObjectType(result, MAP_TYPE, scratch);
j(not_equal, &done, Label::kNear);
// Get the prototype from the initial map.
mov(result, FieldOperand(result, Map::kPrototypeOffset));
// All done.
bind(&done);
}
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) {
DCHECK(AllowThisStubCall(stub)); // Calls are not allowed in some stubs.
call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id);
}
void MacroAssembler::TailCallStub(CodeStub* stub) {
jmp(stub->GetCode(), RelocInfo::CODE_TARGET);
}
void MacroAssembler::StubReturn(int argc) {
DCHECK(argc >= 1 && generating_stub());
ret((argc - 1) * kPointerSize);
}
bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
return has_frame_ || !stub->SometimesSetsUpAFrame();
}
void MacroAssembler::IndexFromHash(Register hash, Register index) {
// The assert checks that the constants for the maximum number of digits
// for an array index cached in the hash field and the number of bits
// reserved for it does not conflict.
DCHECK(TenToThe(String::kMaxCachedArrayIndexLength) <
(1 << String::kArrayIndexValueBits));
if (!index.is(hash)) {
mov(index, hash);
}
DecodeFieldToSmi<String::ArrayIndexValueBits>(index);
}
void MacroAssembler::CallRuntime(const Runtime::Function* f,
int num_arguments,
SaveFPRegsMode save_doubles) {
// If the expected number of arguments of the runtime function is
// constant, we check that the actual number of arguments match the
// expectation.
CHECK(f->nargs < 0 || f->nargs == num_arguments);
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
// smarter.
Move(eax, Immediate(num_arguments));
mov(ebx, Immediate(ExternalReference(f, isolate())));
CEntryStub ces(isolate(), 1, save_doubles);
CallStub(&ces);
}
void MacroAssembler::CallExternalReference(ExternalReference ref,
int num_arguments) {
mov(eax, Immediate(num_arguments));
mov(ebx, Immediate(ref));
CEntryStub stub(isolate(), 1);
CallStub(&stub);
}
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) {
// ----------- S t a t e -------------
// -- esp[0] : return address
// -- esp[8] : argument num_arguments - 1
// ...
// -- esp[8 * num_arguments] : argument 0 (receiver)
//
// For runtime functions with variable arguments:
// -- eax : number of arguments
// -----------------------------------
const Runtime::Function* function = Runtime::FunctionForId(fid);
DCHECK_EQ(1, function->result_size);
if (function->nargs >= 0) {
// TODO(1236192): Most runtime routines don't need the number of
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
// smarter.
mov(eax, Immediate(function->nargs));
}
JumpToExternalReference(ExternalReference(fid, isolate()));
}
void MacroAssembler::JumpToExternalReference(const ExternalReference& ext) {
// Set the entry point and jump to the C entry runtime stub.
mov(ebx, Immediate(ext));
CEntryStub ces(isolate(), 1);
jmp(ces.GetCode(), RelocInfo::CODE_TARGET);
}
void MacroAssembler::PrepareForTailCall(
const ParameterCount& callee_args_count, Register caller_args_count_reg,
Register scratch0, Register scratch1, ReturnAddressState ra_state,
int number_of_temp_values_after_return_address) {
#if DEBUG
if (callee_args_count.is_reg()) {
DCHECK(!AreAliased(callee_args_count.reg(), caller_args_count_reg, scratch0,
scratch1));
} else {
DCHECK(!AreAliased(caller_args_count_reg, scratch0, scratch1));
}
DCHECK(ra_state != ReturnAddressState::kNotOnStack ||
number_of_temp_values_after_return_address == 0);
#endif
// Calculate the destination address where we will put the return address
// after we drop current frame.
Register new_sp_reg = scratch0;
if (callee_args_count.is_reg()) {
sub(caller_args_count_reg, callee_args_count.reg());
lea(new_sp_reg,
Operand(ebp, caller_args_count_reg, times_pointer_size,
StandardFrameConstants::kCallerPCOffset -
number_of_temp_values_after_return_address * kPointerSize));
} else {
lea(new_sp_reg, Operand(ebp, caller_args_count_reg, times_pointer_size,
StandardFrameConstants::kCallerPCOffset -
(callee_args_count.immediate() +
number_of_temp_values_after_return_address) *
kPointerSize));
}
if (FLAG_debug_code) {
cmp(esp, new_sp_reg);
Check(below, kStackAccessBelowStackPointer);
}
// Copy return address from caller's frame to current frame's return address
// to avoid its trashing and let the following loop copy it to the right
// place.
Register tmp_reg = scratch1;
if (ra_state == ReturnAddressState::kOnStack) {
mov(tmp_reg, Operand(ebp, StandardFrameConstants::kCallerPCOffset));
mov(Operand(esp, number_of_temp_values_after_return_address * kPointerSize),
tmp_reg);
} else {
DCHECK(ReturnAddressState::kNotOnStack == ra_state);
DCHECK_EQ(0, number_of_temp_values_after_return_address);
Push(Operand(ebp, StandardFrameConstants::kCallerPCOffset));
}
// Restore caller's frame pointer now as it could be overwritten by
// the copying loop.
mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
// +2 here is to copy both receiver and return address.
Register count_reg = caller_args_count_reg;
if (callee_args_count.is_reg()) {
lea(count_reg, Operand(callee_args_count.reg(),
2 + number_of_temp_values_after_return_address));
} else {
mov(count_reg, Immediate(callee_args_count.immediate() + 2 +
number_of_temp_values_after_return_address));
// TODO(ishell): Unroll copying loop for small immediate values.
}
// Now copy callee arguments to the caller frame going backwards to avoid
// callee arguments corruption (source and destination areas could overlap).
Label loop, entry;
jmp(&entry, Label::kNear);
bind(&loop);
dec(count_reg);
mov(tmp_reg, Operand(esp, count_reg, times_pointer_size, 0));
mov(Operand(new_sp_reg, count_reg, times_pointer_size, 0), tmp_reg);
bind(&entry);
cmp(count_reg, Immediate(0));
j(not_equal, &loop, Label::kNear);
// Leave current frame.
mov(esp, new_sp_reg);
}
void MacroAssembler::InvokePrologue(const ParameterCount& expected,
const ParameterCount& actual,
Label* done,
bool* definitely_mismatches,
InvokeFlag flag,
Label::Distance done_near,
const CallWrapper& call_wrapper) {
bool definitely_matches = false;
*definitely_mismatches = false;
Label invoke;
if (expected.is_immediate()) {
DCHECK(actual.is_immediate());
mov(eax, actual.immediate());
if (expected.immediate() == actual.immediate()) {
definitely_matches = true;
} else {
const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel;
if (expected.immediate() == sentinel) {
// Don't worry about adapting arguments for builtins that
// don't want that done. Skip adaption code by making it look
// like we have a match between expected and actual number of
// arguments.
definitely_matches = true;
} else {
*definitely_mismatches = true;
mov(ebx, expected.immediate());
}
}
} else {
if (actual.is_immediate()) {
// Expected is in register, actual is immediate. This is the
// case when we invoke function values without going through the
// IC mechanism.
mov(eax, actual.immediate());
cmp(expected.reg(), actual.immediate());
j(equal, &invoke);
DCHECK(expected.reg().is(ebx));
} else if (!expected.reg().is(actual.reg())) {
// Both expected and actual are in (different) registers. This
// is the case when we invoke functions using call and apply.
cmp(expected.reg(), actual.reg());
j(equal, &invoke);
DCHECK(actual.reg().is(eax));
DCHECK(expected.reg().is(ebx));
} else {
Move(eax, actual.reg());
}
}
if (!definitely_matches) {
Handle<Code> adaptor =
isolate()->builtins()->ArgumentsAdaptorTrampoline();
if (flag == CALL_FUNCTION) {
call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET));
call(adaptor, RelocInfo::CODE_TARGET);
call_wrapper.AfterCall();
if (!*definitely_mismatches) {
jmp(done, done_near);
}
} else {
jmp(adaptor, RelocInfo::CODE_TARGET);
}
bind(&invoke);
}
}
void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual) {
Label skip_flooding;
ExternalReference step_in_enabled =
ExternalReference::debug_step_in_enabled_address(isolate());
cmpb(Operand::StaticVariable(step_in_enabled), Immediate(0));
j(equal, &skip_flooding);
{
FrameScope frame(this,
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
if (expected.is_reg()) {
SmiTag(expected.reg());
Push(expected.reg());
}
if (actual.is_reg()) {
SmiTag(actual.reg());
Push(actual.reg());
}
if (new_target.is_valid()) {
Push(new_target);
}
Push(fun);
Push(fun);
CallRuntime(Runtime::kDebugPrepareStepInIfStepping);
Pop(fun);
if (new_target.is_valid()) {
Pop(new_target);
}
if (actual.is_reg()) {
Pop(actual.reg());
SmiUntag(actual.reg());
}
if (expected.is_reg()) {
Pop(expected.reg());
SmiUntag(expected.reg());
}
}
bind(&skip_flooding);
}
void MacroAssembler::InvokeFunctionCode(Register function, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag,
const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
DCHECK(function.is(edi));
DCHECK_IMPLIES(new_target.is_valid(), new_target.is(edx));
if (call_wrapper.NeedsDebugStepCheck()) {
FloodFunctionIfStepping(function, new_target, expected, actual);
}
// Clear the new.target register if not given.
if (!new_target.is_valid()) {
mov(edx, isolate()->factory()->undefined_value());
}
Label done;
bool definitely_mismatches = false;
InvokePrologue(expected, actual, &done, &definitely_mismatches, flag,
Label::kNear, call_wrapper);
if (!definitely_mismatches) {
// We call indirectly through the code field in the function to
// allow recompilation to take effect without changing any of the
// call sites.
Operand code = FieldOperand(function, JSFunction::kCodeEntryOffset);
if (flag == CALL_FUNCTION) {
call_wrapper.BeforeCall(CallSize(code));
call(code);
call_wrapper.AfterCall();
} else {
DCHECK(flag == JUMP_FUNCTION);
jmp(code);
}
bind(&done);
}
}
void MacroAssembler::InvokeFunction(Register fun,
Register new_target,
const ParameterCount& actual,
InvokeFlag flag,
const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
DCHECK(fun.is(edi));
mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kFormalParameterCountOffset));
SmiUntag(ebx);
ParameterCount expected(ebx);
InvokeFunctionCode(edi, new_target, expected, actual, flag, call_wrapper);
}
void MacroAssembler::InvokeFunction(Register fun,
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag,
const CallWrapper& call_wrapper) {
// You can't call a function without a valid frame.
DCHECK(flag == JUMP_FUNCTION || has_frame());
DCHECK(fun.is(edi));
mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
InvokeFunctionCode(edi, no_reg, expected, actual, flag, call_wrapper);
}
void MacroAssembler::InvokeFunction(Handle<JSFunction> function,
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag,
const CallWrapper& call_wrapper) {
LoadHeapObject(edi, function);
InvokeFunction(edi, expected, actual, flag, call_wrapper);
}
void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
if (context_chain_length > 0) {
// Move up the chain of contexts to the context containing the slot.
mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX)));
for (int i = 1; i < context_chain_length; i++) {
mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
}
} else {
// Slot is in the current function context. Move it into the
// destination register in case we store into it (the write barrier
// cannot be allowed to destroy the context in esi).
mov(dst, esi);
}
// We should not have found a with context by walking the context chain
// (i.e., the static scope chain and runtime context chain do not agree).
// A variable occurring in such a scope should have slot type LOOKUP and
// not CONTEXT.
if (emit_debug_code()) {
cmp(FieldOperand(dst, HeapObject::kMapOffset),
isolate()->factory()->with_context_map());
Check(not_equal, kVariableResolvedToWithContext);
}
}
void MacroAssembler::LoadGlobalProxy(Register dst) {
mov(dst, NativeContextOperand());
mov(dst, ContextOperand(dst, Context::GLOBAL_PROXY_INDEX));
}
void MacroAssembler::LoadTransitionedArrayMapConditional(
ElementsKind expected_kind,
ElementsKind transitioned_kind,
Register map_in_out,
Register scratch,
Label* no_map_match) {
DCHECK(IsFastElementsKind(expected_kind));
DCHECK(IsFastElementsKind(transitioned_kind));
// Check that the function's map is the same as the expected cached map.
mov(scratch, NativeContextOperand());
cmp(map_in_out,
ContextOperand(scratch, Context::ArrayMapIndex(expected_kind)));
j(not_equal, no_map_match);
// Use the transitioned cached map.
mov(map_in_out,
ContextOperand(scratch, Context::ArrayMapIndex(transitioned_kind)));
}
void MacroAssembler::LoadGlobalFunction(int index, Register function) {
// Load the native context from the current context.
mov(function, NativeContextOperand());
// Load the function from the native context.
mov(function, ContextOperand(function, index));
}
void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
Register map) {
// Load the initial map. The global functions all have initial maps.
mov(map, FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
if (emit_debug_code()) {
Label ok, fail;
CheckMap(map, isolate()->factory()->meta_map(), &fail, DO_SMI_CHECK);
jmp(&ok);
bind(&fail);
Abort(kGlobalFunctionsMustHaveInitialMap);
bind(&ok);
}
}
// Store the value in register src in the safepoint register stack
// slot for register dst.
void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Register src) {
mov(SafepointRegisterSlot(dst), src);
}
void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Immediate src) {
mov(SafepointRegisterSlot(dst), src);
}
void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) {
mov(dst, SafepointRegisterSlot(src));
}
Operand MacroAssembler::SafepointRegisterSlot(Register reg) {
return Operand(esp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
// The registers are pushed starting with the lowest encoding,
// which means that lowest encodings are furthest away from
// the stack pointer.
DCHECK(reg_code >= 0 && reg_code < kNumSafepointRegisters);
return kNumSafepointRegisters - reg_code - 1;
}
void MacroAssembler::LoadHeapObject(Register result,
Handle<HeapObject> object) {
AllowDeferredHandleDereference embedding_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
mov(result, Operand::ForCell(cell));
} else {
mov(result, object);
}
}
void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
AllowDeferredHandleDereference using_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
cmp(reg, Operand::ForCell(cell));
} else {
cmp(reg, object);
}
}
void MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
AllowDeferredHandleDereference using_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
push(Operand::ForCell(cell));
} else {
Push(object);
}
}
void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
Register scratch) {
mov(scratch, cell);
cmp(value, FieldOperand(scratch, WeakCell::kValueOffset));
}
void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) {
mov(value, cell);
mov(value, FieldOperand(value, WeakCell::kValueOffset));
}
void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
Label* miss) {
GetWeakValue(value, cell);
JumpIfSmi(value, miss);
}
void MacroAssembler::Ret() {
ret(0);
}
void MacroAssembler::Ret(int bytes_dropped, Register scratch) {
if (is_uint16(bytes_dropped)) {
ret(bytes_dropped);
} else {
pop(scratch);
add(esp, Immediate(bytes_dropped));
push(scratch);
ret(0);
}
}
void MacroAssembler::Drop(int stack_elements) {
if (stack_elements > 0) {
add(esp, Immediate(stack_elements * kPointerSize));
}
}
void MacroAssembler::Move(Register dst, Register src) {
if (!dst.is(src)) {
mov(dst, src);
}
}
void MacroAssembler::Move(Register dst, const Immediate& x) {
if (x.is_zero()) {
xor_(dst, dst); // Shorter than mov of 32-bit immediate 0.
} else {
mov(dst, x);
}
}
void MacroAssembler::Move(const Operand& dst, const Immediate& x) {
mov(dst, x);
}
void MacroAssembler::Move(XMMRegister dst, uint32_t src) {
if (src == 0) {
pxor(dst, dst);
} else {
unsigned cnt = base::bits::CountPopulation32(src);
unsigned nlz = base::bits::CountLeadingZeros32(src);
unsigned ntz = base::bits::CountTrailingZeros32(src);
if (nlz + cnt + ntz == 32) {
pcmpeqd(dst, dst);
if (ntz == 0) {
psrld(dst, 32 - cnt);
} else {
pslld(dst, 32 - cnt);
if (nlz != 0) psrld(dst, nlz);
}
} else {
push(eax);
mov(eax, Immediate(src));
movd(dst, Operand(eax));
pop(eax);
}
}
}
void MacroAssembler::Move(XMMRegister dst, uint64_t src) {
if (src == 0) {
pxor(dst, dst);
} else {
uint32_t lower = static_cast<uint32_t>(src);
uint32_t upper = static_cast<uint32_t>(src >> 32);
unsigned cnt = base::bits::CountPopulation64(src);
unsigned nlz = base::bits::CountLeadingZeros64(src);
unsigned ntz = base::bits::CountTrailingZeros64(src);
if (nlz + cnt + ntz == 64) {
pcmpeqd(dst, dst);
if (ntz == 0) {
psrlq(dst, 64 - cnt);
} else {
psllq(dst, 64 - cnt);
if (nlz != 0) psrlq(dst, nlz);
}
} else if (lower == 0) {
Move(dst, upper);
psllq(dst, 32);
} else if (CpuFeatures::IsSupported(SSE4_1)) {
CpuFeatureScope scope(this, SSE4_1);
push(eax);
Move(eax, Immediate(lower));
movd(dst, Operand(eax));
Move(eax, Immediate(upper));
pinsrd(dst, Operand(eax), 1);
pop(eax);
} else {
push(Immediate(upper));
push(Immediate(lower));
movsd(dst, Operand(esp, 0));
add(esp, Immediate(kDoubleSize));
}
}
}
void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) {
if (imm8 == 0) {
movd(dst, src);
return;
}
DCHECK_EQ(1, imm8);
if (CpuFeatures::IsSupported(SSE4_1)) {
CpuFeatureScope sse_scope(this, SSE4_1);
pextrd(dst, src, imm8);
return;
}
pshufd(xmm0, src, 1);
movd(dst, xmm0);
}
void MacroAssembler::Pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) {
DCHECK(imm8 == 0 || imm8 == 1);
if (CpuFeatures::IsSupported(SSE4_1)) {
CpuFeatureScope sse_scope(this, SSE4_1);
pinsrd(dst, src, imm8);
return;
}
movd(xmm0, src);
if (imm8 == 1) {
punpckldq(dst, xmm0);
} else {
DCHECK_EQ(0, imm8);
psrlq(dst, 32);
punpckldq(xmm0, dst);
movaps(dst, xmm0);
}
}
void MacroAssembler::Lzcnt(Register dst, const Operand& src) {
if (CpuFeatures::IsSupported(LZCNT)) {
CpuFeatureScope scope(this, LZCNT);
lzcnt(dst, src);
return;
}
Label not_zero_src;
bsr(dst, src);
j(not_zero, ¬_zero_src, Label::kNear);
Move(dst, Immediate(63)); // 63^31 == 32
bind(¬_zero_src);
xor_(dst, Immediate(31)); // for x in [0..31], 31^x == 31-x.
}
void MacroAssembler::Tzcnt(Register dst, const Operand& src) {
if (CpuFeatures::IsSupported(BMI1)) {
CpuFeatureScope scope(this, BMI1);
tzcnt(dst, src);
return;
}
Label not_zero_src;
bsf(dst, src);
j(not_zero, ¬_zero_src, Label::kNear);
Move(dst, Immediate(32)); // The result of tzcnt is 32 if src = 0.
bind(¬_zero_src);
}
void MacroAssembler::Popcnt(Register dst, const Operand& src) {
if (CpuFeatures::IsSupported(POPCNT)) {
CpuFeatureScope scope(this, POPCNT);
popcnt(dst, src);
return;
}
UNREACHABLE();
}
void MacroAssembler::SetCounter(StatsCounter* counter, int value) {
if (FLAG_native_code_counters && counter->Enabled()) {
mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value));
}
}
void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) {
DCHECK(value > 0);
if (FLAG_native_code_counters && counter->Enabled()) {
Operand operand = Operand::StaticVariable(ExternalReference(counter));
if (value == 1) {
inc(operand);
} else {
add(operand, Immediate(value));
}
}
}
void MacroAssembler::DecrementCounter(StatsCounter* counter, int value) {
DCHECK(value > 0);
if (FLAG_native_code_counters && counter->Enabled()) {
Operand operand = Operand::StaticVariable(ExternalReference(counter));
if (value == 1) {
dec(operand);
} else {
sub(operand, Immediate(value));
}
}
}
void MacroAssembler::IncrementCounter(Condition cc,
StatsCounter* counter,
int value) {
DCHECK(value > 0);
if (FLAG_native_code_counters && counter->Enabled()) {
Label skip;
j(NegateCondition(cc), &skip);
pushfd();
IncrementCounter(counter, value);
popfd();
bind(&skip);
}
}
void MacroAssembler::DecrementCounter(Condition cc,
StatsCounter* counter,
int value) {
DCHECK(value > 0);
if (FLAG_native_code_counters && counter->Enabled()) {
Label skip;
j(NegateCondition(cc), &skip);
pushfd();
DecrementCounter(counter, value);
popfd();
bind(&skip);
}
}
void MacroAssembler::Assert(Condition cc, BailoutReason reason) {
if (emit_debug_code()) Check(cc, reason);
}
void MacroAssembler::AssertFastElements(Register elements) {
if (emit_debug_code()) {
Factory* factory = isolate()->factory();
Label ok;
cmp(FieldOperand(elements, HeapObject::kMapOffset),
Immediate(factory->fixed_array_map()));
j(equal, &ok);
cmp(FieldOperand(elements, HeapObject::kMapOffset),
Immediate(factory->fixed_double_array_map()));
j(equal, &ok);
cmp(FieldOperand(elements, HeapObject::kMapOffset),
Immediate(factory->fixed_cow_array_map()));
j(equal, &ok);
Abort(kJSObjectWithFastElementsMapHasSlowElements);
bind(&ok);
}
}
void MacroAssembler::Check(Condition cc, BailoutReason reason) {
Label L;
j(cc, &L);
Abort(reason);
// will not return here
bind(&L);
}
void MacroAssembler::CheckStackAlignment() {
int frame_alignment = base::OS::ActivationFrameAlignment();
int frame_alignment_mask = frame_alignment - 1;
if (frame_alignment > kPointerSize) {
DCHECK(base::bits::IsPowerOfTwo32(frame_alignment));
Label alignment_as_expected;
test(esp, Immediate(frame_alignment_mask));
j(zero, &alignment_as_expected);
// Abort if stack is not aligned.
int3();
bind(&alignment_as_expected);
}
}
void MacroAssembler::Abort(BailoutReason reason) {
#ifdef DEBUG
const char* msg = GetBailoutReason(reason);
if (msg != NULL) {
RecordComment("Abort message: ");
RecordComment(msg);
}
if (FLAG_trap_on_abort) {
int3();
return;
}
#endif
push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason))));
// Disable stub call restrictions to always allow calls to abort.
if (!has_frame_) {
// We don't actually want to generate a pile of code for this, so just
// claim there is a stack frame, without generating one.
FrameScope scope(this, StackFrame::NONE);
CallRuntime(Runtime::kAbort);
} else {
CallRuntime(Runtime::kAbort);
}
// will not return here
int3();
}
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors) {
mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
}
void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
mov(dst, FieldOperand(map, Map::kBitField3Offset));
DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
}
void MacroAssembler::LoadAccessor(Register dst, Register holder,
int accessor_index,
AccessorComponent accessor) {
mov(dst, FieldOperand(holder, HeapObject::kMapOffset));
LoadInstanceDescriptors(dst, dst);
mov(dst, FieldOperand(dst, DescriptorArray::GetValueOffset(accessor_index)));
int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset
: AccessorPair::kSetterOffset;
mov(dst, FieldOperand(dst, offset));
}
void MacroAssembler::LoadPowerOf2(XMMRegister dst,
Register scratch,
int power) {
DCHECK(is_uintn(power + HeapNumber::kExponentBias,
HeapNumber::kExponentBits));
mov(scratch, Immediate(power + HeapNumber::kExponentBias));
movd(dst, scratch);
psllq(dst, HeapNumber::kMantissaBits);
}
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialOneByte(
Register instance_type, Register scratch, Label* failure) {
if (!scratch.is(instance_type)) {
mov(scratch, instance_type);
}
and_(scratch,
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask);
cmp(scratch, kStringTag | kSeqStringTag | kOneByteStringTag);
j(not_equal, failure);
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that both objects are not smis.
STATIC_ASSERT(kSmiTag == 0);
mov(scratch1, object1);
and_(scratch1, object2);
JumpIfSmi(scratch1, failure);
// Load instance type for both strings.
mov(scratch1, FieldOperand(object1, HeapObject::kMapOffset));
mov(scratch2, FieldOperand(object2, HeapObject::kMapOffset));
movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
// Check that both are flat one-byte strings.
const int kFlatOneByteStringMask =
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
const int kFlatOneByteStringTag =
kStringTag | kOneByteStringTag | kSeqStringTag;
// Interleave bits from both instance types and compare them in one check.
DCHECK_EQ(0, kFlatOneByteStringMask & (kFlatOneByteStringMask << 3));
and_(scratch1, kFlatOneByteStringMask);
and_(scratch2, kFlatOneByteStringMask);
lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
cmp(scratch1, kFlatOneByteStringTag | (kFlatOneByteStringTag << 3));
j(not_equal, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand,
Label* not_unique_name,
Label::Distance distance) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
Label succeed;
test(operand, Immediate(kIsNotStringMask | kIsNotInternalizedMask));
j(zero, &succeed);
cmpb(operand, Immediate(SYMBOL_TYPE));
j(not_equal, not_unique_name, distance);
bind(&succeed);
}
void MacroAssembler::EmitSeqStringSetCharCheck(Register string,
Register index,
Register value,
uint32_t encoding_mask) {
Label is_object;
JumpIfNotSmi(string, &is_object, Label::kNear);
Abort(kNonObject);
bind(&is_object);
push(value);
mov(value, FieldOperand(string, HeapObject::kMapOffset));
movzx_b(value, FieldOperand(value, Map::kInstanceTypeOffset));
and_(value, Immediate(kStringRepresentationMask | kStringEncodingMask));
cmp(value, Immediate(encoding_mask));
pop(value);
Check(equal, kUnexpectedStringType);
// The index is assumed to be untagged coming in, tag it to compare with the
// string length without using a temp register, it is restored at the end of
// this function.
SmiTag(index);
Check(no_overflow, kIndexIsTooLarge);
cmp(index, FieldOperand(string, String::kLengthOffset));
Check(less, kIndexIsTooLarge);
cmp(index, Immediate(Smi::FromInt(0)));
Check(greater_equal, kIndexIsNegative);
// Restore the index
SmiUntag(index);
}
void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) {
int frame_alignment = base::OS::ActivationFrameAlignment();
if (frame_alignment != 0) {
// Make stack end at alignment and make room for num_arguments words
// and the original value of esp.
mov(scratch, esp);
sub(esp, Immediate((num_arguments + 1) * kPointerSize));
DCHECK(base::bits::IsPowerOfTwo32(frame_alignment));
and_(esp, -frame_alignment);
mov(Operand(esp, num_arguments * kPointerSize), scratch);
} else {
sub(esp, Immediate(num_arguments * kPointerSize));
}
}
void MacroAssembler::CallCFunction(ExternalReference function,
int num_arguments) {
// Trashing eax is ok as it will be the return value.
mov(eax, Immediate(function));
CallCFunction(eax, num_arguments);
}
void MacroAssembler::CallCFunction(Register function,
int num_arguments) {
DCHECK(has_frame());
// Check stack alignment.
if (emit_debug_code()) {
CheckStackAlignment();
}
call(function);
if (base::OS::ActivationFrameAlignment() != 0) {
mov(esp, Operand(esp, num_arguments * kPointerSize));
} else {
add(esp, Immediate(num_arguments * kPointerSize));
}
}
#ifdef DEBUG
bool AreAliased(Register reg1,
Register reg2,
Register reg3,
Register reg4,
Register reg5,
Register reg6,
Register reg7,
Register reg8) {
int n_of_valid_regs = reg1.is_valid() + reg2.is_valid() +
reg3.is_valid() + reg4.is_valid() + reg5.is_valid() + reg6.is_valid() +
reg7.is_valid() + reg8.is_valid();
RegList regs = 0;
if (reg1.is_valid()) regs |= reg1.bit();
if (reg2.is_valid()) regs |= reg2.bit();
if (reg3.is_valid()) regs |= reg3.bit();
if (reg4.is_valid()) regs |= reg4.bit();
if (reg5.is_valid()) regs |= reg5.bit();
if (reg6.is_valid()) regs |= reg6.bit();
if (reg7.is_valid()) regs |= reg7.bit();
if (reg8.is_valid()) regs |= reg8.bit();
int n_of_non_aliasing_regs = NumRegs(regs);
return n_of_valid_regs != n_of_non_aliasing_regs;
}
#endif
CodePatcher::CodePatcher(Isolate* isolate, byte* address, int size)
: address_(address),
size_(size),
masm_(isolate, address, size + Assembler::kGap, CodeObjectRequired::kNo) {
// Create a new macro assembler pointing to the address of the code to patch.
// The size is adjusted with kGap on order for the assembler to generate size
// bytes of instructions without failing with buffer size constraints.
DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
}
CodePatcher::~CodePatcher() {
// Indicate that code has changed.
Assembler::FlushICache(masm_.isolate(), address_, size_);
// Check that the code was patched as expected.
DCHECK(masm_.pc_ == address_ + size_);
DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
}
void MacroAssembler::CheckPageFlag(
Register object,
Register scratch,
int mask,
Condition cc,
Label* condition_met,
Label::Distance condition_met_distance) {
DCHECK(cc == zero || cc == not_zero);
if (scratch.is(object)) {
and_(scratch, Immediate(~Page::kPageAlignmentMask));
} else {
mov(scratch, Immediate(~Page::kPageAlignmentMask));
and_(scratch, object);
}
if (mask < (1 << kBitsPerByte)) {
test_b(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask));
} else {
test(Operand(scratch, MemoryChunk::kFlagsOffset), Immediate(mask));
}
j(cc, condition_met, condition_met_distance);
}
void MacroAssembler::CheckPageFlagForMap(
Handle<Map> map,
int mask,
Condition cc,
Label* condition_met,
Label::Distance condition_met_distance) {
DCHECK(cc == zero || cc == not_zero);
Page* page = Page::FromAddress(map->address());
DCHECK(!serializer_enabled()); // Serializer cannot match page_flags.
ExternalReference reference(ExternalReference::page_flags(page));
// The inlined static address check of the page's flags relies
// on maps never being compacted.
DCHECK(!isolate()->heap()->mark_compact_collector()->
IsOnEvacuationCandidate(*map));
if (mask < (1 << kBitsPerByte)) {
test_b(Operand::StaticVariable(reference), Immediate(mask));
} else {
test(Operand::StaticVariable(reference), Immediate(mask));
}
j(cc, condition_met, condition_met_distance);
}
void MacroAssembler::JumpIfBlack(Register object,
Register scratch0,
Register scratch1,
Label* on_black,
Label::Distance on_black_near) {
HasColor(object, scratch0, scratch1, on_black, on_black_near, 1,
1); // kBlackBitPattern.
DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0);
}
void MacroAssembler::HasColor(Register object,
Register bitmap_scratch,
Register mask_scratch,
Label* has_color,
Label::Distance has_color_distance,
int first_bit,
int second_bit) {
DCHECK(!AreAliased(object, bitmap_scratch, mask_scratch, ecx));
GetMarkBits(object, bitmap_scratch, mask_scratch);
Label other_color, word_boundary;
test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize));
j(first_bit == 1 ? zero : not_zero, &other_color, Label::kNear);
add(mask_scratch, mask_scratch); // Shift left 1 by adding.
j(zero, &word_boundary, Label::kNear);
test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize));
j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance);
jmp(&other_color, Label::kNear);
bind(&word_boundary);
test_b(Operand(bitmap_scratch, MemoryChunk::kHeaderSize + kPointerSize),
Immediate(1));
j(second_bit == 1 ? not_zero : zero, has_color, has_color_distance);
bind(&other_color);
}
void MacroAssembler::GetMarkBits(Register addr_reg,
Register bitmap_reg,
Register mask_reg) {
DCHECK(!AreAliased(addr_reg, mask_reg, bitmap_reg, ecx));
mov(bitmap_reg, Immediate(~Page::kPageAlignmentMask));
and_(bitmap_reg, addr_reg);
mov(ecx, addr_reg);
int shift =
Bitmap::kBitsPerCellLog2 + kPointerSizeLog2 - Bitmap::kBytesPerCellLog2;
shr(ecx, shift);
and_(ecx,
(Page::kPageAlignmentMask >> shift) & ~(Bitmap::kBytesPerCell - 1));
add(bitmap_reg, ecx);
mov(ecx, addr_reg);
shr(ecx, kPointerSizeLog2);
and_(ecx, (1 << Bitmap::kBitsPerCellLog2) - 1);
mov(mask_reg, Immediate(1));
shl_cl(mask_reg);
}
void MacroAssembler::JumpIfWhite(Register value, Register bitmap_scratch,
Register mask_scratch, Label* value_is_white,
Label::Distance distance) {
DCHECK(!AreAliased(value, bitmap_scratch, mask_scratch, ecx));
GetMarkBits(value, bitmap_scratch, mask_scratch);
// If the value is black or grey we don't need to do anything.
DCHECK(strcmp(Marking::kWhiteBitPattern, "00") == 0);
DCHECK(strcmp(Marking::kBlackBitPattern, "11") == 0);
DCHECK(strcmp(Marking::kGreyBitPattern, "10") == 0);
DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0);
// Since both black and grey have a 1 in the first position and white does
// not have a 1 there we only need to check one bit.
test(mask_scratch, Operand(bitmap_scratch, MemoryChunk::kHeaderSize));
j(zero, value_is_white, Label::kNear);
}
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
mov(dst, FieldOperand(map, Map::kBitField3Offset));
and_(dst, Immediate(Map::EnumLengthBits::kMask));
SmiTag(dst);
}
void MacroAssembler::CheckEnumCache(Label* call_runtime) {
Label next, start;
mov(ecx, eax);
// Check if the enum length field is properly initialized, indicating that
// there is an enum cache.
mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
EnumLength(edx, ebx);
cmp(edx, Immediate(Smi::FromInt(kInvalidEnumCacheSentinel)));
j(equal, call_runtime);
jmp(&start);
bind(&next);
mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
// For all objects but the receiver, check that the cache is empty.
EnumLength(edx, ebx);
cmp(edx, Immediate(Smi::FromInt(0)));
j(not_equal, call_runtime);
bind(&start);
// Check that there are no elements. Register rcx contains the current JS
// object we've reached through the prototype chain.
Label no_elements;
mov(ecx, FieldOperand(ecx, JSObject::kElementsOffset));
cmp(ecx, isolate()->factory()->empty_fixed_array());
j(equal, &no_elements);
// Second chance, the object may be using the empty slow element dictionary.
cmp(ecx, isolate()->factory()->empty_slow_element_dictionary());
j(not_equal, call_runtime);
bind(&no_elements);
mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset));
cmp(ecx, isolate()->factory()->null_value());
j(not_equal, &next);
}
void MacroAssembler::TestJSArrayForAllocationMemento(
Register receiver_reg,
Register scratch_reg,
Label* no_memento_found) {
Label map_check;
Label top_check;
ExternalReference new_space_allocation_top =
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
// Bail out if the object is not in new space.
JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
lea(scratch_reg, Operand(receiver_reg, kMementoEndOffset));
xor_(scratch_reg, Operand::StaticVariable(new_space_allocation_top));
test(scratch_reg, Immediate(~Page::kPageAlignmentMask));
j(zero, &top_check);
// The object is on a different page than allocation top. Bail out if the
// object sits on the page boundary as no memento can follow and we cannot
// touch the memory following it.
lea(scratch_reg, Operand(receiver_reg, kMementoEndOffset));
xor_(scratch_reg, receiver_reg);
test(scratch_reg, Immediate(~Page::kPageAlignmentMask));
j(not_zero, no_memento_found);
// Continue with the actual map check.
jmp(&map_check);
// If top is on the same page as the current object, we need to check whether
// we are below top.
bind(&top_check);
lea(scratch_reg, Operand(receiver_reg, kMementoEndOffset));
cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top));
j(greater, no_memento_found);
// Memento map check.
bind(&map_check);
mov(scratch_reg, Operand(receiver_reg, kMementoMapOffset));
cmp(scratch_reg, Immediate(isolate()->factory()->allocation_memento_map()));
}
void MacroAssembler::JumpIfDictionaryInPrototypeChain(
Register object,
Register scratch0,
Register scratch1,
Label* found) {
DCHECK(!scratch1.is(scratch0));
Factory* factory = isolate()->factory();
Register current = scratch0;
Label loop_again, end;
// scratch contained elements pointer.
mov(current, object);
mov(current, FieldOperand(current, HeapObject::kMapOffset));
mov(current, FieldOperand(current, Map::kPrototypeOffset));
cmp(current, Immediate(factory->null_value()));
j(equal, &end);
// Loop based on the map going up the prototype chain.
bind(&loop_again);
mov(current, FieldOperand(current, HeapObject::kMapOffset));
STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE);
STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE);
CmpInstanceType(current, JS_OBJECT_TYPE);
j(below, found);
mov(scratch1, FieldOperand(current, Map::kBitField2Offset));
DecodeField<Map::ElementsKindBits>(scratch1);
cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
j(equal, found);
mov(current, FieldOperand(current, Map::kPrototypeOffset));
cmp(current, Immediate(factory->null_value()));
j(not_equal, &loop_again);
bind(&end);
}
void MacroAssembler::TruncatingDiv(Register dividend, int32_t divisor) {
DCHECK(!dividend.is(eax));
DCHECK(!dividend.is(edx));
base::MagicNumbersForDivision<uint32_t> mag =
base::SignedDivisionByConstant(static_cast<uint32_t>(divisor));
mov(eax, Immediate(mag.multiplier));
imul(dividend);
bool neg = (mag.multiplier & (static_cast<uint32_t>(1) << 31)) != 0;
if (divisor > 0 && neg) add(edx, dividend);
if (divisor < 0 && !neg && mag.multiplier > 0) sub(edx, dividend);
if (mag.shift > 0) sar(edx, mag.shift);
mov(eax, dividend);
shr(eax, 31);
add(edx, eax);
}
} // namespace internal
} // namespace v8
#endif // V8_TARGET_ARCH_IA32
|
; A037578: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 1,3.
; 1,9,55,333,1999,11997,71983,431901,2591407,15548445,93290671,559744029,3358464175,20150785053,120904710319,725428261917,4352569571503,26115417429021,156692504574127,940155027444765,5640930164668591,33845580988011549,203073485928069295,1218440915568415773,7310645493410494639,43863872960462967837,263183237762777807023,1579099426576666842141,9474596559460001052847,56847579356760006317085,341085476140560037902511,2046512856843360227415069,12279077141060161364490415,73674462846360968186942493,442046777078165809121654959,2652280662468994854729929757,15913683974813969128379578543,95482103848883814770277471261,572892623093302888621664827567,3437355738559817331729988965405,20624134431358903990379933792431,123744806588153423942279602754589,742468839528920543653677616527535,4454813037173523261922065699165213,26728878223041139571532394194991279,160373269338246837429194365169947677,962239616029481024575166191019686063
add $0,4
mov $1,6
pow $1,$0
div $1,7
lpb $0
mov $0,$2
div $1,4
lpe
div $1,60
mul $1,2
add $1,1
mov $0,$1
|
;******************************************************************************
;* FD_ADD32.ASM - 32 BIT STATE - *
;* *
;* Copyright (c) 1996 Texas Instruments Incorporated *
;* http://www.ti.com/ *
;* *
;* 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 Texas Instruments Incorporated 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 *
;* OWNER 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. *
;* *
;******************************************************************************
;*****************************************************************************
;* FD_ADD/FD_SUB - ADD / SUBTRACT TWO IEEE 754 FORMAT DOUBLE PRECISION FLOATING
;* POINT NUMBERS.
;*****************************************************************************
;*
;* o INPUT OP1 IS IN r0:r1
;* o INPUT OP2 IS IN r2:r3
;* o RESULT IS RETURNED IN r0:r1
;* o INPUT OP2 IN r2:r3 IS PRESERVED
;*
;* o SUBTRACTION, OP1 - OP2, IS IMPLEMENTED WITH ADDITION, OP1 + (-OP2)
;* o SIGNALLING NOT-A-NUMBER (SNaN) AND QUIET NOT-A-NUMBER (QNaN)
;* ARE TREATED AS INFINITY
;* o OVERFLOW RETURNS +/- INFINITY
;* (0x7ff00000:00000000) or (0xfff00000:00000000)
;* o DENORMALIZED NUMBERS ARE TREATED AS UNDERFLOWS
;* o UNDERFLOW RETURNS ZERO (0x00000000:00000000)
;* o ROUNDING MODE: ROUND TO NEAREST (TIE TO EVEN)
;*
;* o IF OPERATION INVOLVES INFINITY AS AN INPUT, THE FOLLOWING SUMMARIZES
;* THE RESULT:
;* +----------+----------+----------+
;* ADDITION + OP2 !INF | OP2 -INF + OP2 +INF +
;* +----------+==========+==========+==========+
;* + OP1 !INF + - | -INF + +INF +
;* +----------+----------+----------+----------+
;* + OP1 -INF + -INF | -INF + -INF +
;* +----------+----------+----------+----------+
;* + OP1 +INF + +INF | +INF + +INF +
;* +----------+----------+----------+----------+
;*
;* +----------+----------+----------+
;* SUBTRACTION + OP2 !INF | OP2 -INF + OP2 +INF +
;* +----------+==========+==========+==========+
;* + OP1 !INF + - | +INF + -INF +
;* +----------+----------+----------+----------+
;* + OP1 -INF + -INF | -INF + -INF +
;* +----------+----------+----------+----------+
;* + OP1 +INF + +INF | +INF + +INF +
;* +----------+----------+----------+----------+
;*
;****************************************************************************
;*
;* +------------------------------------------------------------------+
;* | DOUBLE PRECISION FLOATING POINT FORMAT |
;* | 64-bit representation |
;* | 31 30 20 19 0 |
;* | +-+----------+---------------------+ |
;* | |S| E | M1 | |
;* | +-+----------+---------------------+ |
;* | |
;* | 31 0 |
;* | +----------------------------------+ |
;* | | M2 | |
;* | +----------------------------------+ |
;* | |
;* | <S> SIGN FIELD : 0 - POSITIVE VALUE |
;* | 1 - NEGATIVE VALUE |
;* | |
;* | <E> EXPONENT FIELD: 0000000000 - ZERO IFF M == 0 |
;* | 0000000001..1111111110 - EXPONENT VALUE(1023 BIAS) |
;* | 1111111111 - INFINITY |
;* | |
;* | <M1:M2> MANTISSA FIELDS: FRACTIONAL MAGNITUDE WITH IMPLIED 1 |
;* +------------------------------------------------------------------+
;*
;****************************************************************************
.arm
.if __TI_EABI_ASSEMBLER ; ASSIGN EXTERNAL NAMES BASED ON
.asg __aeabi_dadd, __TI_FD_ADD ; RTS BEING BUILT
.asg __aeabi_dsub, __TI_FD_SUB
.else
.clink
.asg FD_ADD, __TI_FD_ADD
.asg FD_SUB, __TI_FD_SUB
.endif
.global __TI_FD_ADD
.global __TI_FD_SUB
.if .TMS470_BIG_DOUBLE
rp1_hi .set r0 ; High word of regpair 1
rp1_lo .set r1 ; Low word of regpair 1
rp2_hi .set r2 ; High word of regpair 2
rp2_lo .set r3 ; Low word of regpair 2
.else
rp1_hi .set r1 ; High word of regpair 1
rp1_lo .set r0 ; Low word of regpair 1
rp2_hi .set r3 ; High word of regpair 2
rp2_lo .set r2 ; Low word of regpair 2
.endif
op1m1 .set r4
op1m2 .set r5
op1e .set r6
op2m1 .set r7
op2m2 .set r8
op2e .set r9
shift .set r10
sticky .set r11
tmp .set lr
.if __TI_ARM9ABI_ASSEMBLER | __TI_EABI_ASSEMBLER
.armfunc __TI_FD_SUB, __TI_FD_ADD
.endif
__TI_FD_SUB: .asmfunc stack_usage(40)
STMFD sp!, {r2-r11, lr}
EOR rp2_hi, rp2_hi, #0x80000000 ; NEGATE SECOND OPERAND
B _start
__TI_FD_ADD:
STMFD sp!, {r2-r11, lr}
_start: MOV op2m1, rp2_hi, LSL #12 ; BUILD INPUT #2 MANTISSA
MOV op2m1, op2m1, LSR #3
ORR op2m1, op2m1, rp2_lo, LSR #23
MOV op2m2, rp2_lo, LSL #9
MOV op2e, rp2_hi, LSL #1 ; BUILD INPUT #2 EXPONENT
MOVS op2e, op2e, LSR #21
BNE $1
ORR tmp, op2m1, op2m2 ; IF DENORMALIZED NUMBER (op2m != 0 AND
MOVNE rp1_hi, #0 ; op2e == 0), THEN UNDERFLOW
MOVNE rp1_lo, #0 ;
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc} ; ELSE IT IS ZERO SO RETURN INPUT #1
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
$1: ORR op2m1, op2m1, #0x20000000 ; SET IMPLIED ONE IN MANTISSA
MOV shift, #0x700 ; INITIALIZE shift WITH 0x7FF
ADD shift, shift, #0xFF
CMP op2e, shift ; IF op2e==0x7FF, THEN OVERFLOW
BNE $2
MOV rp1_lo, #0
MOV rp1_hi, rp2_hi, LSR #20
MOV rp1_hi, rp1_hi, LSL #20
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc}
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
$2: CMP rp2_hi, #0
BPL $3 ; IF INPUT #2 IS NEGATIVE,
RSBS op2m2, op2m2, #0 ; THEN NEGATE THE MANTISSA
RSC op2m1, op2m1, #0
$3: MOV op1m1, rp1_hi, LSL #12 ; BUILD INPUT #1 MANTISSA
MOV op1m1, op1m1, LSR #3
ORR op1m1, op1m1, rp1_lo, LSR #23
MOV op1m2, rp1_lo, LSL #9
MOV op1e, rp1_hi, LSL #1 ; BUILD INPUT #1 EXPONENT
MOVS op1e, op1e, LSR #21
BNE $4
ORR tmp, op1m1, op1m2 ; IF DENORMALIZED NUMBER
MOVNE rp1_hi, #0 ; (op1m != 0 AND op1e == 0),
MOVNE rp1_lo, #0 ; THEN UNDERFLOW
MOVEQ rp1_hi, rp2_hi ; ELSE IT IS ZERO SO RETURN
MOVEQ rp1_lo, rp2_lo ; INPUT #2
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc}
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
$4: ORR op1m1, op1m1, #0x20000000 ; SET IMPLIED ONE IN MANTISSA
CMP op1e, shift ; IF op1e==0x7FF, THEN OVERFLOW
BNE $5
MOV rp1_lo, #0
MOV rp1_hi, rp1_hi, LSR #20
MOV rp1_hi, rp1_hi, LSL #20
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc}
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
$5: CMP rp1_hi, #0
BPL $6 ; IF INPUT #1 IS NEGATIVE,
RSBS op1m2, op1m2, #0 ; THEN NEGATE THE MANTISSA
RSC op1m1, op1m1, #0
$6: SUBS shift, op1e, op2e ; GET THE SHIFT AMOUNT
BPL $7
MOV tmp, op1m1 ; IF THE SHIFT AMOUNT IS NEGATIVE, THEN
MOV op1m1, op2m1 ; SWAP THE TWO MANTISSA SO THAT op1m
MOV op2m1, tmp ; CONTAINS THE LARGER VALUE,
MOV tmp, op1m2
MOV op1m2, op2m2
MOV op2m2, tmp
RSB shift, shift, #0 ; AND NEGATE THE SHIFT AMOUNT,
MOV op1e, op2e ; AND ENSURE THE LARGER EXP. IS IN op1e
$7: CMP shift, #54 ; IF THE SECOND MANTISSA IS SIGNIFICANT,
MOVPL sticky, #0
BPL no_add
CMP shift, #0 ; ADJUST THE SECOND MANTISSA, BASED
MOVEQ sticky, #0
BEQ no_sft ; UPON ITS EXPONENT.
RSB tmp, shift, #57 ; CALCULATE STICKY BIT
SUBS op2e, tmp, #32 ; PERFORM LONG LONG LSL BY tmp
MOVCS sticky, op2m2, LSL op2e ; WE DON'T CARE ABOUT THE ACTUAL RESULT
MOVCC sticky, op2m1, LSL tmp
ORRCC sticky, sticky, op2m2 ; ALL OF OP2M2 IS INCLUDED IN STICKY
RSBS tmp, shift, #32 ; tmp := 32 - shift
MOV tmp, op2m1, LSL tmp ; set tmp to op2m1 shifted left by 32 - _shift_ places
MOVCC tmp, op2m1
MOV op2m1, op2m1, ASR shift ;
MOV op2m2, op2m2, LSR shift ;
SUBCC shift, shift, #32 ; used for overflow
MOVCC op2m2, tmp, ASR shift
ADDCS op2m2, op2m2, tmp ; op2m2 is zero everywhere tmp isn't and vice versa
no_sft: ADDS op1m2, op1m2, op2m2 ; ADD IT TO THE FIRST MANTISSA
ADCS op1m1, op1m1, op2m1 ;
no_add: ORRS tmp, op1m1, op1m2 ;
MOVEQ rp1_hi, #0 ; IF THE RESULT IS ZERO,
MOVEQ rp1_lo, #0 ;
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMEQFD sp!, {r2-r11, pc} ; THEN UNDERFLOW
.else
LDMEQFD sp!, {r2-r11, lr}
BXEQ lr
.endif
CMP op1m1, #0 ;
MOVPL tmp, #0x0 ; IF THE RESULT IS POSITIVE, NOTE SIGN
BPL nloop ;
MOV tmp, #0x1 ; IF THE RESULT IS NEGATIVE, THEN
RSBS op1m2, op1m2, #0x0 ; NOTE THE SIGN AND
RSC op1m1, op1m1, #0x0 ; NEGATE THE RESULT
nloop: MOVS op1m2, op1m2, LSL #1 ; NORMALIZE THE RESULTING MANTISSA
ADCS op1m1, op1m1, op1m1 ;
SUB op1e, op1e, #1 ; ADJUSTING THE EXPONENT AS NECESSARY
BPL nloop ;
ANDS shift, op1m2, #0x400 ; GUARD BIT
BEQ no_round ; IF GUARD BIT 0, DO NOT ROUND
AND op2e, op1m2, #0x100 ; IF RESULT REQUIRED NORMALIZATION
ORR sticky, sticky, op2e ; BIT 26 MUST BE ADDED TO STICKY
ADDS op1m2, op1m2, #0x400 ; ROUND THE MANTISSA TO THE NEAREST
ADCS op1m1, op1m1, #0 ;
ADDCS op1e, op1e, #1 ; ADJUST EXPONENT IF AN OVERFLOW OCCURS
BCS ovfl ; IF OVERFLOW, RESULT IS ALREADY EVEN
AND op2e, op1m2, #0x200 ; GET ROUND BIT
ORRS sticky, sticky, op2e ; (ROUND + STICKY)
; IF (ROUND + STICKY) == 0
BICEQ op1m2, op1m2, #0x800 ; WE HAVE A TIE, ROUND TO EVEN
no_round:
BIC op1m2, op1m2, #0x700 ; CLEAR GUARD, ROUND, AND STICKY BITS
MOVS op1m2, op1m2, LSL #1 ; REMOVE THE IMPLIED ONE
ADC op1m1, op1m1, op1m1 ;
ovfl: ADDS op1e, op1e, #2 ; NORMALIZE THE EXPONENT
MOVLE rp1_hi, #0 ; CHECK FOR UNDERFLOW
MOVLE rp1_lo, #0 ;
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMLEFD sp!, {r2-r11, pc} ;
.else
LDMLEFD sp!, {r2-r11, lr}
BXLE lr
.endif
MOV shift, #0x700 ;
ADD shift, shift, #0xFF ;
CMP op1e, shift ; CHECK FOR OVERFLOW
BCC $9
MOV rp1_lo, #0 ;
AND rp2_hi, rp2_hi, #0x80000000
MOV rp1_hi, #0xFF
MOV rp1_hi, rp1_hi, LSL #3
ADD rp1_hi, rp1_hi, #7
MOV rp1_hi, rp1_hi, LSL #20
ORR rp1_hi, rp1_hi, rp2_hi
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc}
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
$9: MOV op2m1, op1m1, LSL #20 ; REPACK THE MANTISSA INTO
ORR rp1_lo, op2m1, op1m2, LSR #12 ; rp1_hi:rp1_lo
MOV rp1_hi, op1m1, LSR #12 ;
ORR rp1_hi, rp1_hi, op1e, LSL #20 ; REPACK THE EXPONENT INTO rp1_hi
ORR rp1_hi, rp1_hi, tmp, LSL #31 ; REPACK THE SIGN INTO rp1_hi
.if __TI_ARM7ABI_ASSEMBLER | __TI_ARM9ABI_ASSEMBLER | !__TI_TMS470_V4__
LDMFD sp!, {r2-r11, pc}
.else
LDMFD sp!, {r2-r11, lr}
BX lr
.endif
.endasmfunc
.end
|
#include "decrypt.h"
#include "dfa.h"
#include "encrypt.h"
#include <algorithm>
#include <chrono>
#include <fstream>
#include <iostream>
#include <optional>
#include <string>
#include <vector>
namespace
{
enum class Mode
{
Encrypt,
Decrypt
};
enum class Type
{
Round8,
Round9
};
std::optional<std::vector<u128>> readFaults(const std::string& path)
{
std::ifstream file{ path };
if (!file.is_open())
{
std::cerr << "error opening file \"" << path << "\" for reading." << std::endl;
return {};
}
std::vector<u128> faults;
std::string line;
while (std::getline(file, line))
{
std::array<uint8_t, 16> binaryData = { 0 };
auto nibblesRead = 0;
for (auto c : line)
{
c = toupper(c);
if (isspace(c))
{
continue;
}
if (nibblesRead == binaryData.size() * 2)
{
std::cerr << "too many characters to form 128 bit hexadecimal fault. "
"Unexpected character:\""
<< c << "\"" << std::endl;
return {};
}
constexpr std::array hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
const auto it = std::find(hexDigits.begin(), hexDigits.end(), c);
if (it == hexDigits.end())
{
std::cerr << "unrecognised hex character \"" << c << "\" found in file."
<< std::endl;
return {};
}
const auto value = std::distance(hexDigits.begin(), it);
binaryData[nibblesRead / 2] |= (nibblesRead % 2) ? (value) : (value << 4);
nibblesRead++;
}
faults.push_back(binaryData);
}
return faults;
}
template<typename DFA>
struct SolveR8
{
static constexpr auto solve = solve_r8<DFA>;
};
template<typename DFA>
struct SolveR9
{
static constexpr auto solve = solve_r9<DFA>;
};
template<typename Solver>
std::optional<u128> solve(const std::vector<u128>& faults)
{
for (auto& ref : faults)
{
auto solution = Solver::solve(faults, ref);
if (solution)
{
return solution;
}
}
return {};
}
template<typename DFA>
std::optional<u128> solve(Type type, const std::vector<u128>& faults)
{
switch (type)
{
case Type::Round8:
return solve<SolveR8<DFA>>(faults);
case Type::Round9:
return solve<SolveR9<DFA>>(faults);
}
}
std::optional<u128> solve(Mode mode, Type type, const std::vector<u128>& faults)
{
switch (mode)
{
case Mode::Encrypt:
return solve<EncryptDFA>(type, faults);
case Mode::Decrypt:
return solve<DecryptDFA>(type, faults);
}
}
}
int main(int argc, char* argv[])
{
if (argc != 3 && argc != 4)
{
std::cerr << "usage: dfatool --encrypt/--decrypt [--r8/--r9] file" << std::endl;
return 1;
}
std::string modeStr{ argv[1] };
std::string typeStr{ argc == 4 ? argv[2] : "--r8" };
std::string filePath{ argv[argc - 1] };
Mode mode{ Mode::Encrypt };
if (modeStr == "--encrypt")
{
mode = Mode::Encrypt;
}
else if (modeStr == "--decrypt")
{
mode = Mode::Decrypt;
}
else
{
std::cerr << "missing DFA encryption mode. use \"--encrypt\" or \"--decrypt\"" << std::endl;
return 1;
}
Type type{ Type::Round8 };
if (typeStr == "--r8")
{
type = Type::Round8;
}
else if (typeStr == "--r9")
{
type = Type::Round9;
}
else
{
std::cerr << "missing DFA fault type. use \"--r8\" or \"--r9\"" << std::endl;
return 1;
}
const auto faults = readFaults(filePath);
if (!faults)
{
return 1;
}
std::chrono::time_point<std::chrono::system_clock> start, end;
start = std::chrono::system_clock::now();
auto solution = solve(mode, type, faults.value());
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end - start;
if (solution)
{
std::cout << "Found key: " << std::uppercase << std::hex << solution.value() << std::endl;
}
else
{
std::cout << "failed: could not find a key" << std::endl;
}
std::cout << "elapsed time: " << elapsed_seconds.count() << "s" << std::endl;
}
|
; A264129: Number of (n+1) X (4+1) arrays of permutations of 0..n*5+4 with each element having index change +-(.,.) 0,0 0,2 or 1,2.
; 80,1040,13600,178000,2330000,30500000,399250000,5226250000,68412500000,895531250000,11722656250000,153451562500000,2008707031250000,26294316406250000,344197070312500000,4505598144531250000,58979045410156250000,772045727539062500000,10106209777832031250000,132292003479003906250000,1731724807739257812500000,22668572029113769531250000,296735460243225097656250000,3884317602920532226562500000,50846377537727355957031250000,665587722992897033691406250000,8712656406450271606445312500000,114050153021931648254394531250000,1492935885167717933654785156250000,19542784451967477798461914062500000,255818369650319218635559082031250000
mov $2,$0
add $2,1
mov $0,$2
mul $0,2
seq $0,153365 ; Number of zig-zag paths from top to bottom of a rectangle of width 9 with 2n rows whose color is that of the top right corner.
div $0,4
mul $0,2
div $0,50
mul $0,80
|
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from yaml-test.djinni
#pragma once
#include "djinni_wasm.hpp"
#include "extern_interface_2.hpp"
namespace djinni_generated {
struct NativeExternInterface2 : ::djinni::JsInterface<::ExternInterface2, NativeExternInterface2> {
using CppType = std::shared_ptr<::ExternInterface2>;
using CppOptType = std::shared_ptr<::ExternInterface2>;
using JsType = em::val;
using Boxed = NativeExternInterface2;
static CppType toCpp(JsType j) { return _fromJs(j); }
static JsType fromCppOpt(const CppOptType& c) { return {_toJs(c)}; }
static JsType fromCpp(const CppType& c) { return fromCppOpt(c); }
struct JsProxy: ::djinni::JsProxyBase, ::ExternInterface2, ::djinni::InstanceTracker<JsProxy> {
JsProxy(const em::val& v) : JsProxyBase(v) {}
::ExternRecordWithDerivings foo(const std::shared_ptr<::testsuite::TestHelpers> & i) override;
};
};
} // namespace djinni_generated
|
bits 16 ; 16 bit mode
org 0x7c00 ;get output at offset 0x7c00
boot:
mov si, hello ;point si register to hello label memory location
mov ah, 0x0e ;0x0e means 'Write Character in TTY mode';
.loop:
lodsb
or al, al ; al == 0 ?
jz halt ; if al==0 jump halt label
int 0x10 ;runs BIOS interrupt 0x10 - Video Services
jmp .loop
halt:
cli ;clear interrupt flag
hlt ;halt execution
hello: db "First Write a Simple Bootloader!",0
times 510 - ($-$$) db 0 ; pad remiaing 510 bytes with zeros
dw 0xaa55 ;mark this 512 bytes sector
|
; A241678: 2^p - 5 where p is prime.
; -1,3,27,123,2043,8187,131067,524283,8388603,536870907,2147483643,137438953467,2199023255547,8796093022203,140737488355323,9007199254740987,576460752303423483,2305843009213693947,147573952589676412923,2361183241434822606843,9444732965739290427387,604462909807314587353083,9671406556917033397649403,618970019642690137449562107,158456325028528675187087900667,2535301200456458802993406410747,10141204801825835211973625643003,162259276829213363391578010288123,649037107316853453566312041152507
seq $0,6005 ; The odd prime numbers together with 1.
max $0,2
mov $2,2
pow $2,$0
mov $0,$2
sub $0,5
|
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.00.23506.0
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC __local_stdio_printf_options
PUBLIC _vfprintf_l
PUBLIC printf
PUBLIC func
PUBLIC main
PUBLIC ??_C@_0BA@NNIFAFEJ@?$CFd?5?$CFd?5?$CFd?5?$CFd?5?$CFs?6?$AA@ ; `string'
EXTRN __imp___acrt_iob_func:PROC
EXTRN __imp___stdio_common_vfprintf:PROC
EXTRN gets:PROC
_DATA SEGMENT
COMM ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9:QWORD ; `__local_stdio_printf_options'::`2'::_OptionsStorage
_DATA ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_vfprintf_l DD imagerel $LN4
DD imagerel $LN4+81
DD imagerel $unwind$_vfprintf_l
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$printf DD imagerel $LN4
DD imagerel $LN4+66
DD imagerel $unwind$printf
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$func DD imagerel $LN4
DD imagerel $LN4+95
DD imagerel $unwind$func
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$main DD imagerel $LN4
DD imagerel $LN4+32
DD imagerel $unwind$main
pdata ENDS
; COMDAT ??_C@_0BA@NNIFAFEJ@?$CFd?5?$CFd?5?$CFd?5?$CFd?5?$CFs?6?$AA@
CONST SEGMENT
??_C@_0BA@NNIFAFEJ@?$CFd?5?$CFd?5?$CFd?5?$CFd?5?$CFs?6?$AA@ DB '%d %d %d '
DB '%d %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$main DD 010401H
DD 04204H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$func DD 081401H
DD 0c6414H
DD 0b5414H
DD 0a3414H
DD 070107214H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$printf DD 021901H
DD 030153219H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_vfprintf_l DD 081401H
DD 0a6414H
DD 095414H
DD 083414H
DD 070105214H
xdata ENDS
; Function compile flags: /Ogtpy
; File d:\projects\taintanalysis\antitaint\epilog\src\func-iparam-stdcall.c
; COMDAT main
_TEXT SEGMENT
main PROC ; COMDAT
; 23 : {
$LN4:
sub rsp, 40 ; 00000028H
; 24 : func(1, 2, 3, 4);
mov edx, 2
lea r9d, QWORD PTR [rdx+2]
lea r8d, QWORD PTR [rdx+1]
lea ecx, QWORD PTR [rdx-1]
call func
; 25 : return 0;
xor eax, eax
; 26 : }
add rsp, 40 ; 00000028H
ret 0
main ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File d:\projects\taintanalysis\antitaint\epilog\src\func-iparam-stdcall.c
; COMDAT func
_TEXT SEGMENT
buf$ = 48
param1$ = 80
param2$ = 88
param3$ = 96
param4$ = 104
func PROC ; COMDAT
; 16 : {
$LN4:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rbp
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 64 ; 00000040H
mov ebp, ecx
mov ebx, r9d
; 17 : char buf[8];
; 18 : gets(buf);
lea rcx, QWORD PTR buf$[rsp]
mov edi, r8d
mov esi, edx
call gets
; 19 : printf("%d %d %d %d %s\n", param1, param2, param3, param4, buf);
lea rax, QWORD PTR buf$[rsp]
mov r9d, edi
mov QWORD PTR [rsp+40], rax
lea rcx, OFFSET FLAT:??_C@_0BA@NNIFAFEJ@?$CFd?5?$CFd?5?$CFd?5?$CFd?5?$CFs?6?$AA@
mov r8d, esi
mov DWORD PTR [rsp+32], ebx
mov edx, ebp
call printf
; 20 : }
mov rbx, QWORD PTR [rsp+80]
mov rbp, QWORD PTR [rsp+88]
mov rsi, QWORD PTR [rsp+96]
add rsp, 64 ; 00000040H
pop rdi
ret 0
func ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\stdio.h
; COMDAT printf
_TEXT SEGMENT
_Format$ = 48
printf PROC ; COMDAT
; 950 : {
$LN4:
mov QWORD PTR [rsp+8], rcx
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+24], r8
mov QWORD PTR [rsp+32], r9
push rbx
sub rsp, 32 ; 00000020H
; 951 : int _Result;
; 952 : va_list _ArgList;
; 953 : __crt_va_start(_ArgList, _Format);
; 954 : _Result = _vfprintf_l(stdout, _Format, NULL, _ArgList);
mov ecx, 1
lea rbx, QWORD PTR _Format$[rsp+8]
call QWORD PTR __imp___acrt_iob_func
mov rdx, QWORD PTR _Format$[rsp]
mov r9, rbx
mov rcx, rax
xor r8d, r8d
call _vfprintf_l
; 955 : __crt_va_end(_ArgList);
; 956 : return _Result;
; 957 : }
add rsp, 32 ; 00000020H
pop rbx
ret 0
printf ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\stdio.h
; COMDAT _vfprintf_l
_TEXT SEGMENT
_Stream$ = 64
_Format$ = 72
_Locale$ = 80
_ArgList$ = 88
_vfprintf_l PROC ; COMDAT
; 638 : {
$LN4:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rbp
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 48 ; 00000030H
mov rbx, r9
mov rdi, r8
mov rsi, rdx
mov rbp, rcx
; 639 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList);
call __local_stdio_printf_options
mov r9, rdi
mov QWORD PTR [rsp+32], rbx
mov r8, rsi
mov rdx, rbp
mov rcx, QWORD PTR [rax]
call QWORD PTR __imp___stdio_common_vfprintf
; 640 : }
mov rbx, QWORD PTR [rsp+64]
mov rbp, QWORD PTR [rsp+72]
mov rsi, QWORD PTR [rsp+80]
add rsp, 48 ; 00000030H
pop rdi
ret 0
_vfprintf_l ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_stdio_config.h
; COMDAT __local_stdio_printf_options
_TEXT SEGMENT
__local_stdio_printf_options PROC ; COMDAT
; 74 : static unsigned __int64 _OptionsStorage;
; 75 : return &_OptionsStorage;
lea rax, OFFSET FLAT:?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage
; 76 : }
ret 0
__local_stdio_printf_options ENDP
_TEXT ENDS
END
|
#include <cstdio>
#include <vector>
#include <cstring>
#define MAXV 1000
using namespace std;
typedef vector <int> vi;
// Assuming vertices are labeled 0...V-1
vi G[MAXV], Grev[MAXV];
bool explored[MAXV];
int leader[MAXV], finish[MAXV], order[MAXV], t = -1, parent = 0, V, E;
// running DFS on the reverse graph
void dfs_reverse(int i) {
explored[i] = true;
for(vi::iterator it = Grev[i].begin(); it != Grev[i].end(); it++)
if(!explored[*it])
dfs_reverse(*it);
t++;
finish[i] = t;
}
// running DFS on the actual graph
void dfs(int i) {
explored[i] = true;
leader[i] = parent;
for(vi::iterator it = G[i].begin(); it != G[i].end(); it++)
if(!explored[*it])
dfs(*it);
}
// check if u & v are in the same connected component
bool stronglyConnected(int u, int v) {
return leader[u] == leader[v];
}
int main() {
int i, u, v, countCC, Q;
//freopen("input.txt", "r", stdin);
scanf("%d %d", &V, &E); // Enter the number of vertices & edges
for(i=0; i<E; i++) { // Enter E edges : u -> v
scanf("%d %d", &u, &v);
G[u].push_back(v); // Insert into the adjacency list of the graph
Grev[v].push_back(u); // and the reverse graph
}
printf("Original graph :\n");
for(i=0; i<V; i++) {
if(!G[i].empty()) {
printf("%d : ", i);
for(vi::iterator it = G[i].begin(); it != G[i].end(); it++)
printf("%d ", *it);
printf("\n");
}
}
printf("Reverse graph :\n");
for(i=0; i<V; i++) {
if(!Grev[i].empty()) {
printf("%d : ", i);
for(vi::iterator it = Grev[i].begin(); it != Grev[i].end(); it++)
printf("%d ", *it);
printf("\n");
}
}
// run dfs on the reverse graph to get reverse postorder
memset(explored, false, V*sizeof(bool));
for(i=0; i<V; i++) {
if(!explored[i])
dfs_reverse(i);
order[finish[i]] = i;
}
// run dfs on the actual graph in reverse postorder
memset(explored, false, V*sizeof(bool));
countCC = 0;
for(i=V-1; i>=0; i--)
if(!explored[order[i]]) {
parent = order[i];
dfs(order[i]);
countCC++;
}
printf("No. of strongly connected components : %d\n", countCC);
scanf("%d", &Q); // Enter number of SCC queries
while(Q--) {
scanf("%d %d", &u, &v);
stronglyConnected(u, v) ? printf("YES\n") : printf("NO\n");
}
return 0;
} |
/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */
#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>
#include "vtkUnstructuredGridAlgorithmWrap.h"
#include "vtkThresholdWrap.h"
#include "vtkObjectBaseWrap.h"
#include "../../plus/plus.h"
using namespace v8;
extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkThresholdWrap::ptpl;
VtkThresholdWrap::VtkThresholdWrap()
{ }
VtkThresholdWrap::VtkThresholdWrap(vtkSmartPointer<vtkThreshold> _native)
{ native = _native; }
VtkThresholdWrap::~VtkThresholdWrap()
{ }
void VtkThresholdWrap::Init(v8::Local<v8::Object> exports)
{
Nan::SetAccessor(exports, Nan::New("vtkThreshold").ToLocalChecked(), ConstructorGetter);
Nan::SetAccessor(exports, Nan::New("Threshold").ToLocalChecked(), ConstructorGetter);
}
void VtkThresholdWrap::ConstructorGetter(
v8::Local<v8::String> property,
const Nan::PropertyCallbackInfo<v8::Value>& info)
{
InitPtpl();
info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}
void VtkThresholdWrap::InitPtpl()
{
if (!ptpl.IsEmpty()) return;
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
VtkUnstructuredGridAlgorithmWrap::InitPtpl( );
tpl->Inherit(Nan::New<FunctionTemplate>(VtkUnstructuredGridAlgorithmWrap::ptpl));
tpl->SetClassName(Nan::New("VtkThresholdWrap").ToLocalChecked());
tpl->InstanceTemplate()->SetInternalFieldCount(1);
Nan::SetPrototypeMethod(tpl, "AllScalarsOff", AllScalarsOff);
Nan::SetPrototypeMethod(tpl, "allScalarsOff", AllScalarsOff);
Nan::SetPrototypeMethod(tpl, "AllScalarsOn", AllScalarsOn);
Nan::SetPrototypeMethod(tpl, "allScalarsOn", AllScalarsOn);
Nan::SetPrototypeMethod(tpl, "GetAllScalars", GetAllScalars);
Nan::SetPrototypeMethod(tpl, "getAllScalars", GetAllScalars);
Nan::SetPrototypeMethod(tpl, "GetAttributeMode", GetAttributeMode);
Nan::SetPrototypeMethod(tpl, "getAttributeMode", GetAttributeMode);
Nan::SetPrototypeMethod(tpl, "GetAttributeModeAsString", GetAttributeModeAsString);
Nan::SetPrototypeMethod(tpl, "getAttributeModeAsString", GetAttributeModeAsString);
Nan::SetPrototypeMethod(tpl, "GetComponentMode", GetComponentMode);
Nan::SetPrototypeMethod(tpl, "getComponentMode", GetComponentMode);
Nan::SetPrototypeMethod(tpl, "GetComponentModeAsString", GetComponentModeAsString);
Nan::SetPrototypeMethod(tpl, "getComponentModeAsString", GetComponentModeAsString);
Nan::SetPrototypeMethod(tpl, "GetComponentModeMaxValue", GetComponentModeMaxValue);
Nan::SetPrototypeMethod(tpl, "getComponentModeMaxValue", GetComponentModeMaxValue);
Nan::SetPrototypeMethod(tpl, "GetComponentModeMinValue", GetComponentModeMinValue);
Nan::SetPrototypeMethod(tpl, "getComponentModeMinValue", GetComponentModeMinValue);
Nan::SetPrototypeMethod(tpl, "GetLowerThreshold", GetLowerThreshold);
Nan::SetPrototypeMethod(tpl, "getLowerThreshold", GetLowerThreshold);
Nan::SetPrototypeMethod(tpl, "GetOutputPointsPrecision", GetOutputPointsPrecision);
Nan::SetPrototypeMethod(tpl, "getOutputPointsPrecision", GetOutputPointsPrecision);
Nan::SetPrototypeMethod(tpl, "GetPointsDataType", GetPointsDataType);
Nan::SetPrototypeMethod(tpl, "getPointsDataType", GetPointsDataType);
Nan::SetPrototypeMethod(tpl, "GetSelectedComponent", GetSelectedComponent);
Nan::SetPrototypeMethod(tpl, "getSelectedComponent", GetSelectedComponent);
Nan::SetPrototypeMethod(tpl, "GetSelectedComponentMaxValue", GetSelectedComponentMaxValue);
Nan::SetPrototypeMethod(tpl, "getSelectedComponentMaxValue", GetSelectedComponentMaxValue);
Nan::SetPrototypeMethod(tpl, "GetSelectedComponentMinValue", GetSelectedComponentMinValue);
Nan::SetPrototypeMethod(tpl, "getSelectedComponentMinValue", GetSelectedComponentMinValue);
Nan::SetPrototypeMethod(tpl, "GetUpperThreshold", GetUpperThreshold);
Nan::SetPrototypeMethod(tpl, "getUpperThreshold", GetUpperThreshold);
Nan::SetPrototypeMethod(tpl, "GetUseContinuousCellRange", GetUseContinuousCellRange);
Nan::SetPrototypeMethod(tpl, "getUseContinuousCellRange", GetUseContinuousCellRange);
Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);
Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);
Nan::SetPrototypeMethod(tpl, "SetAllScalars", SetAllScalars);
Nan::SetPrototypeMethod(tpl, "setAllScalars", SetAllScalars);
Nan::SetPrototypeMethod(tpl, "SetAttributeMode", SetAttributeMode);
Nan::SetPrototypeMethod(tpl, "setAttributeMode", SetAttributeMode);
Nan::SetPrototypeMethod(tpl, "SetAttributeModeToDefault", SetAttributeModeToDefault);
Nan::SetPrototypeMethod(tpl, "setAttributeModeToDefault", SetAttributeModeToDefault);
Nan::SetPrototypeMethod(tpl, "SetAttributeModeToUseCellData", SetAttributeModeToUseCellData);
Nan::SetPrototypeMethod(tpl, "setAttributeModeToUseCellData", SetAttributeModeToUseCellData);
Nan::SetPrototypeMethod(tpl, "SetAttributeModeToUsePointData", SetAttributeModeToUsePointData);
Nan::SetPrototypeMethod(tpl, "setAttributeModeToUsePointData", SetAttributeModeToUsePointData);
Nan::SetPrototypeMethod(tpl, "SetComponentMode", SetComponentMode);
Nan::SetPrototypeMethod(tpl, "setComponentMode", SetComponentMode);
Nan::SetPrototypeMethod(tpl, "SetComponentModeToUseAll", SetComponentModeToUseAll);
Nan::SetPrototypeMethod(tpl, "setComponentModeToUseAll", SetComponentModeToUseAll);
Nan::SetPrototypeMethod(tpl, "SetComponentModeToUseAny", SetComponentModeToUseAny);
Nan::SetPrototypeMethod(tpl, "setComponentModeToUseAny", SetComponentModeToUseAny);
Nan::SetPrototypeMethod(tpl, "SetComponentModeToUseSelected", SetComponentModeToUseSelected);
Nan::SetPrototypeMethod(tpl, "setComponentModeToUseSelected", SetComponentModeToUseSelected);
Nan::SetPrototypeMethod(tpl, "SetOutputPointsPrecision", SetOutputPointsPrecision);
Nan::SetPrototypeMethod(tpl, "setOutputPointsPrecision", SetOutputPointsPrecision);
Nan::SetPrototypeMethod(tpl, "SetPointsDataType", SetPointsDataType);
Nan::SetPrototypeMethod(tpl, "setPointsDataType", SetPointsDataType);
Nan::SetPrototypeMethod(tpl, "SetPointsDataTypeToDouble", SetPointsDataTypeToDouble);
Nan::SetPrototypeMethod(tpl, "setPointsDataTypeToDouble", SetPointsDataTypeToDouble);
Nan::SetPrototypeMethod(tpl, "SetPointsDataTypeToFloat", SetPointsDataTypeToFloat);
Nan::SetPrototypeMethod(tpl, "setPointsDataTypeToFloat", SetPointsDataTypeToFloat);
Nan::SetPrototypeMethod(tpl, "SetSelectedComponent", SetSelectedComponent);
Nan::SetPrototypeMethod(tpl, "setSelectedComponent", SetSelectedComponent);
Nan::SetPrototypeMethod(tpl, "SetUseContinuousCellRange", SetUseContinuousCellRange);
Nan::SetPrototypeMethod(tpl, "setUseContinuousCellRange", SetUseContinuousCellRange);
Nan::SetPrototypeMethod(tpl, "ThresholdBetween", ThresholdBetween);
Nan::SetPrototypeMethod(tpl, "thresholdBetween", ThresholdBetween);
Nan::SetPrototypeMethod(tpl, "ThresholdByLower", ThresholdByLower);
Nan::SetPrototypeMethod(tpl, "thresholdByLower", ThresholdByLower);
Nan::SetPrototypeMethod(tpl, "ThresholdByUpper", ThresholdByUpper);
Nan::SetPrototypeMethod(tpl, "thresholdByUpper", ThresholdByUpper);
Nan::SetPrototypeMethod(tpl, "UseContinuousCellRangeOff", UseContinuousCellRangeOff);
Nan::SetPrototypeMethod(tpl, "useContinuousCellRangeOff", UseContinuousCellRangeOff);
Nan::SetPrototypeMethod(tpl, "UseContinuousCellRangeOn", UseContinuousCellRangeOn);
Nan::SetPrototypeMethod(tpl, "useContinuousCellRangeOn", UseContinuousCellRangeOn);
#ifdef VTK_NODE_PLUS_VTKTHRESHOLDWRAP_INITPTPL
VTK_NODE_PLUS_VTKTHRESHOLDWRAP_INITPTPL
#endif
ptpl.Reset( tpl );
}
void VtkThresholdWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
if(!info.IsConstructCall())
{
Nan::ThrowError("Constructor not called in a construct call.");
return;
}
if(info.Length() == 0)
{
vtkSmartPointer<vtkThreshold> native = vtkSmartPointer<vtkThreshold>::New();
VtkThresholdWrap* obj = new VtkThresholdWrap(native);
obj->Wrap(info.This());
}
else
{
if(info[0]->ToObject() != vtkNodeJsNoWrap )
{
Nan::ThrowError("Parameter Error");
return;
}
}
info.GetReturnValue().Set(info.This());
}
void VtkThresholdWrap::AllScalarsOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->AllScalarsOff();
}
void VtkThresholdWrap::AllScalarsOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->AllScalarsOn();
}
void VtkThresholdWrap::GetAllScalars(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetAllScalars();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetAttributeMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetAttributeMode();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetAttributeModeAsString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
char const * r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetAttributeModeAsString();
info.GetReturnValue().Set(Nan::New(r).ToLocalChecked());
}
void VtkThresholdWrap::GetComponentMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetComponentMode();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetComponentModeAsString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
char const * r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetComponentModeAsString();
info.GetReturnValue().Set(Nan::New(r).ToLocalChecked());
}
void VtkThresholdWrap::GetComponentModeMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetComponentModeMaxValue();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetComponentModeMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetComponentModeMinValue();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetLowerThreshold(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
double r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetLowerThreshold();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetOutputPointsPrecision(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetOutputPointsPrecision();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetPointsDataType(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetPointsDataType();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetSelectedComponent(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetSelectedComponent();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetSelectedComponentMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetSelectedComponentMaxValue();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetSelectedComponentMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetSelectedComponentMinValue();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetUpperThreshold(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
double r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetUpperThreshold();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::GetUseContinuousCellRange(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
int r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->GetUseContinuousCellRange();
info.GetReturnValue().Set(Nan::New(r));
}
void VtkThresholdWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
vtkThreshold * r;
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->NewInstance();
VtkThresholdWrap::InitPtpl();
v8::Local<v8::Value> argv[1] =
{ Nan::New(vtkNodeJsNoWrap) };
v8::Local<v8::Function> cons =
Nan::New<v8::FunctionTemplate>(VtkThresholdWrap::ptpl)->GetFunction();
v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
VtkThresholdWrap *w = new VtkThresholdWrap();
w->native = r;
w->Wrap(wo);
info.GetReturnValue().Set(wo);
}
void VtkThresholdWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
{
VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
vtkThreshold * r;
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
r = native->SafeDownCast(
(vtkObjectBase *) a0->native.GetPointer()
);
VtkThresholdWrap::InitPtpl();
v8::Local<v8::Value> argv[1] =
{ Nan::New(vtkNodeJsNoWrap) };
v8::Local<v8::Function> cons =
Nan::New<v8::FunctionTemplate>(VtkThresholdWrap::ptpl)->GetFunction();
v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
VtkThresholdWrap *w = new VtkThresholdWrap();
w->native = r;
w->Wrap(wo);
info.GetReturnValue().Set(wo);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetAllScalars(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetAllScalars(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetAttributeMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetAttributeMode(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetAttributeModeToDefault(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetAttributeModeToDefault();
}
void VtkThresholdWrap::SetAttributeModeToUseCellData(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetAttributeModeToUseCellData();
}
void VtkThresholdWrap::SetAttributeModeToUsePointData(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetAttributeModeToUsePointData();
}
void VtkThresholdWrap::SetComponentMode(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetComponentMode(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetComponentModeToUseAll(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetComponentModeToUseAll();
}
void VtkThresholdWrap::SetComponentModeToUseAny(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetComponentModeToUseAny();
}
void VtkThresholdWrap::SetComponentModeToUseSelected(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetComponentModeToUseSelected();
}
void VtkThresholdWrap::SetOutputPointsPrecision(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetOutputPointsPrecision(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetPointsDataType(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetPointsDataType(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetPointsDataTypeToDouble(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetPointsDataTypeToDouble();
}
void VtkThresholdWrap::SetPointsDataTypeToFloat(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetPointsDataTypeToFloat();
}
void VtkThresholdWrap::SetSelectedComponent(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetSelectedComponent(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::SetUseContinuousCellRange(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsInt32())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->SetUseContinuousCellRange(
info[0]->Int32Value()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::ThresholdBetween(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsNumber())
{
if(info.Length() > 1 && info[1]->IsNumber())
{
if(info.Length() != 2)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->ThresholdBetween(
info[0]->NumberValue(),
info[1]->NumberValue()
);
return;
}
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::ThresholdByLower(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsNumber())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->ThresholdByLower(
info[0]->NumberValue()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::ThresholdByUpper(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() > 0 && info[0]->IsNumber())
{
if(info.Length() != 1)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->ThresholdByUpper(
info[0]->NumberValue()
);
return;
}
Nan::ThrowError("Parameter mismatch");
}
void VtkThresholdWrap::UseContinuousCellRangeOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->UseContinuousCellRangeOff();
}
void VtkThresholdWrap::UseContinuousCellRangeOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
VtkThresholdWrap *wrapper = ObjectWrap::Unwrap<VtkThresholdWrap>(info.Holder());
vtkThreshold *native = (vtkThreshold *)wrapper->native.GetPointer();
if(info.Length() != 0)
{
Nan::ThrowError("Too many parameters.");
return;
}
native->UseContinuousCellRangeOn();
}
|
; mmu-pages.asm
MMUTemp16 equ $
; PAGE 18 - BANK18.BIN - Daybreak Layer 2 (1/6)
org 0
dispto zeusmmu(18)
import_bin "..\banks\Bank18.bin"
; PAGE 19 - BANK19.BIN - Daybreak Layer 2 (2/6)
org 0
dispto zeusmmu(19)
import_bin "..\banks\Bank19.bin"
; PAGE 20 - BANK20.BIN - Daybreak Layer 2 (3/6)
org 0
dispto zeusmmu(20)
import_bin "..\banks\Bank20.bin"
; PAGE 21 - BANK21.BIN - Daybreak Layer 2 (4/6)
org 0
dispto zeusmmu(21)
import_bin "..\banks\Bank21.bin"
; PAGE 22 - BANK22.BIN - Daybreak Layer 2 (5/6)
org 0
dispto zeusmmu(22)
import_bin "..\banks\Bank22.bin"
; PAGE 23 - BANK23.BIN - Daybreak Layer 2 (36/6)
org 0
dispto zeusmmu(23)
import_bin "..\banks\Bank23.bin"
org MMUTemp16
disp 0
|
lc r4, 0x00000000
lc r5, 0x0000101f
lc r6, 0x00000000
tlbse r6, r4
lc r8, 0x40000000
lc r9, 0x0000101f
lc r10, 0x00000001
tlbse r10, r8
lc r11, 0xdeadbeef
lc r12, 0x00000002
lc r13, 0x00000002
st1 r11, r13, 0
halt
#@expected values
#r4 = 0x00000000
#r5 = 0x0000101f
#r6 = 0x00000000
#tlb 0:
# vpn = 0x00000
# os = 0x000
# ppn = 0x00001
# at = 0x01f
#r8 = 0x40000000
#r9 = 0x0000101f
#r10 = 0x00000001
#tlb 1:
# vpn = 0x40000
# os = 0x000
# ppn = 0x00001
# at = 0x01f
#r11 = 0xdeadbeef
#r12 = 0x00000002
#r13 = 0x00000002
#mem 0x00001002 = ef
#pc = 0x8000003c
|
; WARNING: THIS CODE IS EXTREMELY FRAGILE
macro copybin(source, length)
!copycount #= 0
while !copycount+3 < <length>
dd read4(pctosnes(<source>+!copycount))
!copycount #= !copycount+4
endif
while !copycount < <length>
db read1(pctosnes(<source>+!copycount))
!copycount #= !copycount+1
endif
endmacro
;@ pushpc
org $008901
LDA.b #SPCData : STA $00
LDA.b #SPCData>>8 : STA $01
LDA.b #SPCData>>16 : STA $02
;@ pullpc
SPCData:
;@ check bankcross off
%copybin($0C8000, $7BCA)
!SPCEngineStart = $0800
!SPCCodeStart = $07A7
dw ($0F9E+(!SPCEngineStart-!SPCCodeStart))
dw !SPCCodeStart
;@ pushpc
;@ pushbase
arch spc700
base !SPCCodeStart
org $34FBCE;-(!SPCEngineStart-!SPCCodeStart)
NewSPCCode:
SpecialCommand_Mute:
CMP A,#$F0 ; The thing we overwrote
BNE +
JMP $0A81 ; SilenceSong
+
CMP A,#$FA ; New mute command $FA
BNE +
MOV $F4,A
MOV A,#$00
MOV $0A4A,A ; $0A49: MOV A,#$70 -> MOV A,#$00
MOV $0AF3,A ; $0AF2: MOV $059,#$C0 -> MOV $059,#$00
MOV $0C32,A ; $0C32: MOVW $058,YA -> NOP #2
MOV $0C33,A
MOV A,#$C4 ; $0D19: MOVW $058,YA -> MOV A,$058
MOV $0D19,A
MOV A,#$58
MOV $0D1A,A
BRA +++
+
CMP A,#$FB ; New unmute command $FB
BEQ +
JMP $0A9D ; NewSongInput
+
MOV $F4,A
MOV A,#$70
MOV $0A4A,A ; $0A49: MOV A,#$70
MOV A,#$C0
MOV $0AF3,A ; $0AF2: MOV $059,#$C0
MOV A,#$DA
MOV $0C32,A ; $0C32: MOVW $058,YA
MOV $0D19,A ; $0D19: MOVW $058,YA
MOV A,#$58
MOV $0C33,A
MOV $0D1A,A
+++
CALL $0A81 ; SilenceSong
- : MOV A,$F4
BNE -
CMP A,$F4
BNE -
MOV $F4,$00
RET
org !SPCEngineStart
arch 65816
SPCEngineStart:
;@ pullbase
;@ pullpc
skip !SPCEngineStart-!SPCCodeStart
%copybin($0CFBCE, $57B2)
SPCEngineEnd:
;@ check bankcross on
; Change track 15 (unused) to point to 13 (Death Mountain) so dark woods can be track 15
; Bank 1
org $1A9F15 ; PC 0x0D1F15 ; SPC $D01C
dw #$2B00 ; Set track 15 pointer to track 13's data
; Bank 2
org $359F6E ; PC 0x1A9F6E ; SPC $D01C
dw #$2B00 ; Set track 15 pointer to track 13's data
arch spc700
org $34FE9A ; PC 0x1A7E9A ; SPC $0A73
JMP !SPCCodeStart : NOP
arch 65816
|
// Fill out your copyright notice in the Description page of Project Settings.
#include "CmdBlockedConstraint.h"
#include "UEPrototype.h"
bool UCmdBlockedConstraint::CheckConstraint(FActorConstraintInfo TargetInfo)
{
/* 제약 조건을 검사하기 위한 액터의 유효성을 검사합니다 */
if (IsValid(TargetInfo.Target) == false)
{
VP_LOG(Warning, TEXT("제약 조건을 확인하기 위한 액터가 유효하지 않습니다."));
return false;
}
/* 액터의 상태가 Blocked 상태이면 참을 반환합니다 */
if (TargetInfo.TargetState == EActorConstraintState::CSTR_Blocked)
{
return true;
}
return false;
} |
_sh: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
return 0;
}
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
static char buf[100];
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
11: eb 0e jmp 21 <main+0x21>
13: 90 nop
14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(fd >= 3){
18: 83 f8 02 cmp $0x2,%eax
1b: 0f 8f c9 00 00 00 jg ea <main+0xea>
{
static char buf[100];
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
21: 83 ec 08 sub $0x8,%esp
24: 6a 02 push $0x2
26: 68 11 12 00 00 push $0x1211
2b: e8 02 0d 00 00 call d32 <open>
30: 83 c4 10 add $0x10,%esp
33: 85 c0 test %eax,%eax
35: 79 e1 jns 18 <main+0x18>
37: eb 25 jmp 5e <main+0x5e>
39: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
40: 80 3d 22 18 00 00 20 cmpb $0x20,0x1822
47: 74 60 je a9 <main+0xa9>
49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
buf[strlen(buf)-1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
50: e8 1b 01 00 00 call 170 <fork1>
55: 85 c0 test %eax,%eax
57: 74 36 je 8f <main+0x8f>
runcmd(parsecmd(buf));
wait();
59: e8 9c 0c 00 00 call cfa <wait>
break;
}
}
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
5e: 83 ec 08 sub $0x8,%esp
61: 6a 64 push $0x64
63: 68 20 18 00 00 push $0x1820
68: e8 93 00 00 00 call 100 <getcmd>
6d: 83 c4 10 add $0x10,%esp
70: 85 c0 test %eax,%eax
72: 78 30 js a4 <main+0xa4>
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
74: 80 3d 20 18 00 00 63 cmpb $0x63,0x1820
7b: 75 d3 jne 50 <main+0x50>
7d: 80 3d 21 18 00 00 64 cmpb $0x64,0x1821
84: 74 ba je 40 <main+0x40>
buf[strlen(buf)-1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
86: e8 e5 00 00 00 call 170 <fork1>
8b: 85 c0 test %eax,%eax
8d: 75 ca jne 59 <main+0x59>
runcmd(parsecmd(buf));
8f: 83 ec 0c sub $0xc,%esp
92: 68 20 18 00 00 push $0x1820
97: e8 a4 09 00 00 call a40 <parsecmd>
9c: 89 04 24 mov %eax,(%esp)
9f: e8 fc 00 00 00 call 1a0 <runcmd>
wait();
}
exit();
a4: e8 49 0c 00 00 call cf2 <exit>
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
// Chdir must be called by the parent, not the child.
buf[strlen(buf)-1] = 0; // chop \n
a9: 83 ec 0c sub $0xc,%esp
ac: 68 20 18 00 00 push $0x1820
b1: e8 7a 0a 00 00 call b30 <strlen>
if(chdir(buf+3) < 0)
b6: c7 04 24 23 18 00 00 movl $0x1823,(%esp)
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){
// Chdir must be called by the parent, not the child.
buf[strlen(buf)-1] = 0; // chop \n
bd: c6 80 1f 18 00 00 00 movb $0x0,0x181f(%eax)
if(chdir(buf+3) < 0)
c4: e8 99 0c 00 00 call d62 <chdir>
c9: 83 c4 10 add $0x10,%esp
cc: 85 c0 test %eax,%eax
ce: 79 8e jns 5e <main+0x5e>
printf(2, "cannot cd %s\n", buf+3);
d0: 50 push %eax
d1: 68 23 18 00 00 push $0x1823
d6: 68 19 12 00 00 push $0x1219
db: 6a 02 push $0x2
dd: e8 6e 0d 00 00 call e50 <printf>
e2: 83 c4 10 add $0x10,%esp
e5: e9 74 ff ff ff jmp 5e <main+0x5e>
int fd;
// Ensure that three file descriptors are open.
while((fd = open("console", O_RDWR)) >= 0){
if(fd >= 3){
close(fd);
ea: 83 ec 0c sub $0xc,%esp
ed: 50 push %eax
ee: e8 27 0c 00 00 call d1a <close>
break;
f3: 83 c4 10 add $0x10,%esp
f6: e9 63 ff ff ff jmp 5e <main+0x5e>
fb: 66 90 xchg %ax,%ax
fd: 66 90 xchg %ax,%ax
ff: 90 nop
00000100 <getcmd>:
exit();
}
int
getcmd(char *buf, int nbuf)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 56 push %esi
104: 53 push %ebx
105: 8b 75 0c mov 0xc(%ebp),%esi
108: 8b 5d 08 mov 0x8(%ebp),%ebx
printf(2, "$ ");
10b: 83 ec 08 sub $0x8,%esp
10e: 68 70 11 00 00 push $0x1170
113: 6a 02 push $0x2
115: e8 36 0d 00 00 call e50 <printf>
memset(buf, 0, nbuf);
11a: 83 c4 0c add $0xc,%esp
11d: 56 push %esi
11e: 6a 00 push $0x0
120: 53 push %ebx
121: e8 3a 0a 00 00 call b60 <memset>
gets(buf, nbuf);
126: 58 pop %eax
127: 5a pop %edx
128: 56 push %esi
129: 53 push %ebx
12a: e8 91 0a 00 00 call bc0 <gets>
12f: 83 c4 10 add $0x10,%esp
132: 31 c0 xor %eax,%eax
134: 80 3b 00 cmpb $0x0,(%ebx)
137: 0f 94 c0 sete %al
if(buf[0] == 0) // EOF
return -1;
return 0;
}
13a: 8d 65 f8 lea -0x8(%ebp),%esp
13d: f7 d8 neg %eax
13f: 5b pop %ebx
140: 5e pop %esi
141: 5d pop %ebp
142: c3 ret
143: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000150 <panic>:
exit();
}
void
panic(char *s)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 83 ec 0c sub $0xc,%esp
printf(2, "%s\n", s);
156: ff 75 08 pushl 0x8(%ebp)
159: 68 0d 12 00 00 push $0x120d
15e: 6a 02 push $0x2
160: e8 eb 0c 00 00 call e50 <printf>
exit();
165: e8 88 0b 00 00 call cf2 <exit>
16a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000170 <fork1>:
}
int
fork1(void)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 83 ec 14 sub $0x14,%esp
int pid;
pid = fork(DEFAULT_PROC_TICKETS);
176: 6a 14 push $0x14
178: e8 6d 0b 00 00 call cea <fork>
if(pid == -1)
17d: 83 c4 10 add $0x10,%esp
180: 83 f8 ff cmp $0xffffffff,%eax
183: 74 02 je 187 <fork1+0x17>
panic("fork");
return pid;
}
185: c9 leave
186: c3 ret
{
int pid;
pid = fork(DEFAULT_PROC_TICKETS);
if(pid == -1)
panic("fork");
187: 83 ec 0c sub $0xc,%esp
18a: 68 73 11 00 00 push $0x1173
18f: e8 bc ff ff ff call 150 <panic>
194: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
19a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000001a0 <runcmd>:
struct cmd *parsecmd(char*);
// Execute cmd. Never returns.
void
runcmd(struct cmd *cmd)
{
1a0: 55 push %ebp
1a1: 89 e5 mov %esp,%ebp
1a3: 53 push %ebx
1a4: 83 ec 14 sub $0x14,%esp
1a7: 8b 5d 08 mov 0x8(%ebp),%ebx
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
1aa: 85 db test %ebx,%ebx
1ac: 74 64 je 212 <runcmd+0x72>
exit();
switch(cmd->type){
1ae: 83 3b 05 cmpl $0x5,(%ebx)
1b1: 0f 87 d8 00 00 00 ja 28f <runcmd+0xef>
1b7: 8b 03 mov (%ebx),%eax
1b9: ff 24 85 28 12 00 00 jmp *0x1228(,%eax,4)
runcmd(lcmd->right);
break;
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
1c0: 8d 45 f0 lea -0x10(%ebp),%eax
1c3: 83 ec 0c sub $0xc,%esp
1c6: 50 push %eax
1c7: e8 36 0b 00 00 call d02 <pipe>
1cc: 83 c4 10 add $0x10,%esp
1cf: 85 c0 test %eax,%eax
1d1: 0f 88 c5 00 00 00 js 29c <runcmd+0xfc>
panic("pipe");
if(fork1() == 0){
1d7: e8 94 ff ff ff call 170 <fork1>
1dc: 85 c0 test %eax,%eax
1de: 0f 84 08 01 00 00 je 2ec <runcmd+0x14c>
dup(p[1]);
close(p[0]);
close(p[1]);
runcmd(pcmd->left);
}
if(fork1() == 0){
1e4: e8 87 ff ff ff call 170 <fork1>
1e9: 85 c0 test %eax,%eax
1eb: 0f 84 cd 00 00 00 je 2be <runcmd+0x11e>
dup(p[0]);
close(p[0]);
close(p[1]);
runcmd(pcmd->right);
}
close(p[0]);
1f1: 83 ec 0c sub $0xc,%esp
1f4: ff 75 f0 pushl -0x10(%ebp)
1f7: e8 1e 0b 00 00 call d1a <close>
close(p[1]);
1fc: 58 pop %eax
1fd: ff 75 f4 pushl -0xc(%ebp)
200: e8 15 0b 00 00 call d1a <close>
wait();
205: e8 f0 0a 00 00 call cfa <wait>
wait();
20a: e8 eb 0a 00 00 call cfa <wait>
break;
20f: 83 c4 10 add $0x10,%esp
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
exit();
212: e8 db 0a 00 00 call cf2 <exit>
wait();
break;
case BACK:
bcmd = (struct backcmd*)cmd;
if(fork1() == 0)
217: e8 54 ff ff ff call 170 <fork1>
21c: 85 c0 test %eax,%eax
21e: 75 f2 jne 212 <runcmd+0x72>
220: eb 62 jmp 284 <runcmd+0xe4>
default:
panic("runcmd");
case EXEC:
ecmd = (struct execcmd*)cmd;
if(ecmd->argv[0] == 0)
222: 8b 43 04 mov 0x4(%ebx),%eax
225: 85 c0 test %eax,%eax
227: 74 e9 je 212 <runcmd+0x72>
exit();
exec(ecmd->argv[0], ecmd->argv);
229: 52 push %edx
22a: 52 push %edx
22b: 8d 53 04 lea 0x4(%ebx),%edx
22e: 52 push %edx
22f: 50 push %eax
230: e8 f5 0a 00 00 call d2a <exec>
printf(2, "exec %s failed\n", ecmd->argv[0]);
235: 83 c4 0c add $0xc,%esp
238: ff 73 04 pushl 0x4(%ebx)
23b: 68 7f 11 00 00 push $0x117f
240: 6a 02 push $0x2
242: e8 09 0c 00 00 call e50 <printf>
break;
247: 83 c4 10 add $0x10,%esp
24a: eb c6 jmp 212 <runcmd+0x72>
runcmd(rcmd->cmd);
break;
case LIST:
lcmd = (struct listcmd*)cmd;
if(fork1() == 0)
24c: e8 1f ff ff ff call 170 <fork1>
251: 85 c0 test %eax,%eax
253: 74 2f je 284 <runcmd+0xe4>
runcmd(lcmd->left);
wait();
255: e8 a0 0a 00 00 call cfa <wait>
runcmd(lcmd->right);
25a: 83 ec 0c sub $0xc,%esp
25d: ff 73 08 pushl 0x8(%ebx)
260: e8 3b ff ff ff call 1a0 <runcmd>
printf(2, "exec %s failed\n", ecmd->argv[0]);
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
close(rcmd->fd);
265: 83 ec 0c sub $0xc,%esp
268: ff 73 14 pushl 0x14(%ebx)
26b: e8 aa 0a 00 00 call d1a <close>
if(open(rcmd->file, rcmd->mode) < 0){
270: 59 pop %ecx
271: 58 pop %eax
272: ff 73 10 pushl 0x10(%ebx)
275: ff 73 08 pushl 0x8(%ebx)
278: e8 b5 0a 00 00 call d32 <open>
27d: 83 c4 10 add $0x10,%esp
280: 85 c0 test %eax,%eax
282: 78 25 js 2a9 <runcmd+0x109>
break;
case BACK:
bcmd = (struct backcmd*)cmd;
if(fork1() == 0)
runcmd(bcmd->cmd);
284: 83 ec 0c sub $0xc,%esp
287: ff 73 04 pushl 0x4(%ebx)
28a: e8 11 ff ff ff call 1a0 <runcmd>
if(cmd == 0)
exit();
switch(cmd->type){
default:
panic("runcmd");
28f: 83 ec 0c sub $0xc,%esp
292: 68 78 11 00 00 push $0x1178
297: e8 b4 fe ff ff call 150 <panic>
break;
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
panic("pipe");
29c: 83 ec 0c sub $0xc,%esp
29f: 68 9f 11 00 00 push $0x119f
2a4: e8 a7 fe ff ff call 150 <panic>
case REDIR:
rcmd = (struct redircmd*)cmd;
close(rcmd->fd);
if(open(rcmd->file, rcmd->mode) < 0){
printf(2, "open %s failed\n", rcmd->file);
2a9: 52 push %edx
2aa: ff 73 08 pushl 0x8(%ebx)
2ad: 68 8f 11 00 00 push $0x118f
2b2: 6a 02 push $0x2
2b4: e8 97 0b 00 00 call e50 <printf>
exit();
2b9: e8 34 0a 00 00 call cf2 <exit>
close(p[0]);
close(p[1]);
runcmd(pcmd->left);
}
if(fork1() == 0){
close(0);
2be: 83 ec 0c sub $0xc,%esp
2c1: 6a 00 push $0x0
2c3: e8 52 0a 00 00 call d1a <close>
dup(p[0]);
2c8: 5a pop %edx
2c9: ff 75 f0 pushl -0x10(%ebp)
2cc: e8 99 0a 00 00 call d6a <dup>
close(p[0]);
2d1: 59 pop %ecx
2d2: ff 75 f0 pushl -0x10(%ebp)
2d5: e8 40 0a 00 00 call d1a <close>
close(p[1]);
2da: 58 pop %eax
2db: ff 75 f4 pushl -0xc(%ebp)
2de: e8 37 0a 00 00 call d1a <close>
runcmd(pcmd->right);
2e3: 58 pop %eax
2e4: ff 73 08 pushl 0x8(%ebx)
2e7: e8 b4 fe ff ff call 1a0 <runcmd>
case PIPE:
pcmd = (struct pipecmd*)cmd;
if(pipe(p) < 0)
panic("pipe");
if(fork1() == 0){
close(1);
2ec: 83 ec 0c sub $0xc,%esp
2ef: 6a 01 push $0x1
2f1: e8 24 0a 00 00 call d1a <close>
dup(p[1]);
2f6: 58 pop %eax
2f7: ff 75 f4 pushl -0xc(%ebp)
2fa: e8 6b 0a 00 00 call d6a <dup>
close(p[0]);
2ff: 58 pop %eax
300: ff 75 f0 pushl -0x10(%ebp)
303: e8 12 0a 00 00 call d1a <close>
close(p[1]);
308: 58 pop %eax
309: ff 75 f4 pushl -0xc(%ebp)
30c: e8 09 0a 00 00 call d1a <close>
runcmd(pcmd->left);
311: 58 pop %eax
312: ff 73 04 pushl 0x4(%ebx)
315: e8 86 fe ff ff call 1a0 <runcmd>
31a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000320 <execcmd>:
//PAGEBREAK!
// Constructors
struct cmd*
execcmd(void)
{
320: 55 push %ebp
321: 89 e5 mov %esp,%ebp
323: 53 push %ebx
324: 83 ec 10 sub $0x10,%esp
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
327: 6a 54 push $0x54
329: e8 52 0d 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
32e: 83 c4 0c add $0xc,%esp
struct cmd*
execcmd(void)
{
struct execcmd *cmd;
cmd = malloc(sizeof(*cmd));
331: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
333: 6a 54 push $0x54
335: 6a 00 push $0x0
337: 50 push %eax
338: e8 23 08 00 00 call b60 <memset>
cmd->type = EXEC;
33d: c7 03 01 00 00 00 movl $0x1,(%ebx)
return (struct cmd*)cmd;
}
343: 89 d8 mov %ebx,%eax
345: 8b 5d fc mov -0x4(%ebp),%ebx
348: c9 leave
349: c3 ret
34a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000350 <redircmd>:
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
350: 55 push %ebp
351: 89 e5 mov %esp,%ebp
353: 53 push %ebx
354: 83 ec 10 sub $0x10,%esp
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
357: 6a 18 push $0x18
359: e8 22 0d 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
35e: 83 c4 0c add $0xc,%esp
struct cmd*
redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd)
{
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
361: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
363: 6a 18 push $0x18
365: 6a 00 push $0x0
367: 50 push %eax
368: e8 f3 07 00 00 call b60 <memset>
cmd->type = REDIR;
cmd->cmd = subcmd;
36d: 8b 45 08 mov 0x8(%ebp),%eax
{
struct redircmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = REDIR;
370: c7 03 02 00 00 00 movl $0x2,(%ebx)
cmd->cmd = subcmd;
376: 89 43 04 mov %eax,0x4(%ebx)
cmd->file = file;
379: 8b 45 0c mov 0xc(%ebp),%eax
37c: 89 43 08 mov %eax,0x8(%ebx)
cmd->efile = efile;
37f: 8b 45 10 mov 0x10(%ebp),%eax
382: 89 43 0c mov %eax,0xc(%ebx)
cmd->mode = mode;
385: 8b 45 14 mov 0x14(%ebp),%eax
388: 89 43 10 mov %eax,0x10(%ebx)
cmd->fd = fd;
38b: 8b 45 18 mov 0x18(%ebp),%eax
38e: 89 43 14 mov %eax,0x14(%ebx)
return (struct cmd*)cmd;
}
391: 89 d8 mov %ebx,%eax
393: 8b 5d fc mov -0x4(%ebp),%ebx
396: c9 leave
397: c3 ret
398: 90 nop
399: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000003a0 <pipecmd>:
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
3a0: 55 push %ebp
3a1: 89 e5 mov %esp,%ebp
3a3: 53 push %ebx
3a4: 83 ec 10 sub $0x10,%esp
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
3a7: 6a 0c push $0xc
3a9: e8 d2 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
3ae: 83 c4 0c add $0xc,%esp
struct cmd*
pipecmd(struct cmd *left, struct cmd *right)
{
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
3b1: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
3b3: 6a 0c push $0xc
3b5: 6a 00 push $0x0
3b7: 50 push %eax
3b8: e8 a3 07 00 00 call b60 <memset>
cmd->type = PIPE;
cmd->left = left;
3bd: 8b 45 08 mov 0x8(%ebp),%eax
{
struct pipecmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = PIPE;
3c0: c7 03 03 00 00 00 movl $0x3,(%ebx)
cmd->left = left;
3c6: 89 43 04 mov %eax,0x4(%ebx)
cmd->right = right;
3c9: 8b 45 0c mov 0xc(%ebp),%eax
3cc: 89 43 08 mov %eax,0x8(%ebx)
return (struct cmd*)cmd;
}
3cf: 89 d8 mov %ebx,%eax
3d1: 8b 5d fc mov -0x4(%ebp),%ebx
3d4: c9 leave
3d5: c3 ret
3d6: 8d 76 00 lea 0x0(%esi),%esi
3d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000003e0 <listcmd>:
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
3e0: 55 push %ebp
3e1: 89 e5 mov %esp,%ebp
3e3: 53 push %ebx
3e4: 83 ec 10 sub $0x10,%esp
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
3e7: 6a 0c push $0xc
3e9: e8 92 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
3ee: 83 c4 0c add $0xc,%esp
struct cmd*
listcmd(struct cmd *left, struct cmd *right)
{
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
3f1: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
3f3: 6a 0c push $0xc
3f5: 6a 00 push $0x0
3f7: 50 push %eax
3f8: e8 63 07 00 00 call b60 <memset>
cmd->type = LIST;
cmd->left = left;
3fd: 8b 45 08 mov 0x8(%ebp),%eax
{
struct listcmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = LIST;
400: c7 03 04 00 00 00 movl $0x4,(%ebx)
cmd->left = left;
406: 89 43 04 mov %eax,0x4(%ebx)
cmd->right = right;
409: 8b 45 0c mov 0xc(%ebp),%eax
40c: 89 43 08 mov %eax,0x8(%ebx)
return (struct cmd*)cmd;
}
40f: 89 d8 mov %ebx,%eax
411: 8b 5d fc mov -0x4(%ebp),%ebx
414: c9 leave
415: c3 ret
416: 8d 76 00 lea 0x0(%esi),%esi
419: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000420 <backcmd>:
struct cmd*
backcmd(struct cmd *subcmd)
{
420: 55 push %ebp
421: 89 e5 mov %esp,%ebp
423: 53 push %ebx
424: 83 ec 10 sub $0x10,%esp
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
427: 6a 08 push $0x8
429: e8 52 0c 00 00 call 1080 <malloc>
memset(cmd, 0, sizeof(*cmd));
42e: 83 c4 0c add $0xc,%esp
struct cmd*
backcmd(struct cmd *subcmd)
{
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
431: 89 c3 mov %eax,%ebx
memset(cmd, 0, sizeof(*cmd));
433: 6a 08 push $0x8
435: 6a 00 push $0x0
437: 50 push %eax
438: e8 23 07 00 00 call b60 <memset>
cmd->type = BACK;
cmd->cmd = subcmd;
43d: 8b 45 08 mov 0x8(%ebp),%eax
{
struct backcmd *cmd;
cmd = malloc(sizeof(*cmd));
memset(cmd, 0, sizeof(*cmd));
cmd->type = BACK;
440: c7 03 05 00 00 00 movl $0x5,(%ebx)
cmd->cmd = subcmd;
446: 89 43 04 mov %eax,0x4(%ebx)
return (struct cmd*)cmd;
}
449: 89 d8 mov %ebx,%eax
44b: 8b 5d fc mov -0x4(%ebp),%ebx
44e: c9 leave
44f: c3 ret
00000450 <gettoken>:
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
450: 55 push %ebp
451: 89 e5 mov %esp,%ebp
453: 57 push %edi
454: 56 push %esi
455: 53 push %ebx
456: 83 ec 0c sub $0xc,%esp
char *s;
int ret;
s = *ps;
459: 8b 45 08 mov 0x8(%ebp),%eax
char whitespace[] = " \t\r\n\v";
char symbols[] = "<|>&;()";
int
gettoken(char **ps, char *es, char **q, char **eq)
{
45c: 8b 5d 0c mov 0xc(%ebp),%ebx
45f: 8b 75 10 mov 0x10(%ebp),%esi
char *s;
int ret;
s = *ps;
462: 8b 38 mov (%eax),%edi
while(s < es && strchr(whitespace, *s))
464: 39 df cmp %ebx,%edi
466: 72 13 jb 47b <gettoken+0x2b>
468: eb 29 jmp 493 <gettoken+0x43>
46a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
s++;
470: 83 c7 01 add $0x1,%edi
{
char *s;
int ret;
s = *ps;
while(s < es && strchr(whitespace, *s))
473: 39 fb cmp %edi,%ebx
475: 0f 84 ed 00 00 00 je 568 <gettoken+0x118>
47b: 0f be 07 movsbl (%edi),%eax
47e: 83 ec 08 sub $0x8,%esp
481: 50 push %eax
482: 68 18 18 00 00 push $0x1818
487: e8 f4 06 00 00 call b80 <strchr>
48c: 83 c4 10 add $0x10,%esp
48f: 85 c0 test %eax,%eax
491: 75 dd jne 470 <gettoken+0x20>
s++;
if(q)
493: 85 f6 test %esi,%esi
495: 74 02 je 499 <gettoken+0x49>
*q = s;
497: 89 3e mov %edi,(%esi)
ret = *s;
499: 0f be 37 movsbl (%edi),%esi
49c: 89 f1 mov %esi,%ecx
49e: 89 f0 mov %esi,%eax
switch(*s){
4a0: 80 f9 29 cmp $0x29,%cl
4a3: 7f 5b jg 500 <gettoken+0xb0>
4a5: 80 f9 28 cmp $0x28,%cl
4a8: 7d 61 jge 50b <gettoken+0xbb>
4aa: 84 c9 test %cl,%cl
4ac: 0f 85 de 00 00 00 jne 590 <gettoken+0x140>
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
4b2: 8b 55 14 mov 0x14(%ebp),%edx
4b5: 85 d2 test %edx,%edx
4b7: 74 05 je 4be <gettoken+0x6e>
*eq = s;
4b9: 8b 45 14 mov 0x14(%ebp),%eax
4bc: 89 38 mov %edi,(%eax)
while(s < es && strchr(whitespace, *s))
4be: 39 fb cmp %edi,%ebx
4c0: 77 0d ja 4cf <gettoken+0x7f>
4c2: eb 23 jmp 4e7 <gettoken+0x97>
4c4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s++;
4c8: 83 c7 01 add $0x1,%edi
break;
}
if(eq)
*eq = s;
while(s < es && strchr(whitespace, *s))
4cb: 39 fb cmp %edi,%ebx
4cd: 74 18 je 4e7 <gettoken+0x97>
4cf: 0f be 07 movsbl (%edi),%eax
4d2: 83 ec 08 sub $0x8,%esp
4d5: 50 push %eax
4d6: 68 18 18 00 00 push $0x1818
4db: e8 a0 06 00 00 call b80 <strchr>
4e0: 83 c4 10 add $0x10,%esp
4e3: 85 c0 test %eax,%eax
4e5: 75 e1 jne 4c8 <gettoken+0x78>
s++;
*ps = s;
4e7: 8b 45 08 mov 0x8(%ebp),%eax
4ea: 89 38 mov %edi,(%eax)
return ret;
}
4ec: 8d 65 f4 lea -0xc(%ebp),%esp
4ef: 89 f0 mov %esi,%eax
4f1: 5b pop %ebx
4f2: 5e pop %esi
4f3: 5f pop %edi
4f4: 5d pop %ebp
4f5: c3 ret
4f6: 8d 76 00 lea 0x0(%esi),%esi
4f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
500: 80 f9 3e cmp $0x3e,%cl
503: 75 0b jne 510 <gettoken+0xc0>
case '<':
s++;
break;
case '>':
s++;
if(*s == '>'){
505: 80 7f 01 3e cmpb $0x3e,0x1(%edi)
509: 74 75 je 580 <gettoken+0x130>
case '&':
case '<':
s++;
break;
case '>':
s++;
50b: 83 c7 01 add $0x1,%edi
50e: eb a2 jmp 4b2 <gettoken+0x62>
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
510: 7f 5e jg 570 <gettoken+0x120>
512: 83 e9 3b sub $0x3b,%ecx
515: 80 f9 01 cmp $0x1,%cl
518: 76 f1 jbe 50b <gettoken+0xbb>
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
51a: 39 fb cmp %edi,%ebx
51c: 77 24 ja 542 <gettoken+0xf2>
51e: eb 7c jmp 59c <gettoken+0x14c>
520: 0f be 07 movsbl (%edi),%eax
523: 83 ec 08 sub $0x8,%esp
526: 50 push %eax
527: 68 10 18 00 00 push $0x1810
52c: e8 4f 06 00 00 call b80 <strchr>
531: 83 c4 10 add $0x10,%esp
534: 85 c0 test %eax,%eax
536: 75 1f jne 557 <gettoken+0x107>
s++;
538: 83 c7 01 add $0x1,%edi
s++;
}
break;
default:
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
53b: 39 fb cmp %edi,%ebx
53d: 74 5b je 59a <gettoken+0x14a>
53f: 0f be 07 movsbl (%edi),%eax
542: 83 ec 08 sub $0x8,%esp
545: 50 push %eax
546: 68 18 18 00 00 push $0x1818
54b: e8 30 06 00 00 call b80 <strchr>
550: 83 c4 10 add $0x10,%esp
553: 85 c0 test %eax,%eax
555: 74 c9 je 520 <gettoken+0xd0>
ret = '+';
s++;
}
break;
default:
ret = 'a';
557: be 61 00 00 00 mov $0x61,%esi
55c: e9 51 ff ff ff jmp 4b2 <gettoken+0x62>
561: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
568: 89 df mov %ebx,%edi
56a: e9 24 ff ff ff jmp 493 <gettoken+0x43>
56f: 90 nop
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
570: 80 f9 7c cmp $0x7c,%cl
573: 74 96 je 50b <gettoken+0xbb>
575: eb a3 jmp 51a <gettoken+0xca>
577: 89 f6 mov %esi,%esi
579: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
break;
case '>':
s++;
if(*s == '>'){
ret = '+';
s++;
580: 83 c7 02 add $0x2,%edi
s++;
break;
case '>':
s++;
if(*s == '>'){
ret = '+';
583: be 2b 00 00 00 mov $0x2b,%esi
588: e9 25 ff ff ff jmp 4b2 <gettoken+0x62>
58d: 8d 76 00 lea 0x0(%esi),%esi
while(s < es && strchr(whitespace, *s))
s++;
if(q)
*q = s;
ret = *s;
switch(*s){
590: 80 f9 26 cmp $0x26,%cl
593: 75 85 jne 51a <gettoken+0xca>
595: e9 71 ff ff ff jmp 50b <gettoken+0xbb>
59a: 89 df mov %ebx,%edi
ret = 'a';
while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s))
s++;
break;
}
if(eq)
59c: 8b 45 14 mov 0x14(%ebp),%eax
59f: be 61 00 00 00 mov $0x61,%esi
5a4: 85 c0 test %eax,%eax
5a6: 0f 85 0d ff ff ff jne 4b9 <gettoken+0x69>
5ac: e9 36 ff ff ff jmp 4e7 <gettoken+0x97>
5b1: eb 0d jmp 5c0 <peek>
5b3: 90 nop
5b4: 90 nop
5b5: 90 nop
5b6: 90 nop
5b7: 90 nop
5b8: 90 nop
5b9: 90 nop
5ba: 90 nop
5bb: 90 nop
5bc: 90 nop
5bd: 90 nop
5be: 90 nop
5bf: 90 nop
000005c0 <peek>:
return ret;
}
int
peek(char **ps, char *es, char *toks)
{
5c0: 55 push %ebp
5c1: 89 e5 mov %esp,%ebp
5c3: 57 push %edi
5c4: 56 push %esi
5c5: 53 push %ebx
5c6: 83 ec 0c sub $0xc,%esp
5c9: 8b 7d 08 mov 0x8(%ebp),%edi
5cc: 8b 75 0c mov 0xc(%ebp),%esi
char *s;
s = *ps;
5cf: 8b 1f mov (%edi),%ebx
while(s < es && strchr(whitespace, *s))
5d1: 39 f3 cmp %esi,%ebx
5d3: 72 12 jb 5e7 <peek+0x27>
5d5: eb 28 jmp 5ff <peek+0x3f>
5d7: 89 f6 mov %esi,%esi
5d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
s++;
5e0: 83 c3 01 add $0x1,%ebx
peek(char **ps, char *es, char *toks)
{
char *s;
s = *ps;
while(s < es && strchr(whitespace, *s))
5e3: 39 de cmp %ebx,%esi
5e5: 74 18 je 5ff <peek+0x3f>
5e7: 0f be 03 movsbl (%ebx),%eax
5ea: 83 ec 08 sub $0x8,%esp
5ed: 50 push %eax
5ee: 68 18 18 00 00 push $0x1818
5f3: e8 88 05 00 00 call b80 <strchr>
5f8: 83 c4 10 add $0x10,%esp
5fb: 85 c0 test %eax,%eax
5fd: 75 e1 jne 5e0 <peek+0x20>
s++;
*ps = s;
5ff: 89 1f mov %ebx,(%edi)
return *s && strchr(toks, *s);
601: 0f be 13 movsbl (%ebx),%edx
604: 31 c0 xor %eax,%eax
606: 84 d2 test %dl,%dl
608: 74 17 je 621 <peek+0x61>
60a: 83 ec 08 sub $0x8,%esp
60d: 52 push %edx
60e: ff 75 10 pushl 0x10(%ebp)
611: e8 6a 05 00 00 call b80 <strchr>
616: 83 c4 10 add $0x10,%esp
619: 85 c0 test %eax,%eax
61b: 0f 95 c0 setne %al
61e: 0f b6 c0 movzbl %al,%eax
}
621: 8d 65 f4 lea -0xc(%ebp),%esp
624: 5b pop %ebx
625: 5e pop %esi
626: 5f pop %edi
627: 5d pop %ebp
628: c3 ret
629: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000630 <parseredirs>:
return cmd;
}
struct cmd*
parseredirs(struct cmd *cmd, char **ps, char *es)
{
630: 55 push %ebp
631: 89 e5 mov %esp,%ebp
633: 57 push %edi
634: 56 push %esi
635: 53 push %ebx
636: 83 ec 1c sub $0x1c,%esp
639: 8b 75 0c mov 0xc(%ebp),%esi
63c: 8b 5d 10 mov 0x10(%ebp),%ebx
63f: 90 nop
int tok;
char *q, *eq;
while(peek(ps, es, "<>")){
640: 83 ec 04 sub $0x4,%esp
643: 68 c1 11 00 00 push $0x11c1
648: 53 push %ebx
649: 56 push %esi
64a: e8 71 ff ff ff call 5c0 <peek>
64f: 83 c4 10 add $0x10,%esp
652: 85 c0 test %eax,%eax
654: 74 6a je 6c0 <parseredirs+0x90>
tok = gettoken(ps, es, 0, 0);
656: 6a 00 push $0x0
658: 6a 00 push $0x0
65a: 53 push %ebx
65b: 56 push %esi
65c: e8 ef fd ff ff call 450 <gettoken>
661: 89 c7 mov %eax,%edi
if(gettoken(ps, es, &q, &eq) != 'a')
663: 8d 45 e4 lea -0x1c(%ebp),%eax
666: 50 push %eax
667: 8d 45 e0 lea -0x20(%ebp),%eax
66a: 50 push %eax
66b: 53 push %ebx
66c: 56 push %esi
66d: e8 de fd ff ff call 450 <gettoken>
672: 83 c4 20 add $0x20,%esp
675: 83 f8 61 cmp $0x61,%eax
678: 75 51 jne 6cb <parseredirs+0x9b>
panic("missing file for redirection");
switch(tok){
67a: 83 ff 3c cmp $0x3c,%edi
67d: 74 31 je 6b0 <parseredirs+0x80>
67f: 83 ff 3e cmp $0x3e,%edi
682: 74 05 je 689 <parseredirs+0x59>
684: 83 ff 2b cmp $0x2b,%edi
687: 75 b7 jne 640 <parseredirs+0x10>
break;
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
689: 83 ec 0c sub $0xc,%esp
68c: 6a 01 push $0x1
68e: 68 01 02 00 00 push $0x201
693: ff 75 e4 pushl -0x1c(%ebp)
696: ff 75 e0 pushl -0x20(%ebp)
699: ff 75 08 pushl 0x8(%ebp)
69c: e8 af fc ff ff call 350 <redircmd>
break;
6a1: 83 c4 20 add $0x20,%esp
break;
case '>':
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
case '+': // >>
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
6a4: 89 45 08 mov %eax,0x8(%ebp)
break;
6a7: eb 97 jmp 640 <parseredirs+0x10>
6a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
tok = gettoken(ps, es, 0, 0);
if(gettoken(ps, es, &q, &eq) != 'a')
panic("missing file for redirection");
switch(tok){
case '<':
cmd = redircmd(cmd, q, eq, O_RDONLY, 0);
6b0: 83 ec 0c sub $0xc,%esp
6b3: 6a 00 push $0x0
6b5: 6a 00 push $0x0
6b7: eb da jmp 693 <parseredirs+0x63>
6b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);
break;
}
}
return cmd;
}
6c0: 8b 45 08 mov 0x8(%ebp),%eax
6c3: 8d 65 f4 lea -0xc(%ebp),%esp
6c6: 5b pop %ebx
6c7: 5e pop %esi
6c8: 5f pop %edi
6c9: 5d pop %ebp
6ca: c3 ret
char *q, *eq;
while(peek(ps, es, "<>")){
tok = gettoken(ps, es, 0, 0);
if(gettoken(ps, es, &q, &eq) != 'a')
panic("missing file for redirection");
6cb: 83 ec 0c sub $0xc,%esp
6ce: 68 a4 11 00 00 push $0x11a4
6d3: e8 78 fa ff ff call 150 <panic>
6d8: 90 nop
6d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000006e0 <parseexec>:
return cmd;
}
struct cmd*
parseexec(char **ps, char *es)
{
6e0: 55 push %ebp
6e1: 89 e5 mov %esp,%ebp
6e3: 57 push %edi
6e4: 56 push %esi
6e5: 53 push %ebx
6e6: 83 ec 30 sub $0x30,%esp
6e9: 8b 75 08 mov 0x8(%ebp),%esi
6ec: 8b 7d 0c mov 0xc(%ebp),%edi
char *q, *eq;
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
6ef: 68 c4 11 00 00 push $0x11c4
6f4: 57 push %edi
6f5: 56 push %esi
6f6: e8 c5 fe ff ff call 5c0 <peek>
6fb: 83 c4 10 add $0x10,%esp
6fe: 85 c0 test %eax,%eax
700: 0f 85 9a 00 00 00 jne 7a0 <parseexec+0xc0>
return parseblock(ps, es);
ret = execcmd();
706: e8 15 fc ff ff call 320 <execcmd>
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
70b: 83 ec 04 sub $0x4,%esp
struct cmd *ret;
if(peek(ps, es, "("))
return parseblock(ps, es);
ret = execcmd();
70e: 89 c3 mov %eax,%ebx
710: 89 45 cc mov %eax,-0x34(%ebp)
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
713: 57 push %edi
714: 56 push %esi
715: 8d 5b 04 lea 0x4(%ebx),%ebx
718: 50 push %eax
719: e8 12 ff ff ff call 630 <parseredirs>
71e: 83 c4 10 add $0x10,%esp
721: 89 45 d0 mov %eax,-0x30(%ebp)
return parseblock(ps, es);
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
724: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
72b: eb 16 jmp 743 <parseexec+0x63>
72d: 8d 76 00 lea 0x0(%esi),%esi
cmd->argv[argc] = q;
cmd->eargv[argc] = eq;
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
730: 83 ec 04 sub $0x4,%esp
733: 57 push %edi
734: 56 push %esi
735: ff 75 d0 pushl -0x30(%ebp)
738: e8 f3 fe ff ff call 630 <parseredirs>
73d: 83 c4 10 add $0x10,%esp
740: 89 45 d0 mov %eax,-0x30(%ebp)
ret = execcmd();
cmd = (struct execcmd*)ret;
argc = 0;
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
743: 83 ec 04 sub $0x4,%esp
746: 68 db 11 00 00 push $0x11db
74b: 57 push %edi
74c: 56 push %esi
74d: e8 6e fe ff ff call 5c0 <peek>
752: 83 c4 10 add $0x10,%esp
755: 85 c0 test %eax,%eax
757: 75 5f jne 7b8 <parseexec+0xd8>
if((tok=gettoken(ps, es, &q, &eq)) == 0)
759: 8d 45 e4 lea -0x1c(%ebp),%eax
75c: 50 push %eax
75d: 8d 45 e0 lea -0x20(%ebp),%eax
760: 50 push %eax
761: 57 push %edi
762: 56 push %esi
763: e8 e8 fc ff ff call 450 <gettoken>
768: 83 c4 10 add $0x10,%esp
76b: 85 c0 test %eax,%eax
76d: 74 49 je 7b8 <parseexec+0xd8>
break;
if(tok != 'a')
76f: 83 f8 61 cmp $0x61,%eax
772: 75 66 jne 7da <parseexec+0xfa>
panic("syntax");
cmd->argv[argc] = q;
774: 8b 45 e0 mov -0x20(%ebp),%eax
cmd->eargv[argc] = eq;
argc++;
777: 83 45 d4 01 addl $0x1,-0x2c(%ebp)
77b: 83 c3 04 add $0x4,%ebx
while(!peek(ps, es, "|)&;")){
if((tok=gettoken(ps, es, &q, &eq)) == 0)
break;
if(tok != 'a')
panic("syntax");
cmd->argv[argc] = q;
77e: 89 43 fc mov %eax,-0x4(%ebx)
cmd->eargv[argc] = eq;
781: 8b 45 e4 mov -0x1c(%ebp),%eax
784: 89 43 24 mov %eax,0x24(%ebx)
argc++;
787: 8b 45 d4 mov -0x2c(%ebp),%eax
if(argc >= MAXARGS)
78a: 83 f8 0a cmp $0xa,%eax
78d: 75 a1 jne 730 <parseexec+0x50>
panic("too many args");
78f: 83 ec 0c sub $0xc,%esp
792: 68 cd 11 00 00 push $0x11cd
797: e8 b4 f9 ff ff call 150 <panic>
79c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
int tok, argc;
struct execcmd *cmd;
struct cmd *ret;
if(peek(ps, es, "("))
return parseblock(ps, es);
7a0: 83 ec 08 sub $0x8,%esp
7a3: 57 push %edi
7a4: 56 push %esi
7a5: e8 56 01 00 00 call 900 <parseblock>
7aa: 83 c4 10 add $0x10,%esp
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
cmd->eargv[argc] = 0;
return ret;
}
7ad: 8d 65 f4 lea -0xc(%ebp),%esp
7b0: 5b pop %ebx
7b1: 5e pop %esi
7b2: 5f pop %edi
7b3: 5d pop %ebp
7b4: c3 ret
7b5: 8d 76 00 lea 0x0(%esi),%esi
7b8: 8b 45 cc mov -0x34(%ebp),%eax
7bb: 8b 55 d4 mov -0x2c(%ebp),%edx
7be: 8d 04 90 lea (%eax,%edx,4),%eax
argc++;
if(argc >= MAXARGS)
panic("too many args");
ret = parseredirs(ret, ps, es);
}
cmd->argv[argc] = 0;
7c1: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
cmd->eargv[argc] = 0;
7c8: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
7cf: 8b 45 d0 mov -0x30(%ebp),%eax
return ret;
}
7d2: 8d 65 f4 lea -0xc(%ebp),%esp
7d5: 5b pop %ebx
7d6: 5e pop %esi
7d7: 5f pop %edi
7d8: 5d pop %ebp
7d9: c3 ret
ret = parseredirs(ret, ps, es);
while(!peek(ps, es, "|)&;")){
if((tok=gettoken(ps, es, &q, &eq)) == 0)
break;
if(tok != 'a')
panic("syntax");
7da: 83 ec 0c sub $0xc,%esp
7dd: 68 c6 11 00 00 push $0x11c6
7e2: e8 69 f9 ff ff call 150 <panic>
7e7: 89 f6 mov %esi,%esi
7e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000007f0 <parsepipe>:
return cmd;
}
struct cmd*
parsepipe(char **ps, char *es)
{
7f0: 55 push %ebp
7f1: 89 e5 mov %esp,%ebp
7f3: 57 push %edi
7f4: 56 push %esi
7f5: 53 push %ebx
7f6: 83 ec 14 sub $0x14,%esp
7f9: 8b 5d 08 mov 0x8(%ebp),%ebx
7fc: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
cmd = parseexec(ps, es);
7ff: 56 push %esi
800: 53 push %ebx
801: e8 da fe ff ff call 6e0 <parseexec>
if(peek(ps, es, "|")){
806: 83 c4 0c add $0xc,%esp
struct cmd*
parsepipe(char **ps, char *es)
{
struct cmd *cmd;
cmd = parseexec(ps, es);
809: 89 c7 mov %eax,%edi
if(peek(ps, es, "|")){
80b: 68 e0 11 00 00 push $0x11e0
810: 56 push %esi
811: 53 push %ebx
812: e8 a9 fd ff ff call 5c0 <peek>
817: 83 c4 10 add $0x10,%esp
81a: 85 c0 test %eax,%eax
81c: 75 12 jne 830 <parsepipe+0x40>
gettoken(ps, es, 0, 0);
cmd = pipecmd(cmd, parsepipe(ps, es));
}
return cmd;
}
81e: 8d 65 f4 lea -0xc(%ebp),%esp
821: 89 f8 mov %edi,%eax
823: 5b pop %ebx
824: 5e pop %esi
825: 5f pop %edi
826: 5d pop %ebp
827: c3 ret
828: 90 nop
829: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
{
struct cmd *cmd;
cmd = parseexec(ps, es);
if(peek(ps, es, "|")){
gettoken(ps, es, 0, 0);
830: 6a 00 push $0x0
832: 6a 00 push $0x0
834: 56 push %esi
835: 53 push %ebx
836: e8 15 fc ff ff call 450 <gettoken>
cmd = pipecmd(cmd, parsepipe(ps, es));
83b: 58 pop %eax
83c: 5a pop %edx
83d: 56 push %esi
83e: 53 push %ebx
83f: e8 ac ff ff ff call 7f0 <parsepipe>
844: 89 7d 08 mov %edi,0x8(%ebp)
847: 89 45 0c mov %eax,0xc(%ebp)
84a: 83 c4 10 add $0x10,%esp
}
return cmd;
}
84d: 8d 65 f4 lea -0xc(%ebp),%esp
850: 5b pop %ebx
851: 5e pop %esi
852: 5f pop %edi
853: 5d pop %ebp
struct cmd *cmd;
cmd = parseexec(ps, es);
if(peek(ps, es, "|")){
gettoken(ps, es, 0, 0);
cmd = pipecmd(cmd, parsepipe(ps, es));
854: e9 47 fb ff ff jmp 3a0 <pipecmd>
859: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000860 <parseline>:
return cmd;
}
struct cmd*
parseline(char **ps, char *es)
{
860: 55 push %ebp
861: 89 e5 mov %esp,%ebp
863: 57 push %edi
864: 56 push %esi
865: 53 push %ebx
866: 83 ec 14 sub $0x14,%esp
869: 8b 5d 08 mov 0x8(%ebp),%ebx
86c: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
cmd = parsepipe(ps, es);
86f: 56 push %esi
870: 53 push %ebx
871: e8 7a ff ff ff call 7f0 <parsepipe>
while(peek(ps, es, "&")){
876: 83 c4 10 add $0x10,%esp
struct cmd*
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
879: 89 c7 mov %eax,%edi
while(peek(ps, es, "&")){
87b: eb 1b jmp 898 <parseline+0x38>
87d: 8d 76 00 lea 0x0(%esi),%esi
gettoken(ps, es, 0, 0);
880: 6a 00 push $0x0
882: 6a 00 push $0x0
884: 56 push %esi
885: 53 push %ebx
886: e8 c5 fb ff ff call 450 <gettoken>
cmd = backcmd(cmd);
88b: 89 3c 24 mov %edi,(%esp)
88e: e8 8d fb ff ff call 420 <backcmd>
893: 83 c4 10 add $0x10,%esp
896: 89 c7 mov %eax,%edi
parseline(char **ps, char *es)
{
struct cmd *cmd;
cmd = parsepipe(ps, es);
while(peek(ps, es, "&")){
898: 83 ec 04 sub $0x4,%esp
89b: 68 e2 11 00 00 push $0x11e2
8a0: 56 push %esi
8a1: 53 push %ebx
8a2: e8 19 fd ff ff call 5c0 <peek>
8a7: 83 c4 10 add $0x10,%esp
8aa: 85 c0 test %eax,%eax
8ac: 75 d2 jne 880 <parseline+0x20>
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
8ae: 83 ec 04 sub $0x4,%esp
8b1: 68 de 11 00 00 push $0x11de
8b6: 56 push %esi
8b7: 53 push %ebx
8b8: e8 03 fd ff ff call 5c0 <peek>
8bd: 83 c4 10 add $0x10,%esp
8c0: 85 c0 test %eax,%eax
8c2: 75 0c jne 8d0 <parseline+0x70>
gettoken(ps, es, 0, 0);
cmd = listcmd(cmd, parseline(ps, es));
}
return cmd;
}
8c4: 8d 65 f4 lea -0xc(%ebp),%esp
8c7: 89 f8 mov %edi,%eax
8c9: 5b pop %ebx
8ca: 5e pop %esi
8cb: 5f pop %edi
8cc: 5d pop %ebp
8cd: c3 ret
8ce: 66 90 xchg %ax,%ax
while(peek(ps, es, "&")){
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
gettoken(ps, es, 0, 0);
8d0: 6a 00 push $0x0
8d2: 6a 00 push $0x0
8d4: 56 push %esi
8d5: 53 push %ebx
8d6: e8 75 fb ff ff call 450 <gettoken>
cmd = listcmd(cmd, parseline(ps, es));
8db: 58 pop %eax
8dc: 5a pop %edx
8dd: 56 push %esi
8de: 53 push %ebx
8df: e8 7c ff ff ff call 860 <parseline>
8e4: 89 7d 08 mov %edi,0x8(%ebp)
8e7: 89 45 0c mov %eax,0xc(%ebp)
8ea: 83 c4 10 add $0x10,%esp
}
return cmd;
}
8ed: 8d 65 f4 lea -0xc(%ebp),%esp
8f0: 5b pop %ebx
8f1: 5e pop %esi
8f2: 5f pop %edi
8f3: 5d pop %ebp
gettoken(ps, es, 0, 0);
cmd = backcmd(cmd);
}
if(peek(ps, es, ";")){
gettoken(ps, es, 0, 0);
cmd = listcmd(cmd, parseline(ps, es));
8f4: e9 e7 fa ff ff jmp 3e0 <listcmd>
8f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000900 <parseblock>:
return cmd;
}
struct cmd*
parseblock(char **ps, char *es)
{
900: 55 push %ebp
901: 89 e5 mov %esp,%ebp
903: 57 push %edi
904: 56 push %esi
905: 53 push %ebx
906: 83 ec 10 sub $0x10,%esp
909: 8b 5d 08 mov 0x8(%ebp),%ebx
90c: 8b 75 0c mov 0xc(%ebp),%esi
struct cmd *cmd;
if(!peek(ps, es, "("))
90f: 68 c4 11 00 00 push $0x11c4
914: 56 push %esi
915: 53 push %ebx
916: e8 a5 fc ff ff call 5c0 <peek>
91b: 83 c4 10 add $0x10,%esp
91e: 85 c0 test %eax,%eax
920: 74 4a je 96c <parseblock+0x6c>
panic("parseblock");
gettoken(ps, es, 0, 0);
922: 6a 00 push $0x0
924: 6a 00 push $0x0
926: 56 push %esi
927: 53 push %ebx
928: e8 23 fb ff ff call 450 <gettoken>
cmd = parseline(ps, es);
92d: 58 pop %eax
92e: 5a pop %edx
92f: 56 push %esi
930: 53 push %ebx
931: e8 2a ff ff ff call 860 <parseline>
if(!peek(ps, es, ")"))
936: 83 c4 0c add $0xc,%esp
struct cmd *cmd;
if(!peek(ps, es, "("))
panic("parseblock");
gettoken(ps, es, 0, 0);
cmd = parseline(ps, es);
939: 89 c7 mov %eax,%edi
if(!peek(ps, es, ")"))
93b: 68 00 12 00 00 push $0x1200
940: 56 push %esi
941: 53 push %ebx
942: e8 79 fc ff ff call 5c0 <peek>
947: 83 c4 10 add $0x10,%esp
94a: 85 c0 test %eax,%eax
94c: 74 2b je 979 <parseblock+0x79>
panic("syntax - missing )");
gettoken(ps, es, 0, 0);
94e: 6a 00 push $0x0
950: 6a 00 push $0x0
952: 56 push %esi
953: 53 push %ebx
954: e8 f7 fa ff ff call 450 <gettoken>
cmd = parseredirs(cmd, ps, es);
959: 83 c4 0c add $0xc,%esp
95c: 56 push %esi
95d: 53 push %ebx
95e: 57 push %edi
95f: e8 cc fc ff ff call 630 <parseredirs>
return cmd;
}
964: 8d 65 f4 lea -0xc(%ebp),%esp
967: 5b pop %ebx
968: 5e pop %esi
969: 5f pop %edi
96a: 5d pop %ebp
96b: c3 ret
parseblock(char **ps, char *es)
{
struct cmd *cmd;
if(!peek(ps, es, "("))
panic("parseblock");
96c: 83 ec 0c sub $0xc,%esp
96f: 68 e4 11 00 00 push $0x11e4
974: e8 d7 f7 ff ff call 150 <panic>
gettoken(ps, es, 0, 0);
cmd = parseline(ps, es);
if(!peek(ps, es, ")"))
panic("syntax - missing )");
979: 83 ec 0c sub $0xc,%esp
97c: 68 ef 11 00 00 push $0x11ef
981: e8 ca f7 ff ff call 150 <panic>
986: 8d 76 00 lea 0x0(%esi),%esi
989: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000990 <nulterminate>:
}
// NUL-terminate all the counted strings.
struct cmd*
nulterminate(struct cmd *cmd)
{
990: 55 push %ebp
991: 89 e5 mov %esp,%ebp
993: 53 push %ebx
994: 83 ec 04 sub $0x4,%esp
997: 8b 5d 08 mov 0x8(%ebp),%ebx
struct execcmd *ecmd;
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
99a: 85 db test %ebx,%ebx
99c: 0f 84 96 00 00 00 je a38 <nulterminate+0xa8>
return 0;
switch(cmd->type){
9a2: 83 3b 05 cmpl $0x5,(%ebx)
9a5: 77 48 ja 9ef <nulterminate+0x5f>
9a7: 8b 03 mov (%ebx),%eax
9a9: ff 24 85 40 12 00 00 jmp *0x1240(,%eax,4)
nulterminate(pcmd->right);
break;
case LIST:
lcmd = (struct listcmd*)cmd;
nulterminate(lcmd->left);
9b0: 83 ec 0c sub $0xc,%esp
9b3: ff 73 04 pushl 0x4(%ebx)
9b6: e8 d5 ff ff ff call 990 <nulterminate>
nulterminate(lcmd->right);
9bb: 58 pop %eax
9bc: ff 73 08 pushl 0x8(%ebx)
9bf: e8 cc ff ff ff call 990 <nulterminate>
break;
9c4: 83 c4 10 add $0x10,%esp
9c7: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
9c9: 8b 5d fc mov -0x4(%ebp),%ebx
9cc: c9 leave
9cd: c3 ret
9ce: 66 90 xchg %ax,%ax
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
9d0: 8b 4b 04 mov 0x4(%ebx),%ecx
9d3: 8d 43 2c lea 0x2c(%ebx),%eax
9d6: 85 c9 test %ecx,%ecx
9d8: 74 15 je 9ef <nulterminate+0x5f>
9da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
*ecmd->eargv[i] = 0;
9e0: 8b 10 mov (%eax),%edx
9e2: 83 c0 04 add $0x4,%eax
9e5: c6 02 00 movb $0x0,(%edx)
return 0;
switch(cmd->type){
case EXEC:
ecmd = (struct execcmd*)cmd;
for(i=0; ecmd->argv[i]; i++)
9e8: 8b 50 d8 mov -0x28(%eax),%edx
9eb: 85 d2 test %edx,%edx
9ed: 75 f1 jne 9e0 <nulterminate+0x50>
struct redircmd *rcmd;
if(cmd == 0)
return 0;
switch(cmd->type){
9ef: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
9f1: 8b 5d fc mov -0x4(%ebp),%ebx
9f4: c9 leave
9f5: c3 ret
9f6: 8d 76 00 lea 0x0(%esi),%esi
9f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
nulterminate(lcmd->right);
break;
case BACK:
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
a00: 83 ec 0c sub $0xc,%esp
a03: ff 73 04 pushl 0x4(%ebx)
a06: e8 85 ff ff ff call 990 <nulterminate>
break;
a0b: 89 d8 mov %ebx,%eax
a0d: 83 c4 10 add $0x10,%esp
}
return cmd;
}
a10: 8b 5d fc mov -0x4(%ebp),%ebx
a13: c9 leave
a14: c3 ret
a15: 8d 76 00 lea 0x0(%esi),%esi
*ecmd->eargv[i] = 0;
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
nulterminate(rcmd->cmd);
a18: 83 ec 0c sub $0xc,%esp
a1b: ff 73 04 pushl 0x4(%ebx)
a1e: e8 6d ff ff ff call 990 <nulterminate>
*rcmd->efile = 0;
a23: 8b 43 0c mov 0xc(%ebx),%eax
break;
a26: 83 c4 10 add $0x10,%esp
break;
case REDIR:
rcmd = (struct redircmd*)cmd;
nulterminate(rcmd->cmd);
*rcmd->efile = 0;
a29: c6 00 00 movb $0x0,(%eax)
break;
a2c: 89 d8 mov %ebx,%eax
bcmd = (struct backcmd*)cmd;
nulterminate(bcmd->cmd);
break;
}
return cmd;
}
a2e: 8b 5d fc mov -0x4(%ebp),%ebx
a31: c9 leave
a32: c3 ret
a33: 90 nop
a34: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
struct listcmd *lcmd;
struct pipecmd *pcmd;
struct redircmd *rcmd;
if(cmd == 0)
return 0;
a38: 31 c0 xor %eax,%eax
a3a: eb 8d jmp 9c9 <nulterminate+0x39>
a3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000a40 <parsecmd>:
struct cmd *parseexec(char**, char*);
struct cmd *nulterminate(struct cmd*);
struct cmd*
parsecmd(char *s)
{
a40: 55 push %ebp
a41: 89 e5 mov %esp,%ebp
a43: 56 push %esi
a44: 53 push %ebx
char *es;
struct cmd *cmd;
es = s + strlen(s);
a45: 8b 5d 08 mov 0x8(%ebp),%ebx
a48: 83 ec 0c sub $0xc,%esp
a4b: 53 push %ebx
a4c: e8 df 00 00 00 call b30 <strlen>
cmd = parseline(&s, es);
a51: 59 pop %ecx
parsecmd(char *s)
{
char *es;
struct cmd *cmd;
es = s + strlen(s);
a52: 01 c3 add %eax,%ebx
cmd = parseline(&s, es);
a54: 8d 45 08 lea 0x8(%ebp),%eax
a57: 5e pop %esi
a58: 53 push %ebx
a59: 50 push %eax
a5a: e8 01 fe ff ff call 860 <parseline>
a5f: 89 c6 mov %eax,%esi
peek(&s, es, "");
a61: 8d 45 08 lea 0x8(%ebp),%eax
a64: 83 c4 0c add $0xc,%esp
a67: 68 8e 11 00 00 push $0x118e
a6c: 53 push %ebx
a6d: 50 push %eax
a6e: e8 4d fb ff ff call 5c0 <peek>
if(s != es){
a73: 8b 45 08 mov 0x8(%ebp),%eax
a76: 83 c4 10 add $0x10,%esp
a79: 39 c3 cmp %eax,%ebx
a7b: 75 12 jne a8f <parsecmd+0x4f>
printf(2, "leftovers: %s\n", s);
panic("syntax");
}
nulterminate(cmd);
a7d: 83 ec 0c sub $0xc,%esp
a80: 56 push %esi
a81: e8 0a ff ff ff call 990 <nulterminate>
return cmd;
}
a86: 8d 65 f8 lea -0x8(%ebp),%esp
a89: 89 f0 mov %esi,%eax
a8b: 5b pop %ebx
a8c: 5e pop %esi
a8d: 5d pop %ebp
a8e: c3 ret
es = s + strlen(s);
cmd = parseline(&s, es);
peek(&s, es, "");
if(s != es){
printf(2, "leftovers: %s\n", s);
a8f: 52 push %edx
a90: 50 push %eax
a91: 68 02 12 00 00 push $0x1202
a96: 6a 02 push $0x2
a98: e8 b3 03 00 00 call e50 <printf>
panic("syntax");
a9d: c7 04 24 c6 11 00 00 movl $0x11c6,(%esp)
aa4: e8 a7 f6 ff ff call 150 <panic>
aa9: 66 90 xchg %ax,%ax
aab: 66 90 xchg %ax,%ax
aad: 66 90 xchg %ax,%ax
aaf: 90 nop
00000ab0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
ab0: 55 push %ebp
ab1: 89 e5 mov %esp,%ebp
ab3: 53 push %ebx
ab4: 8b 45 08 mov 0x8(%ebp),%eax
ab7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
aba: 89 c2 mov %eax,%edx
abc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ac0: 83 c1 01 add $0x1,%ecx
ac3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
ac7: 83 c2 01 add $0x1,%edx
aca: 84 db test %bl,%bl
acc: 88 5a ff mov %bl,-0x1(%edx)
acf: 75 ef jne ac0 <strcpy+0x10>
;
return os;
}
ad1: 5b pop %ebx
ad2: 5d pop %ebp
ad3: c3 ret
ad4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ada: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000ae0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
ae0: 55 push %ebp
ae1: 89 e5 mov %esp,%ebp
ae3: 56 push %esi
ae4: 53 push %ebx
ae5: 8b 55 08 mov 0x8(%ebp),%edx
ae8: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
aeb: 0f b6 02 movzbl (%edx),%eax
aee: 0f b6 19 movzbl (%ecx),%ebx
af1: 84 c0 test %al,%al
af3: 75 1e jne b13 <strcmp+0x33>
af5: eb 29 jmp b20 <strcmp+0x40>
af7: 89 f6 mov %esi,%esi
af9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
b00: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b03: 0f b6 02 movzbl (%edx),%eax
p++, q++;
b06: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b09: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
b0d: 84 c0 test %al,%al
b0f: 74 0f je b20 <strcmp+0x40>
b11: 89 f1 mov %esi,%ecx
b13: 38 d8 cmp %bl,%al
b15: 74 e9 je b00 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
b17: 29 d8 sub %ebx,%eax
}
b19: 5b pop %ebx
b1a: 5e pop %esi
b1b: 5d pop %ebp
b1c: c3 ret
b1d: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
b20: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
b22: 29 d8 sub %ebx,%eax
}
b24: 5b pop %ebx
b25: 5e pop %esi
b26: 5d pop %ebp
b27: c3 ret
b28: 90 nop
b29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000b30 <strlen>:
uint
strlen(char *s)
{
b30: 55 push %ebp
b31: 89 e5 mov %esp,%ebp
b33: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
b36: 80 39 00 cmpb $0x0,(%ecx)
b39: 74 12 je b4d <strlen+0x1d>
b3b: 31 d2 xor %edx,%edx
b3d: 8d 76 00 lea 0x0(%esi),%esi
b40: 83 c2 01 add $0x1,%edx
b43: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
b47: 89 d0 mov %edx,%eax
b49: 75 f5 jne b40 <strlen+0x10>
;
return n;
}
b4b: 5d pop %ebp
b4c: c3 ret
uint
strlen(char *s)
{
int n;
for(n = 0; s[n]; n++)
b4d: 31 c0 xor %eax,%eax
;
return n;
}
b4f: 5d pop %ebp
b50: c3 ret
b51: eb 0d jmp b60 <memset>
b53: 90 nop
b54: 90 nop
b55: 90 nop
b56: 90 nop
b57: 90 nop
b58: 90 nop
b59: 90 nop
b5a: 90 nop
b5b: 90 nop
b5c: 90 nop
b5d: 90 nop
b5e: 90 nop
b5f: 90 nop
00000b60 <memset>:
void*
memset(void *dst, int c, uint n)
{
b60: 55 push %ebp
b61: 89 e5 mov %esp,%ebp
b63: 57 push %edi
b64: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
b67: 8b 4d 10 mov 0x10(%ebp),%ecx
b6a: 8b 45 0c mov 0xc(%ebp),%eax
b6d: 89 d7 mov %edx,%edi
b6f: fc cld
b70: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
b72: 89 d0 mov %edx,%eax
b74: 5f pop %edi
b75: 5d pop %ebp
b76: c3 ret
b77: 89 f6 mov %esi,%esi
b79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000b80 <strchr>:
char*
strchr(const char *s, char c)
{
b80: 55 push %ebp
b81: 89 e5 mov %esp,%ebp
b83: 53 push %ebx
b84: 8b 45 08 mov 0x8(%ebp),%eax
b87: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
b8a: 0f b6 10 movzbl (%eax),%edx
b8d: 84 d2 test %dl,%dl
b8f: 74 1d je bae <strchr+0x2e>
if(*s == c)
b91: 38 d3 cmp %dl,%bl
b93: 89 d9 mov %ebx,%ecx
b95: 75 0d jne ba4 <strchr+0x24>
b97: eb 17 jmp bb0 <strchr+0x30>
b99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
ba0: 38 ca cmp %cl,%dl
ba2: 74 0c je bb0 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
ba4: 83 c0 01 add $0x1,%eax
ba7: 0f b6 10 movzbl (%eax),%edx
baa: 84 d2 test %dl,%dl
bac: 75 f2 jne ba0 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
bae: 31 c0 xor %eax,%eax
}
bb0: 5b pop %ebx
bb1: 5d pop %ebp
bb2: c3 ret
bb3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000bc0 <gets>:
char*
gets(char *buf, int max)
{
bc0: 55 push %ebp
bc1: 89 e5 mov %esp,%ebp
bc3: 57 push %edi
bc4: 56 push %esi
bc5: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
bc6: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
bc8: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
bcb: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
bce: eb 29 jmp bf9 <gets+0x39>
cc = read(0, &c, 1);
bd0: 83 ec 04 sub $0x4,%esp
bd3: 6a 01 push $0x1
bd5: 57 push %edi
bd6: 6a 00 push $0x0
bd8: e8 2d 01 00 00 call d0a <read>
if(cc < 1)
bdd: 83 c4 10 add $0x10,%esp
be0: 85 c0 test %eax,%eax
be2: 7e 1d jle c01 <gets+0x41>
break;
buf[i++] = c;
be4: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
be8: 8b 55 08 mov 0x8(%ebp),%edx
beb: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
bed: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
bef: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
bf3: 74 1b je c10 <gets+0x50>
bf5: 3c 0d cmp $0xd,%al
bf7: 74 17 je c10 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
bf9: 8d 5e 01 lea 0x1(%esi),%ebx
bfc: 3b 5d 0c cmp 0xc(%ebp),%ebx
bff: 7c cf jl bd0 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c01: 8b 45 08 mov 0x8(%ebp),%eax
c04: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
c08: 8d 65 f4 lea -0xc(%ebp),%esp
c0b: 5b pop %ebx
c0c: 5e pop %esi
c0d: 5f pop %edi
c0e: 5d pop %ebp
c0f: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c10: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
c13: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
c15: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
c19: 8d 65 f4 lea -0xc(%ebp),%esp
c1c: 5b pop %ebx
c1d: 5e pop %esi
c1e: 5f pop %edi
c1f: 5d pop %ebp
c20: c3 ret
c21: eb 0d jmp c30 <stat>
c23: 90 nop
c24: 90 nop
c25: 90 nop
c26: 90 nop
c27: 90 nop
c28: 90 nop
c29: 90 nop
c2a: 90 nop
c2b: 90 nop
c2c: 90 nop
c2d: 90 nop
c2e: 90 nop
c2f: 90 nop
00000c30 <stat>:
int
stat(char *n, struct stat *st)
{
c30: 55 push %ebp
c31: 89 e5 mov %esp,%ebp
c33: 56 push %esi
c34: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
c35: 83 ec 08 sub $0x8,%esp
c38: 6a 00 push $0x0
c3a: ff 75 08 pushl 0x8(%ebp)
c3d: e8 f0 00 00 00 call d32 <open>
if(fd < 0)
c42: 83 c4 10 add $0x10,%esp
c45: 85 c0 test %eax,%eax
c47: 78 27 js c70 <stat+0x40>
return -1;
r = fstat(fd, st);
c49: 83 ec 08 sub $0x8,%esp
c4c: ff 75 0c pushl 0xc(%ebp)
c4f: 89 c3 mov %eax,%ebx
c51: 50 push %eax
c52: e8 f3 00 00 00 call d4a <fstat>
c57: 89 c6 mov %eax,%esi
close(fd);
c59: 89 1c 24 mov %ebx,(%esp)
c5c: e8 b9 00 00 00 call d1a <close>
return r;
c61: 83 c4 10 add $0x10,%esp
c64: 89 f0 mov %esi,%eax
}
c66: 8d 65 f8 lea -0x8(%ebp),%esp
c69: 5b pop %ebx
c6a: 5e pop %esi
c6b: 5d pop %ebp
c6c: c3 ret
c6d: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
c70: b8 ff ff ff ff mov $0xffffffff,%eax
c75: eb ef jmp c66 <stat+0x36>
c77: 89 f6 mov %esi,%esi
c79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000c80 <atoi>:
return r;
}
int
atoi(const char *s)
{
c80: 55 push %ebp
c81: 89 e5 mov %esp,%ebp
c83: 53 push %ebx
c84: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
c87: 0f be 11 movsbl (%ecx),%edx
c8a: 8d 42 d0 lea -0x30(%edx),%eax
c8d: 3c 09 cmp $0x9,%al
c8f: b8 00 00 00 00 mov $0x0,%eax
c94: 77 1f ja cb5 <atoi+0x35>
c96: 8d 76 00 lea 0x0(%esi),%esi
c99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
ca0: 8d 04 80 lea (%eax,%eax,4),%eax
ca3: 83 c1 01 add $0x1,%ecx
ca6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
caa: 0f be 11 movsbl (%ecx),%edx
cad: 8d 5a d0 lea -0x30(%edx),%ebx
cb0: 80 fb 09 cmp $0x9,%bl
cb3: 76 eb jbe ca0 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
cb5: 5b pop %ebx
cb6: 5d pop %ebp
cb7: c3 ret
cb8: 90 nop
cb9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000cc0 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
cc0: 55 push %ebp
cc1: 89 e5 mov %esp,%ebp
cc3: 56 push %esi
cc4: 53 push %ebx
cc5: 8b 5d 10 mov 0x10(%ebp),%ebx
cc8: 8b 45 08 mov 0x8(%ebp),%eax
ccb: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
cce: 85 db test %ebx,%ebx
cd0: 7e 14 jle ce6 <memmove+0x26>
cd2: 31 d2 xor %edx,%edx
cd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
cd8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
cdc: 88 0c 10 mov %cl,(%eax,%edx,1)
cdf: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
ce2: 39 da cmp %ebx,%edx
ce4: 75 f2 jne cd8 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
ce6: 5b pop %ebx
ce7: 5e pop %esi
ce8: 5d pop %ebp
ce9: c3 ret
00000cea <fork>:
cea: b8 01 00 00 00 mov $0x1,%eax
cef: cd 40 int $0x40
cf1: c3 ret
00000cf2 <exit>:
cf2: b8 02 00 00 00 mov $0x2,%eax
cf7: cd 40 int $0x40
cf9: c3 ret
00000cfa <wait>:
cfa: b8 03 00 00 00 mov $0x3,%eax
cff: cd 40 int $0x40
d01: c3 ret
00000d02 <pipe>:
d02: b8 04 00 00 00 mov $0x4,%eax
d07: cd 40 int $0x40
d09: c3 ret
00000d0a <read>:
d0a: b8 05 00 00 00 mov $0x5,%eax
d0f: cd 40 int $0x40
d11: c3 ret
00000d12 <write>:
d12: b8 10 00 00 00 mov $0x10,%eax
d17: cd 40 int $0x40
d19: c3 ret
00000d1a <close>:
d1a: b8 15 00 00 00 mov $0x15,%eax
d1f: cd 40 int $0x40
d21: c3 ret
00000d22 <kill>:
d22: b8 06 00 00 00 mov $0x6,%eax
d27: cd 40 int $0x40
d29: c3 ret
00000d2a <exec>:
d2a: b8 07 00 00 00 mov $0x7,%eax
d2f: cd 40 int $0x40
d31: c3 ret
00000d32 <open>:
d32: b8 0f 00 00 00 mov $0xf,%eax
d37: cd 40 int $0x40
d39: c3 ret
00000d3a <mknod>:
d3a: b8 11 00 00 00 mov $0x11,%eax
d3f: cd 40 int $0x40
d41: c3 ret
00000d42 <unlink>:
d42: b8 12 00 00 00 mov $0x12,%eax
d47: cd 40 int $0x40
d49: c3 ret
00000d4a <fstat>:
d4a: b8 08 00 00 00 mov $0x8,%eax
d4f: cd 40 int $0x40
d51: c3 ret
00000d52 <link>:
d52: b8 13 00 00 00 mov $0x13,%eax
d57: cd 40 int $0x40
d59: c3 ret
00000d5a <mkdir>:
d5a: b8 14 00 00 00 mov $0x14,%eax
d5f: cd 40 int $0x40
d61: c3 ret
00000d62 <chdir>:
d62: b8 09 00 00 00 mov $0x9,%eax
d67: cd 40 int $0x40
d69: c3 ret
00000d6a <dup>:
d6a: b8 0a 00 00 00 mov $0xa,%eax
d6f: cd 40 int $0x40
d71: c3 ret
00000d72 <getpid>:
d72: b8 0b 00 00 00 mov $0xb,%eax
d77: cd 40 int $0x40
d79: c3 ret
00000d7a <sbrk>:
d7a: b8 0c 00 00 00 mov $0xc,%eax
d7f: cd 40 int $0x40
d81: c3 ret
00000d82 <sleep>:
d82: b8 0d 00 00 00 mov $0xd,%eax
d87: cd 40 int $0x40
d89: c3 ret
00000d8a <uptime>:
d8a: b8 0e 00 00 00 mov $0xe,%eax
d8f: cd 40 int $0x40
d91: c3 ret
00000d92 <cps>:
d92: b8 16 00 00 00 mov $0x16,%eax
d97: cd 40 int $0x40
d99: c3 ret
00000d9a <cht>:
d9a: b8 17 00 00 00 mov $0x17,%eax
d9f: cd 40 int $0x40
da1: c3 ret
da2: 66 90 xchg %ax,%ax
da4: 66 90 xchg %ax,%ax
da6: 66 90 xchg %ax,%ax
da8: 66 90 xchg %ax,%ax
daa: 66 90 xchg %ax,%ax
dac: 66 90 xchg %ax,%ax
dae: 66 90 xchg %ax,%ax
00000db0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
db0: 55 push %ebp
db1: 89 e5 mov %esp,%ebp
db3: 57 push %edi
db4: 56 push %esi
db5: 53 push %ebx
db6: 89 c6 mov %eax,%esi
db8: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
dbb: 8b 5d 08 mov 0x8(%ebp),%ebx
dbe: 85 db test %ebx,%ebx
dc0: 74 7e je e40 <printint+0x90>
dc2: 89 d0 mov %edx,%eax
dc4: c1 e8 1f shr $0x1f,%eax
dc7: 84 c0 test %al,%al
dc9: 74 75 je e40 <printint+0x90>
neg = 1;
x = -xx;
dcb: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
dcd: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
x = -xx;
dd4: f7 d8 neg %eax
dd6: 89 75 c0 mov %esi,-0x40(%ebp)
} else {
x = xx;
}
i = 0;
dd9: 31 ff xor %edi,%edi
ddb: 8d 5d d7 lea -0x29(%ebp),%ebx
dde: 89 ce mov %ecx,%esi
de0: eb 08 jmp dea <printint+0x3a>
de2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
de8: 89 cf mov %ecx,%edi
dea: 31 d2 xor %edx,%edx
dec: 8d 4f 01 lea 0x1(%edi),%ecx
def: f7 f6 div %esi
df1: 0f b6 92 60 12 00 00 movzbl 0x1260(%edx),%edx
}while((x /= base) != 0);
df8: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
dfa: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
dfd: 75 e9 jne de8 <printint+0x38>
if(neg)
dff: 8b 45 c4 mov -0x3c(%ebp),%eax
e02: 8b 75 c0 mov -0x40(%ebp),%esi
e05: 85 c0 test %eax,%eax
e07: 74 08 je e11 <printint+0x61>
buf[i++] = '-';
e09: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
e0e: 8d 4f 02 lea 0x2(%edi),%ecx
e11: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi
e15: 8d 76 00 lea 0x0(%esi),%esi
e18: 0f b6 07 movzbl (%edi),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
e1b: 83 ec 04 sub $0x4,%esp
e1e: 83 ef 01 sub $0x1,%edi
e21: 6a 01 push $0x1
e23: 53 push %ebx
e24: 56 push %esi
e25: 88 45 d7 mov %al,-0x29(%ebp)
e28: e8 e5 fe ff ff call d12 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
e2d: 83 c4 10 add $0x10,%esp
e30: 39 df cmp %ebx,%edi
e32: 75 e4 jne e18 <printint+0x68>
putc(fd, buf[i]);
}
e34: 8d 65 f4 lea -0xc(%ebp),%esp
e37: 5b pop %ebx
e38: 5e pop %esi
e39: 5f pop %edi
e3a: 5d pop %ebp
e3b: c3 ret
e3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
e40: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
e42: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
e49: eb 8b jmp dd6 <printint+0x26>
e4b: 90 nop
e4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000e50 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e50: 55 push %ebp
e51: 89 e5 mov %esp,%ebp
e53: 57 push %edi
e54: 56 push %esi
e55: 53 push %ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e56: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e59: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e5c: 8b 75 0c mov 0xc(%ebp),%esi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
e5f: 8b 7d 08 mov 0x8(%ebp),%edi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
e62: 89 45 d0 mov %eax,-0x30(%ebp)
e65: 0f b6 1e movzbl (%esi),%ebx
e68: 83 c6 01 add $0x1,%esi
e6b: 84 db test %bl,%bl
e6d: 0f 84 b0 00 00 00 je f23 <printf+0xd3>
e73: 31 d2 xor %edx,%edx
e75: eb 39 jmp eb0 <printf+0x60>
e77: 89 f6 mov %esi,%esi
e79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
e80: 83 f8 25 cmp $0x25,%eax
e83: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
e86: ba 25 00 00 00 mov $0x25,%edx
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
e8b: 74 18 je ea5 <printf+0x55>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
e8d: 8d 45 e2 lea -0x1e(%ebp),%eax
e90: 83 ec 04 sub $0x4,%esp
e93: 88 5d e2 mov %bl,-0x1e(%ebp)
e96: 6a 01 push $0x1
e98: 50 push %eax
e99: 57 push %edi
e9a: e8 73 fe ff ff call d12 <write>
e9f: 8b 55 d4 mov -0x2c(%ebp),%edx
ea2: 83 c4 10 add $0x10,%esp
ea5: 83 c6 01 add $0x1,%esi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
ea8: 0f b6 5e ff movzbl -0x1(%esi),%ebx
eac: 84 db test %bl,%bl
eae: 74 73 je f23 <printf+0xd3>
c = fmt[i] & 0xff;
if(state == 0){
eb0: 85 d2 test %edx,%edx
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
eb2: 0f be cb movsbl %bl,%ecx
eb5: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
eb8: 74 c6 je e80 <printf+0x30>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
eba: 83 fa 25 cmp $0x25,%edx
ebd: 75 e6 jne ea5 <printf+0x55>
if(c == 'd'){
ebf: 83 f8 64 cmp $0x64,%eax
ec2: 0f 84 f8 00 00 00 je fc0 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
ec8: 81 e1 f7 00 00 00 and $0xf7,%ecx
ece: 83 f9 70 cmp $0x70,%ecx
ed1: 74 5d je f30 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
ed3: 83 f8 73 cmp $0x73,%eax
ed6: 0f 84 84 00 00 00 je f60 <printf+0x110>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
edc: 83 f8 63 cmp $0x63,%eax
edf: 0f 84 ea 00 00 00 je fcf <printf+0x17f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
ee5: 83 f8 25 cmp $0x25,%eax
ee8: 0f 84 c2 00 00 00 je fb0 <printf+0x160>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
eee: 8d 45 e7 lea -0x19(%ebp),%eax
ef1: 83 ec 04 sub $0x4,%esp
ef4: c6 45 e7 25 movb $0x25,-0x19(%ebp)
ef8: 6a 01 push $0x1
efa: 50 push %eax
efb: 57 push %edi
efc: e8 11 fe ff ff call d12 <write>
f01: 83 c4 0c add $0xc,%esp
f04: 8d 45 e6 lea -0x1a(%ebp),%eax
f07: 88 5d e6 mov %bl,-0x1a(%ebp)
f0a: 6a 01 push $0x1
f0c: 50 push %eax
f0d: 57 push %edi
f0e: 83 c6 01 add $0x1,%esi
f11: e8 fc fd ff ff call d12 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
f16: 0f b6 5e ff movzbl -0x1(%esi),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f1a: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f1d: 31 d2 xor %edx,%edx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
f1f: 84 db test %bl,%bl
f21: 75 8d jne eb0 <printf+0x60>
putc(fd, c);
}
state = 0;
}
}
}
f23: 8d 65 f4 lea -0xc(%ebp),%esp
f26: 5b pop %ebx
f27: 5e pop %esi
f28: 5f pop %edi
f29: 5d pop %ebp
f2a: c3 ret
f2b: 90 nop
f2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
f30: 83 ec 0c sub $0xc,%esp
f33: b9 10 00 00 00 mov $0x10,%ecx
f38: 6a 00 push $0x0
f3a: 8b 5d d0 mov -0x30(%ebp),%ebx
f3d: 89 f8 mov %edi,%eax
f3f: 8b 13 mov (%ebx),%edx
f41: e8 6a fe ff ff call db0 <printint>
ap++;
f46: 89 d8 mov %ebx,%eax
f48: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f4b: 31 d2 xor %edx,%edx
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
f4d: 83 c0 04 add $0x4,%eax
f50: 89 45 d0 mov %eax,-0x30(%ebp)
f53: e9 4d ff ff ff jmp ea5 <printf+0x55>
f58: 90 nop
f59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
f60: 8b 45 d0 mov -0x30(%ebp),%eax
f63: 8b 18 mov (%eax),%ebx
ap++;
f65: 83 c0 04 add $0x4,%eax
f68: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
s = "(null)";
f6b: b8 58 12 00 00 mov $0x1258,%eax
f70: 85 db test %ebx,%ebx
f72: 0f 44 d8 cmove %eax,%ebx
while(*s != 0){
f75: 0f b6 03 movzbl (%ebx),%eax
f78: 84 c0 test %al,%al
f7a: 74 23 je f9f <printf+0x14f>
f7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
f80: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f83: 8d 45 e3 lea -0x1d(%ebp),%eax
f86: 83 ec 04 sub $0x4,%esp
f89: 6a 01 push $0x1
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
f8b: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
f8e: 50 push %eax
f8f: 57 push %edi
f90: e8 7d fd ff ff call d12 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
f95: 0f b6 03 movzbl (%ebx),%eax
f98: 83 c4 10 add $0x10,%esp
f9b: 84 c0 test %al,%al
f9d: 75 e1 jne f80 <printf+0x130>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
f9f: 31 d2 xor %edx,%edx
fa1: e9 ff fe ff ff jmp ea5 <printf+0x55>
fa6: 8d 76 00 lea 0x0(%esi),%esi
fa9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
fb0: 83 ec 04 sub $0x4,%esp
fb3: 88 5d e5 mov %bl,-0x1b(%ebp)
fb6: 8d 45 e5 lea -0x1b(%ebp),%eax
fb9: 6a 01 push $0x1
fbb: e9 4c ff ff ff jmp f0c <printf+0xbc>
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
fc0: 83 ec 0c sub $0xc,%esp
fc3: b9 0a 00 00 00 mov $0xa,%ecx
fc8: 6a 01 push $0x1
fca: e9 6b ff ff ff jmp f3a <printf+0xea>
fcf: 8b 5d d0 mov -0x30(%ebp),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
fd2: 83 ec 04 sub $0x4,%esp
fd5: 8b 03 mov (%ebx),%eax
fd7: 6a 01 push $0x1
fd9: 88 45 e4 mov %al,-0x1c(%ebp)
fdc: 8d 45 e4 lea -0x1c(%ebp),%eax
fdf: 50 push %eax
fe0: 57 push %edi
fe1: e8 2c fd ff ff call d12 <write>
fe6: e9 5b ff ff ff jmp f46 <printf+0xf6>
feb: 66 90 xchg %ax,%ax
fed: 66 90 xchg %ax,%ax
fef: 90 nop
00000ff0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
ff0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
ff1: a1 84 18 00 00 mov 0x1884,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
ff6: 89 e5 mov %esp,%ebp
ff8: 57 push %edi
ff9: 56 push %esi
ffa: 53 push %ebx
ffb: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
ffe: 8b 10 mov (%eax),%edx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
1000: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1003: 39 c8 cmp %ecx,%eax
1005: 73 19 jae 1020 <free+0x30>
1007: 89 f6 mov %esi,%esi
1009: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
1010: 39 d1 cmp %edx,%ecx
1012: 72 1c jb 1030 <free+0x40>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1014: 39 d0 cmp %edx,%eax
1016: 73 18 jae 1030 <free+0x40>
static Header base;
static Header *freep;
void
free(void *ap)
{
1018: 89 d0 mov %edx,%eax
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
101a: 39 c8 cmp %ecx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
101c: 8b 10 mov (%eax),%edx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
101e: 72 f0 jb 1010 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1020: 39 d0 cmp %edx,%eax
1022: 72 f4 jb 1018 <free+0x28>
1024: 39 d1 cmp %edx,%ecx
1026: 73 f0 jae 1018 <free+0x28>
1028: 90 nop
1029: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(bp + bp->s.size == p->s.ptr){
1030: 8b 73 fc mov -0x4(%ebx),%esi
1033: 8d 3c f1 lea (%ecx,%esi,8),%edi
1036: 39 d7 cmp %edx,%edi
1038: 74 19 je 1053 <free+0x63>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
103a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
103d: 8b 50 04 mov 0x4(%eax),%edx
1040: 8d 34 d0 lea (%eax,%edx,8),%esi
1043: 39 f1 cmp %esi,%ecx
1045: 74 23 je 106a <free+0x7a>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
1047: 89 08 mov %ecx,(%eax)
freep = p;
1049: a3 84 18 00 00 mov %eax,0x1884
}
104e: 5b pop %ebx
104f: 5e pop %esi
1050: 5f pop %edi
1051: 5d pop %ebp
1052: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
1053: 03 72 04 add 0x4(%edx),%esi
1056: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
1059: 8b 10 mov (%eax),%edx
105b: 8b 12 mov (%edx),%edx
105d: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
1060: 8b 50 04 mov 0x4(%eax),%edx
1063: 8d 34 d0 lea (%eax,%edx,8),%esi
1066: 39 f1 cmp %esi,%ecx
1068: 75 dd jne 1047 <free+0x57>
p->s.size += bp->s.size;
106a: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
106d: a3 84 18 00 00 mov %eax,0x1884
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
1072: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
1075: 8b 53 f8 mov -0x8(%ebx),%edx
1078: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
107a: 5b pop %ebx
107b: 5e pop %esi
107c: 5f pop %edi
107d: 5d pop %ebp
107e: c3 ret
107f: 90 nop
00001080 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
1080: 55 push %ebp
1081: 89 e5 mov %esp,%ebp
1083: 57 push %edi
1084: 56 push %esi
1085: 53 push %ebx
1086: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1089: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
108c: 8b 15 84 18 00 00 mov 0x1884,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
1092: 8d 78 07 lea 0x7(%eax),%edi
1095: c1 ef 03 shr $0x3,%edi
1098: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
109b: 85 d2 test %edx,%edx
109d: 0f 84 a3 00 00 00 je 1146 <malloc+0xc6>
10a3: 8b 02 mov (%edx),%eax
10a5: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
10a8: 39 cf cmp %ecx,%edi
10aa: 76 74 jbe 1120 <malloc+0xa0>
10ac: 81 ff 00 10 00 00 cmp $0x1000,%edi
10b2: be 00 10 00 00 mov $0x1000,%esi
10b7: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
10be: 0f 43 f7 cmovae %edi,%esi
10c1: ba 00 80 00 00 mov $0x8000,%edx
10c6: 81 ff ff 0f 00 00 cmp $0xfff,%edi
10cc: 0f 46 da cmovbe %edx,%ebx
10cf: eb 10 jmp 10e1 <malloc+0x61>
10d1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
10d8: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
10da: 8b 48 04 mov 0x4(%eax),%ecx
10dd: 39 cf cmp %ecx,%edi
10df: 76 3f jbe 1120 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
10e1: 39 05 84 18 00 00 cmp %eax,0x1884
10e7: 89 c2 mov %eax,%edx
10e9: 75 ed jne 10d8 <malloc+0x58>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
10eb: 83 ec 0c sub $0xc,%esp
10ee: 53 push %ebx
10ef: e8 86 fc ff ff call d7a <sbrk>
if(p == (char*)-1)
10f4: 83 c4 10 add $0x10,%esp
10f7: 83 f8 ff cmp $0xffffffff,%eax
10fa: 74 1c je 1118 <malloc+0x98>
return 0;
hp = (Header*)p;
hp->s.size = nu;
10fc: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
10ff: 83 ec 0c sub $0xc,%esp
1102: 83 c0 08 add $0x8,%eax
1105: 50 push %eax
1106: e8 e5 fe ff ff call ff0 <free>
return freep;
110b: 8b 15 84 18 00 00 mov 0x1884,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
1111: 83 c4 10 add $0x10,%esp
1114: 85 d2 test %edx,%edx
1116: 75 c0 jne 10d8 <malloc+0x58>
return 0;
1118: 31 c0 xor %eax,%eax
111a: eb 1c jmp 1138 <malloc+0xb8>
111c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
1120: 39 cf cmp %ecx,%edi
1122: 74 1c je 1140 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
1124: 29 f9 sub %edi,%ecx
1126: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
1129: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
112c: 89 78 04 mov %edi,0x4(%eax)
}
freep = prevp;
112f: 89 15 84 18 00 00 mov %edx,0x1884
return (void*)(p + 1);
1135: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
1138: 8d 65 f4 lea -0xc(%ebp),%esp
113b: 5b pop %ebx
113c: 5e pop %esi
113d: 5f pop %edi
113e: 5d pop %ebp
113f: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
1140: 8b 08 mov (%eax),%ecx
1142: 89 0a mov %ecx,(%edx)
1144: eb e9 jmp 112f <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
1146: c7 05 84 18 00 00 88 movl $0x1888,0x1884
114d: 18 00 00
1150: c7 05 88 18 00 00 88 movl $0x1888,0x1888
1157: 18 00 00
base.s.size = 0;
115a: b8 88 18 00 00 mov $0x1888,%eax
115f: c7 05 8c 18 00 00 00 movl $0x0,0x188c
1166: 00 00 00
1169: e9 3e ff ff ff jmp 10ac <malloc+0x2c>
|
; A078042: Expansion of (1-x)/(1+x-x^2+x^3).
; Submitted by Jon Maiga
; 1,-2,3,-6,11,-20,37,-68,125,-230,423,-778,1431,-2632,4841,-8904,16377,-30122,55403,-101902,187427,-344732,634061,-1166220,2145013,-3945294,7256527,-13346834,24548655,-45152016,83047505,-152748176,280947697,-516743378,950439251,-1748130326,3215312955,-5913882532,10877325813,-20006521300,36797729645,-67681576758,124485827703,-228965134106,421132538567,-774583500376,1424681173049,-2620397211992,4819661885417,-8864740270458,16304799367867,-29989201523742,55158741162067,-101452742053676
mov $2,5
lpb $0
sub $0,1
mov $1,$2
mul $2,-2
add $4,$2
mov $2,$4
add $2,$3
mov $3,$1
lpe
mov $0,$2
div $0,5
|
;
; Sharp OZ family functions
;
; ported from the OZ-7xx SDK by by Alexander R. Pruss
; by Stefano Bodrato - Oct. 2003
;
;
; display contrast control functions
;
; ------
; $Id: ozgetcontrast.asm,v 1.3 2016/06/28 14:48:17 dom Exp $
;
SECTION code_clib
PUBLIC ozgetcontrast
PUBLIC _ozgetcontrast
EXTERN ozcontrast
ozgetcontrast:
_ozgetcontrast:
ld a,(ozcontrast)
ld l,a
ld h,0
ret
|
ViridianPokecenterObject:
db $0 ; border block
db $2 ; warps
db $7, $3, $0, $ff
db $7, $4, $0, $ff
db $0 ; signs
db $4 ; objects
object SPRITE_NURSE, $3, $1, STAY, DOWN, $1 ; person
object SPRITE_GENTLEMAN, $a, $5, WALK, $1, $2 ; person
object SPRITE_BLACK_HAIR_BOY_1, $4, $3, STAY, NONE, $3 ; person
object SPRITE_NURSE, $b, $2, STAY, DOWN, $4 ; person
; warp-to
EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $3
EVENT_DISP VIRIDIAN_POKECENTER_WIDTH, $7, $4
|
/*
RandomDiffusionOrder.hpp
process pixels in a diffusion order starting from constraints
but randomized otherwise
Li-Yi Wei
August 27, 2014
*/
#ifndef _RANDOM_DIFFUSION_SEQUENCER_HPP
#define _RANDOM_DIFFUSION_SEQUENCER_HPP
#include <vector>
using namespace std;
#include "Sequencer.hpp"
#include "Neighborhood.hpp"
class RandomDiffusionSequencer : public Sequencer
{
public:
RandomDiffusionSequencer(const vector<Position> & seeds, const Neighborhood & boundary_handler);
virtual ~RandomDiffusionSequencer(void);
virtual bool Reset(const Texture & target);
virtual bool Next(Position & answer);
protected:
const vector<Position> _seeds;
const Neighborhood & _neighborhood;
struct Sortee
{
int key;
Position value;
bool operator<(const Sortee & rhs);
};
private:
vector<Position> _positions;
unsigned int _current_position;
};
#endif
|
; A047592: Numbers that are congruent to {1, 2, 3, 4, 5, 6, 7} mod 8.
; 1,2,3,4,5,6,7,9,10,11,12,13,14,15,17,18,19,20,21,22,23,25,26,27,28,29,30,31,33,34,35,36,37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,57,58,59,60,61,62,63,65,66,67,68,69,70,71,73,74,75,76,77,78,79,81,82,83,84,85,86,87,89,90,91,92,93,94,95,97,98,99,100,101,102,103,105,106,107,108,109,110,111,113,114
mov $1,$0
div $0,7
add $0,$1
add $0,1
|
; A170153: Number of reduced words of length n in Coxeter group on 48 generators S_i with relations (S_i)^2 = (S_i S_j)^38 = I.
; 1,48,2256,106032,4983504,234224688,11008560336,517402335792,24317909782224,1142941759764528,53718262708932816,2524758347319842352,118663642324032590544,5577191189229531755568,262127985893787992511696
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
div $3,$2
mul $2,47
lpe
mov $0,$2
div $0,47
|
; A258650: Tenth arithmetic derivative of n.
; 0,0,0,0,4,0,0,0,8592,0,0,0,20096,0,0,3424,70464,0,0,0,16304,0,0,0,32624,0,1520,27,70464,0,0,0,235072,0,0,8592,47872,0,0,20096,24640,0,0,0,65264,8592,0,0,130544,0,3424,8144,47872,0,57996,20096,198656,0,0,0,198656,0,0,3120,1012858880,0,0,0,84608,752,0,0,296256,0,8592,8592,235072,0,0,0,705280,135648,0,0,2902784,0,3424,70464,12976128,0,16304,8144,1094656,0,0,16304,5474304,0,0,3424
seq $0,258649 ; Ninth arithmetic derivative of n.
seq $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
|
; A198401: 8^n+n^8.
; 1,9,320,7073,69632,423393,1941760,7861953,33554432,177264449,1173741824,8804293473,69149458432,550571544609,4399522300160,35186934979457,281479271677952,2251806789442689,18014409529442560,144115205059418913,1152921530206846976,9223372074677635169,73786976349714080000,590295810437016636993,4722366482979720527872,37778931863109749600193,302231454903866120741120,2417851639229540778948833,19342813113834444597297152,154742504910673034608803489,1237940039285380930999124224
mov $1,8
pow $1,$0
pow $0,8
add $0,$1
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x7aa4, %rsi
lea addresses_UC_ht+0xfd24, %rdi
clflush (%rdi)
nop
and %r14, %r14
mov $80, %rcx
rep movsw
nop
xor $43404, %r10
lea addresses_WC_ht+0x1a164, %rax
clflush (%rax)
sub $50674, %r11
movb $0x61, (%rax)
nop
nop
add $40811, %r11
lea addresses_normal_ht+0x6624, %rsi
lea addresses_WC_ht+0x1b224, %rdi
clflush (%rsi)
cmp %r10, %r10
mov $0, %rcx
rep movsq
nop
nop
and $14450, %r14
lea addresses_WC_ht+0x11a24, %r10
nop
cmp $28336, %rcx
mov $0x6162636465666768, %r14
movq %r14, %xmm1
movups %xmm1, (%r10)
nop
nop
nop
dec %rdi
lea addresses_WC_ht+0x3de4, %rax
nop
nop
nop
and %rdi, %rdi
movb (%rax), %r11b
nop
nop
nop
nop
sub $42991, %rcx
lea addresses_WC_ht+0x144f4, %rcx
xor $64320, %r10
movl $0x61626364, (%rcx)
add $2599, %r10
lea addresses_D_ht+0xa624, %rax
nop
nop
and %rsi, %rsi
and $0xffffffffffffffc0, %rax
vmovaps (%rax), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rdi
add $5987, %r10
lea addresses_D_ht+0x182a4, %rax
nop
nop
nop
nop
cmp %rsi, %rsi
movl $0x61626364, (%rax)
nop
nop
add $56594, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rax
push %rbx
push %rsi
// Store
lea addresses_WT+0x4224, %r8
nop
nop
nop
nop
cmp %rbx, %rbx
mov $0x5152535455565758, %r10
movq %r10, %xmm3
movups %xmm3, (%r8)
nop
inc %r10
// Faulty Load
lea addresses_WT+0x4224, %rax
nop
nop
nop
nop
nop
and %r12, %r12
mov (%rax), %esi
lea oracles, %rax
and $0xff, %rsi
shlq $12, %rsi
mov (%rax,%rsi,1), %rsi
pop %rsi
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'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
*/
|
; A069226: a(n) = gcd(n, 2^n + 1).
; 1,1,3,1,1,1,1,1,9,5,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,27,1,1,5,1,1,3,1,1,1,1,1,3,1,1,1,1,1,9,1,1,1,1,25,3,1,1,1,11,1,3,1,1,1,1,1,9,1,1,1,1,17,3,5,1,1,1,1,3,1,1,13,1,1,81,1,1,1,1,1,3,1,1,5,1,1,3,1,1,1,1,1,9,1
add $0,1
mov $1,2
pow $1,$0
add $1,1
gcd $0,$1
|
/*
* Copyright (c) 2017, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
L0:
(W&~f0.1)jmpi L1600
L16:
mul (1|M0) r11.0<1>:f r25.4<0;1,0>:f 4.0:f
mov (8|M0) acc0.0<1>:f r25.2<0;1,0>:f
mac (1|M0) r23.3<1>:f r11.0<0;1,0>:f 1.0:f
mov (4|M0) r10.0<1>:f 0x5054585C:vf
mov (4|M0) r10.4<1>:f 0x304048:vf
mov (8|M0) r13.0<1>:ud r0.0<8;8,1>:ud
mov (2|M0) r13.0<1>:ud 0x0:ud
mov (1|M0) r13.2<1>:ud 0xE000:ud
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA2C0100:ud
mov (8|M0) acc0.0<1>:f r25.3<0;1,0>:f
mac (8|M0) r16.0<1>:f r25.5<0;1,0>:f r10.0<8;8,1>:f
mac (8|M0) r17.0<1>:f r25.5<0;1,0>:f r10.0<8;8,1>:f
mul (8|M0) acc0.0<1>:f r25.5<0;1,0>:f 8.0:f
add (8|M0) r16.0<1>:f acc0.0<8;8,1>:f r16.0<8;8,1>:f
add (8|M0) r17.0<1>:f acc0.0<8;8,1>:f r17.0<8;8,1>:f
mov (8|M0) acc0.0<1>:f r23.3<0;1,0>:f
mac (8|M0) r14.0<1>:f r25.4<0;1,0>:f r10.7<0;1,0>:f
mac (8|M0) r15.0<1>:f r25.4<0;1,0>:f r10.6<0;1,0>:f
send (16|M0) r88:uw r13:ub 0x2 a0.0
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA4C0201:ud
mov (1|M0) r13.2<1>:ud 0xC000:ud
send (16|M0) r92:uw r13:ub 0x2 a0.0
mul (8|M0) acc0.0<1>:f r25.4<0;1,0>:f 2.0:f
add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f
add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r88.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r80.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r92.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r84.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r94.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r86.0<1>:ud acc0.0<8;8,1>:f
mov (16|M0) r80.0<1>:uw r80.0<16;8,2>:uw
mov (16|M0) r84.0<1>:uw r84.0<16;8,2>:uw
mov (16|M0) r86.0<1>:uw r86.0<16;8,2>:uw
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA2C0100:ud
mov (1|M0) r13.2<1>:ud 0xE000:ud
send (16|M0) r88:uw r13:ub 0x2 a0.0
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA4C0201:ud
mov (1|M0) r13.2<1>:ud 0xC000:ud
send (16|M0) r90:uw r13:ub 0x2 a0.0
mul (8|M0) acc0.0<1>:f r25.5<0;1,0>:f -8.0:f
add (8|M0) r16.0<1>:f acc0.0<8;8,1>:f r16.0<8;8,1>:f
add (8|M0) r17.0<1>:f acc0.0<8;8,1>:f r17.0<8;8,1>:f
mul (8|M0) acc0.0<1>:f r25.4<0;1,0>:f -2.0:f
add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f
add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r88.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r88.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r90.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r90.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r92.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r92.0<1>:ud acc0.0<8;8,1>:f
mov (16|M0) r81.0<1>:uw r88.0<16;8,2>:uw
mov (16|M0) r85.0<1>:uw r90.0<16;8,2>:uw
mov (16|M0) r87.0<1>:uw r92.0<16;8,2>:uw
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA2C0100:ud
mov (1|M0) r13.2<1>:ud 0xE000:ud
send (16|M0) r88:uw r13:ub 0x2 a0.0
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA4C0201:ud
mov (1|M0) r13.2<1>:ud 0xC000:ud
send (16|M0) r92:uw r13:ub 0x2 a0.0
mul (8|M0) acc0.0<1>:f r25.4<0;1,0>:f 2.0:f
add (8|M0) r14.0<1>:f acc0.0<8;8,1>:f r14.0<8;8,1>:f
add (8|M0) r15.0<1>:f acc0.0<8;8,1>:f r15.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r88.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r88.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r92.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r92.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r94.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r94.0<1>:ud acc0.0<8;8,1>:f
mov (16|M0) r10.0<1>:uw r88.0<16;8,2>:uw
mov (16|M0) r11.0<1>:uw r92.0<16;8,2>:uw
mov (16|M0) r12.0<1>:uw r94.0<16;8,2>:uw
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA2C0100:ud
mov (1|M0) r13.2<1>:ud 0xE000:ud
send (16|M0) r88:uw r13:ub 0x2 a0.0
add (1|M0) a0.0<1>:ud r23.5<0;1,0>:ud 0xA4C0201:ud
mov (1|M0) r13.2<1>:ud 0xC000:ud
send (16|M0) r92:uw r13:ub 0x2 a0.0
mul (16|M0) acc0.0<1>:f r88.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r88.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r92.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r92.0<1>:ud acc0.0<8;8,1>:f
mul (16|M0) acc0.0<1>:f r94.0<8;8,1>:f 65472.0:f
mov (16|M0) (sat)r94.0<1>:ud acc0.0<8;8,1>:f
mov (16|M0) r89.0<1>:uw r88.0<16;8,2>:uw
mov (16|M0) r93.0<1>:uw r92.0<16;8,2>:uw
mov (16|M0) r95.0<1>:uw r94.0<16;8,2>:uw
mov (16|M0) r88.0<1>:uw r10.0<16;16,1>:uw
mov (16|M0) r92.0<1>:uw r11.0<16;16,1>:uw
mov (16|M0) r94.0<1>:uw r12.0<16;16,1>:uw
mov (16|M0) r82.0<1>:uw 0xFFFF:uw
mov (16|M0) r83.0<1>:uw 0xFFFF:uw
mov (16|M0) r90.0<1>:uw 0xFFFF:uw
mov (16|M0) r91.0<1>:uw 0xFFFF:uw
mov (1|M0) a0.8<1>:uw 0xA00:uw
mov (1|M0) a0.9<1>:uw 0xA80:uw
mov (1|M0) a0.10<1>:uw 0xAC0:uw
add (4|M0) a0.12<1>:uw a0.8<4;4,1>:uw 0x100:uw
L1600:
nop
|
; A304616: a(n) = 81*n^2 - 69*n + 24.
; 24,36,210,546,1044,1704,2526,3510,4656,5964,7434,9066,10860,12816,14934,17214,19656,22260,25026,27954,31044,34296,37710,41286,45024,48924,52986,57210,61596,66144,70854,75726,80760,85956,91314,96834,102516,108360,114366,120534,126864,133356,140010,146826,153804,160944,168246,175710,183336,191124,199074,207186,215460,223896,232494,241254,250176,259260,268506,277914,287484,297216,307110,317166,327384,337764,348306,359010,369876,380904,392094,403446,414960,426636,438474,450474,462636,474960,487446,500094,512904,525876,539010,552306,565764,579384,593166,607110,621216,635484,649914,664506,679260,694176,709254,724494,739896,755460,771186,787074,803124,819336,835710,852246,868944,885804,902826,920010,937356,954864,972534,990366,1008360,1026516,1044834,1063314,1081956,1100760,1119726,1138854,1158144,1177596,1197210,1216986,1236924,1257024,1277286,1297710,1318296,1339044,1359954,1381026,1402260,1423656,1445214,1466934,1488816,1510860,1533066,1555434,1577964,1600656,1623510,1646526,1669704,1693044,1716546,1740210,1764036,1788024,1812174,1836486,1860960,1885596,1910394,1935354,1960476,1985760,2011206,2036814,2062584,2088516,2114610,2140866,2167284,2193864,2220606,2247510,2274576,2301804,2329194,2356746,2384460,2412336,2440374,2468574,2496936,2525460,2554146,2582994,2612004,2641176,2670510,2700006,2729664,2759484,2789466,2819610,2849916,2880384,2911014,2941806,2972760,3003876,3035154,3066594,3098196,3129960,3161886,3193974,3226224,3258636,3291210,3323946,3356844,3389904,3423126,3456510,3490056,3523764,3557634,3591666,3625860,3660216,3694734,3729414,3764256,3799260,3834426,3869754,3905244,3940896,3976710,4012686,4048824,4085124,4121586,4158210,4194996,4231944,4269054,4306326,4343760,4381356,4419114,4457034,4495116,4533360,4571766,4610334,4649064,4687956,4727010,4766226,4805604,4845144,4884846,4924710,4964736,5004924
mov $1,27
mul $1,$0
sub $1,23
mul $1,$0
div $1,2
mul $1,6
add $1,24
|
;
; jcphuff-sse2.asm - prepare data for progressive Huffman encoding (SSE2)
;
; Copyright (C) 2016, 2018, Matthieu Darbois
;
; Based on the x86 SIMD extension for IJG JPEG library
; Copyright (C) 1999-2006, MIYASAKA Masaru.
; For conditions of distribution and use, see copyright notice in jsimdext.inc
;
; This file should be assembled with NASM (Netwide Assembler),
; can *not* be assembled with Microsoft's MASM or any compatible
; assembler (including Borland's Turbo Assembler).
; NASM is available from http://nasm.sourceforge.net/ or
; http://sourceforge.net/project/showfiles.php?group_id=6208
;
; This file contains an SSE2 implementation of data preparation for progressive
; Huffman encoding. See jcphuff.c for more details.
;
; [TAB8]
%include "jsimdext.inc"
; --------------------------------------------------------------------------
SECTION SEG_TEXT
BITS 32
; --------------------------------------------------------------------------
; Macros to load data for jsimd_encode_mcu_AC_first_prepare_sse2() and
; jsimd_encode_mcu_AC_refine_prepare_sse2()
%macro LOAD16 0
pxor N0, N0
pxor N1, N1
mov T0, INT [LUT + 0*SIZEOF_INT]
mov T1, INT [LUT + 8*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 0
pinsrw X1, word [BLOCK + T1 * 2], 0
mov T0, INT [LUT + 1*SIZEOF_INT]
mov T1, INT [LUT + 9*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 1
pinsrw X1, word [BLOCK + T1 * 2], 1
mov T0, INT [LUT + 2*SIZEOF_INT]
mov T1, INT [LUT + 10*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 2
pinsrw X1, word [BLOCK + T1 * 2], 2
mov T0, INT [LUT + 3*SIZEOF_INT]
mov T1, INT [LUT + 11*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 3
pinsrw X1, word [BLOCK + T1 * 2], 3
mov T0, INT [LUT + 4*SIZEOF_INT]
mov T1, INT [LUT + 12*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 4
pinsrw X1, word [BLOCK + T1 * 2], 4
mov T0, INT [LUT + 5*SIZEOF_INT]
mov T1, INT [LUT + 13*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 5
pinsrw X1, word [BLOCK + T1 * 2], 5
mov T0, INT [LUT + 6*SIZEOF_INT]
mov T1, INT [LUT + 14*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 6
pinsrw X1, word [BLOCK + T1 * 2], 6
mov T0, INT [LUT + 7*SIZEOF_INT]
mov T1, INT [LUT + 15*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 7
pinsrw X1, word [BLOCK + T1 * 2], 7
%endmacro
%macro LOAD15 0
pxor N0, N0
pxor N1, N1
pxor X1, X1
mov T0, INT [LUT + 0*SIZEOF_INT]
mov T1, INT [LUT + 8*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 0
pinsrw X1, word [BLOCK + T1 * 2], 0
mov T0, INT [LUT + 1*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 1
mov T0, INT [LUT + 2*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 2
mov T0, INT [LUT + 3*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 3
mov T0, INT [LUT + 4*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 4
mov T0, INT [LUT + 5*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 5
mov T0, INT [LUT + 6*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 6
mov T0, INT [LUT + 7*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 7
cmp LENEND, 2
jl %%.ELOAD15
mov T1, INT [LUT + 9*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 1
cmp LENEND, 3
jl %%.ELOAD15
mov T1, INT [LUT + 10*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 2
cmp LENEND, 4
jl %%.ELOAD15
mov T1, INT [LUT + 11*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 3
cmp LENEND, 5
jl %%.ELOAD15
mov T1, INT [LUT + 12*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 4
cmp LENEND, 6
jl %%.ELOAD15
mov T1, INT [LUT + 13*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 5
cmp LENEND, 7
jl %%.ELOAD15
mov T1, INT [LUT + 14*SIZEOF_INT]
pinsrw X1, word [BLOCK + T1 * 2], 6
%%.ELOAD15:
%endmacro
%macro LOAD8 0
pxor N0, N0
mov T0, INT [LUT + 0*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 0
mov T0, INT [LUT + 1*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 1
mov T0, INT [LUT + 2*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 2
mov T0, INT [LUT + 3*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 3
mov T0, INT [LUT + 4*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 4
mov T0, INT [LUT + 5*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 5
mov T0, INT [LUT + 6*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 6
mov T0, INT [LUT + 7*SIZEOF_INT]
pinsrw X0, word [BLOCK + T0 * 2], 7
%endmacro
%macro LOAD7 0
pxor N0, N0
pxor X0, X0
mov T1, INT [LUT + 0*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 0
cmp LENEND, 2
jl %%.ELOAD7
mov T1, INT [LUT + 1*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 1
cmp LENEND, 3
jl %%.ELOAD7
mov T1, INT [LUT + 2*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 2
cmp LENEND, 4
jl %%.ELOAD7
mov T1, INT [LUT + 3*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 3
cmp LENEND, 5
jl %%.ELOAD7
mov T1, INT [LUT + 4*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 4
cmp LENEND, 6
jl %%.ELOAD7
mov T1, INT [LUT + 5*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 5
cmp LENEND, 7
jl %%.ELOAD7
mov T1, INT [LUT + 6*SIZEOF_INT]
pinsrw X0, word [BLOCK + T1 * 2], 6
%%.ELOAD7:
%endmacro
%macro REDUCE0 0
movdqa xmm0, XMMWORD [VALUES + ( 0*2)]
movdqa xmm1, XMMWORD [VALUES + ( 8*2)]
movdqa xmm2, XMMWORD [VALUES + (16*2)]
movdqa xmm3, XMMWORD [VALUES + (24*2)]
movdqa xmm4, XMMWORD [VALUES + (32*2)]
movdqa xmm5, XMMWORD [VALUES + (40*2)]
movdqa xmm6, XMMWORD [VALUES + (48*2)]
pcmpeqw xmm0, ZERO
pcmpeqw xmm1, ZERO
pcmpeqw xmm2, ZERO
pcmpeqw xmm3, ZERO
pcmpeqw xmm4, ZERO
pcmpeqw xmm5, ZERO
pcmpeqw xmm6, ZERO
pcmpeqw xmm7, XMMWORD [VALUES + (56*2)]
packsswb xmm0, xmm1
packsswb xmm2, xmm3
packsswb xmm4, xmm5
packsswb xmm6, xmm7
pmovmskb eax, xmm0
pmovmskb ecx, xmm2
pmovmskb edx, xmm4
pmovmskb esi, xmm6
shl ecx, 16
shl esi, 16
or eax, ecx
or edx, esi
not eax
not edx
mov edi, ZEROBITS
mov INT [edi], eax
mov INT [edi+SIZEOF_INT], edx
%endmacro
;
; Prepare data for jsimd_encode_mcu_AC_first().
;
; GLOBAL(void)
; jsimd_encode_mcu_AC_first_prepare_sse2(const JCOEF *block,
; const int *jpeg_natural_order_start,
; int Sl, int Al, JCOEF *values,
; size_t *zerobits)
;
; eax + 8 = const JCOEF *block
; eax + 12 = const int *jpeg_natural_order_start
; eax + 16 = int Sl
; eax + 20 = int Al
; eax + 24 = JCOEF *values
; eax + 28 = size_t *zerobits
%define ZERO xmm7
%define X0 xmm0
%define X1 xmm1
%define N0 xmm2
%define N1 xmm3
%define AL xmm4
%define K eax
%define LENEND eax
%define LUT ebx
%define T0 ecx
%define T1 edx
%define BLOCK esi
%define VALUES edi
%define LEN ebp
%define ZEROBITS INT [esp + 5 * 4]
align 32
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
mov [esp], eax
mov ebp, esp ; ebp = aligned ebp
sub esp, 4
push ebx
push ecx
; push edx ; need not be preserved
push esi
push edi
push ebp
mov BLOCK, INT [eax + 8]
mov LUT, INT [eax + 12]
mov VALUES, INT [eax + 24]
movd AL, INT [eax + 20]
mov T0, INT [eax + 28]
mov ZEROBITS, T0
mov LEN, INT [eax + 16]
pxor ZERO, ZERO
mov K, LEN
and K, -16
shr K, 4
jz .ELOOP16
.BLOOP16:
LOAD16
pcmpgtw N0, X0
pcmpgtw N1, X1
paddw X0, N0
paddw X1, N1
pxor X0, N0
pxor X1, N1
psrlw X0, AL
psrlw X1, AL
pxor N0, X0
pxor N1, X1
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (8) * 2], X1
movdqa XMMWORD [VALUES + (0 + DCTSIZE2) * 2], N0
movdqa XMMWORD [VALUES + (8 + DCTSIZE2) * 2], N1
add VALUES, 16*2
add LUT, 16*SIZEOF_INT
dec K
jnz .BLOOP16
.ELOOP16:
mov LENEND, LEN
and LENEND, 7
test LEN, 8
jz .TRY7
test LEN, 7
jz .TRY8
LOAD15
pcmpgtw N0, X0
pcmpgtw N1, X1
paddw X0, N0
paddw X1, N1
pxor X0, N0
pxor X1, N1
psrlw X0, AL
psrlw X1, AL
pxor N0, X0
pxor N1, X1
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (8) * 2], X1
movdqa XMMWORD [VALUES + (0 + DCTSIZE2) * 2], N0
movdqa XMMWORD [VALUES + (8 + DCTSIZE2) * 2], N1
add VALUES, 16*2
jmp .PADDING
.TRY8:
LOAD8
pcmpgtw N0, X0
paddw X0, N0
pxor X0, N0
psrlw X0, AL
pxor N0, X0
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (0 + DCTSIZE2) * 2], N0
add VALUES, 8*2
jmp .PADDING
.TRY7:
LOAD7
pcmpgtw N0, X0
paddw X0, N0
pxor X0, N0
psrlw X0, AL
pxor N0, X0
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (0 + DCTSIZE2) * 2], N0
add VALUES, 8*2
.PADDING:
mov K, LEN
add K, 7
and K, -8
shr K, 3
sub K, DCTSIZE2/8
jz .EPADDING
align 16
.ZEROLOOP:
movdqa XMMWORD [VALUES + 0], ZERO
add VALUES, 8*2
inc K
jnz .ZEROLOOP
.EPADDING:
sub VALUES, DCTSIZE2*2
REDUCE0
pop ebp
pop edi
pop esi
; pop edx ; need not be preserved
pop ecx
pop ebx
mov esp, ebp ; esp <- aligned ebp
pop esp ; esp <- original ebp
pop ebp
ret
%undef ZERO
%undef X0
%undef X1
%undef N0
%undef N1
%undef AL
%undef K
%undef LUT
%undef T0
%undef T1
%undef BLOCK
%undef VALUES
%undef LEN
;
; Prepare data for jsimd_encode_mcu_AC_refine().
;
; GLOBAL(int)
; jsimd_encode_mcu_AC_refine_prepare_sse2(const JCOEF *block,
; const int *jpeg_natural_order_start,
; int Sl, int Al, JCOEF *absvalues,
; size_t *bits)
;
; eax + 8 = const JCOEF *block
; eax + 12 = const int *jpeg_natural_order_start
; eax + 16 = int Sl
; eax + 20 = int Al
; eax + 24 = JCOEF *values
; eax + 28 = size_t *bits
%define ZERO xmm7
%define ONE xmm5
%define X0 xmm0
%define X1 xmm1
%define N0 xmm2
%define N1 xmm3
%define AL xmm4
%define K eax
%define LENEND eax
%define LUT ebx
%define T0 ecx
%define T0w cx
%define T1 edx
%define BLOCK esi
%define VALUES edi
%define KK ebp
%define ZEROBITS INT [esp + 5 * 4]
%define EOB INT [esp + 5 * 4 + 4]
%define LEN INT [esp + 5 * 4 + 8]
align 32
GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2)
EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2):
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
mov [esp], eax
mov ebp, esp ; ebp = aligned ebp
sub esp, 16
push ebx
push ecx
; push edx ; need not be preserved
push esi
push edi
push ebp
pcmpeqw ONE, ONE
psrlw ONE, 15
mov BLOCK, INT [eax + 8]
mov LUT, INT [eax + 12]
mov VALUES, INT [eax + 24]
movd AL, INT [eax + 20]
mov T0, INT [eax + 28]
mov K, INT [eax + 16]
mov INT [T0 + 2 * SIZEOF_INT], -1
mov INT [T0 + 3 * SIZEOF_INT], -1
mov ZEROBITS, T0
mov LEN, K
pxor ZERO, ZERO
and K, -16
mov EOB, 0
xor KK, KK
shr K, 4
jz .ELOOPR16
.BLOOPR16:
LOAD16
pcmpgtw N0, X0
pcmpgtw N1, X1
paddw X0, N0
paddw X1, N1
pxor X0, N0
pxor X1, N1
psrlw X0, AL
psrlw X1, AL
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (8) * 2], X1
pcmpeqw X0, ONE
pcmpeqw X1, ONE
packsswb N0, N1
packsswb X0, X1
pmovmskb T0, N0 ; lsignbits.val16u[k>>4] = _mm_movemask_epi8(neg);
mov T1, ZEROBITS
not T0
mov word [T1 + 2 * SIZEOF_INT + KK], T0w
pmovmskb T1, X0 ; idx = _mm_movemask_epi8(x1);
bsr T1, T1 ; idx = 16 - (__builtin_clz(idx)>>1);
jz .CONTINUER16 ; if (idx) {
lea T1, [T1+KK*8]
mov EOB, T1 ; EOB = k + idx;
.CONTINUER16:
add VALUES, 16*2
add LUT, 16*SIZEOF_INT
add KK, 2
dec K
jnz .BLOOPR16
.ELOOPR16:
mov LENEND, LEN
test LENEND, 8
jz .TRYR7
test LENEND, 7
jz .TRYR8
and LENEND, 7
LOAD15
pcmpgtw N0, X0
pcmpgtw N1, X1
paddw X0, N0
paddw X1, N1
pxor X0, N0
pxor X1, N1
psrlw X0, AL
psrlw X1, AL
movdqa XMMWORD [VALUES + (0) * 2], X0
movdqa XMMWORD [VALUES + (8) * 2], X1
pcmpeqw X0, ONE
pcmpeqw X1, ONE
packsswb N0, N1
packsswb X0, X1
pmovmskb T0, N0 ; lsignbits.val16u[k>>4] = _mm_movemask_epi8(neg);
mov T1, ZEROBITS
not T0
mov word [T1 + 2 * SIZEOF_INT + KK], T0w
pmovmskb T1, X0 ; idx = _mm_movemask_epi8(x1);
bsr T1, T1 ; idx = 16 - (__builtin_clz(idx)>>1);
jz .CONTINUER15 ; if (idx) {
lea T1, [T1+KK*8]
mov EOB, T1 ; EOB = k + idx;
.CONTINUER15:
add VALUES, 16*2
jmp .PADDINGR
.TRYR8:
LOAD8
pcmpgtw N0, X0
paddw X0, N0
pxor X0, N0
psrlw X0, AL
movdqa XMMWORD [VALUES + (0) * 2], X0
pcmpeqw X0, ONE
packsswb N0, ZERO
packsswb X0, ZERO
pmovmskb T0, N0 ; lsignbits.val16u[k>>4] = _mm_movemask_epi8(neg);
mov T1, ZEROBITS
not T0
mov word [T1 + 2 * SIZEOF_INT + KK], T0w
pmovmskb T1, X0 ; idx = _mm_movemask_epi8(x1);
bsr T1, T1 ; idx = 16 - (__builtin_clz(idx)>>1);
jz .CONTINUER8 ; if (idx) {
lea T1, [T1+KK*8]
mov EOB, T1 ; EOB = k + idx;
.CONTINUER8:
add VALUES, 8*2
jmp .PADDINGR
.TRYR7:
and LENEND, 7
LOAD7
pcmpgtw N0, X0
paddw X0, N0
pxor X0, N0
psrlw X0, AL
movdqa XMMWORD [VALUES + (0) * 2], X0
pcmpeqw X0, ONE
packsswb N0, ZERO
packsswb X0, ZERO
pmovmskb T0, N0 ; lsignbits.val16u[k>>4] = _mm_movemask_epi8(neg);
mov T1, ZEROBITS
not T0
mov word [T1 + 2 * SIZEOF_INT + KK], T0w
pmovmskb T1, X0 ; idx = _mm_movemask_epi8(x1);
bsr T1, T1 ; idx = 16 - (__builtin_clz(idx)>>1);
jz .CONTINUER7 ; if (idx) {
lea T1, [T1+KK*8]
mov EOB, T1 ; EOB = k + idx;
.CONTINUER7:
add VALUES, 8*2
.PADDINGR:
mov K, LEN
add K, 7
and K, -8
shr K, 3
sub K, DCTSIZE2/8
jz .EPADDINGR
align 16
.ZEROLOOPR:
movdqa XMMWORD [VALUES + 0], ZERO
add VALUES, 8*2
inc K
jnz .ZEROLOOPR
.EPADDINGR:
sub VALUES, DCTSIZE2*2
REDUCE0
mov eax, EOB
pop ebp
pop edi
pop esi
; pop edx ; need not be preserved
pop ecx
pop ebx
mov esp, ebp ; esp <- aligned ebp
pop esp ; esp <- original ebp
pop ebp
ret
%undef ZERO
%undef ONE
%undef X0
%undef X1
%undef N0
%undef N1
%undef AL
%undef K
%undef KK
%undef EOB
%undef SIGN
%undef LUT
%undef T0
%undef T1
%undef BLOCK
%undef VALUES
%undef LEN
%undef LENEND
; For some reason, the OS X linker does not honor the request to align the
; segment unless we do this.
align 32
|
;
; jidctint.asm - accurate integer IDCT (SSE2)
;
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
; Copyright (C) 2016, D. R. Commander.
;
; Based on the x86 SIMD extension for IJG JPEG library
; Copyright (C) 1999-2006, MIYASAKA Masaru.
; For conditions of distribution and use, see copyright notice in jsimdext.inc
;
; This file should be assembled with NASM (Netwide Assembler),
; can *not* be assembled with Microsoft's MASM or any compatible
; assembler (including Borland's Turbo Assembler).
; NASM is available from http://nasm.sourceforge.net/ or
; http://sourceforge.net/project/showfiles.php?group_id=6208
;
; This file contains a slow-but-accurate integer implementation of the
; inverse DCT (Discrete Cosine Transform). The following code is based
; directly on the IJG's original jidctint.c; see the jidctint.c for
; more details.
;
; [TAB8]
%include "jsimdext.inc"
%include "jdct.inc"
; --------------------------------------------------------------------------
%define CONST_BITS 13
%define PASS1_BITS 2
%define DESCALE_P1 (CONST_BITS - PASS1_BITS)
%define DESCALE_P2 (CONST_BITS + PASS1_BITS + 3)
%if CONST_BITS == 13
F_0_298 equ 2446 ; FIX(0.298631336)
F_0_390 equ 3196 ; FIX(0.390180644)
F_0_541 equ 4433 ; FIX(0.541196100)
F_0_765 equ 6270 ; FIX(0.765366865)
F_0_899 equ 7373 ; FIX(0.899976223)
F_1_175 equ 9633 ; FIX(1.175875602)
F_1_501 equ 12299 ; FIX(1.501321110)
F_1_847 equ 15137 ; FIX(1.847759065)
F_1_961 equ 16069 ; FIX(1.961570560)
F_2_053 equ 16819 ; FIX(2.053119869)
F_2_562 equ 20995 ; FIX(2.562915447)
F_3_072 equ 25172 ; FIX(3.072711026)
%else
; NASM cannot do compile-time arithmetic on floating-point constants.
%define DESCALE(x, n) (((x) + (1 << ((n) - 1))) >> (n))
F_0_298 equ DESCALE( 320652955, 30 - CONST_BITS) ; FIX(0.298631336)
F_0_390 equ DESCALE( 418953276, 30 - CONST_BITS) ; FIX(0.390180644)
F_0_541 equ DESCALE( 581104887, 30 - CONST_BITS) ; FIX(0.541196100)
F_0_765 equ DESCALE( 821806413, 30 - CONST_BITS) ; FIX(0.765366865)
F_0_899 equ DESCALE( 966342111, 30 - CONST_BITS) ; FIX(0.899976223)
F_1_175 equ DESCALE(1262586813, 30 - CONST_BITS) ; FIX(1.175875602)
F_1_501 equ DESCALE(1612031267, 30 - CONST_BITS) ; FIX(1.501321110)
F_1_847 equ DESCALE(1984016188, 30 - CONST_BITS) ; FIX(1.847759065)
F_1_961 equ DESCALE(2106220350, 30 - CONST_BITS) ; FIX(1.961570560)
F_2_053 equ DESCALE(2204520673, 30 - CONST_BITS) ; FIX(2.053119869)
F_2_562 equ DESCALE(2751909506, 30 - CONST_BITS) ; FIX(2.562915447)
F_3_072 equ DESCALE(3299298341, 30 - CONST_BITS) ; FIX(3.072711026)
%endif
; --------------------------------------------------------------------------
SECTION SEG_CONST
alignz 32
GLOBAL_DATA(jconst_idct_islow_sse2)
EXTN(jconst_idct_islow_sse2):
PW_F130_F054 times 4 dw (F_0_541 + F_0_765), F_0_541
PW_F054_MF130 times 4 dw F_0_541, (F_0_541 - F_1_847)
PW_MF078_F117 times 4 dw (F_1_175 - F_1_961), F_1_175
PW_F117_F078 times 4 dw F_1_175, (F_1_175 - F_0_390)
PW_MF060_MF089 times 4 dw (F_0_298 - F_0_899), -F_0_899
PW_MF089_F060 times 4 dw -F_0_899, (F_1_501 - F_0_899)
PW_MF050_MF256 times 4 dw (F_2_053 - F_2_562), -F_2_562
PW_MF256_F050 times 4 dw -F_2_562, (F_3_072 - F_2_562)
PD_DESCALE_P1 times 4 dd 1 << (DESCALE_P1 - 1)
PD_DESCALE_P2 times 4 dd 1 << (DESCALE_P2 - 1)
PB_CENTERJSAMP times 16 db CENTERJSAMPLE
alignz 32
; --------------------------------------------------------------------------
SECTION SEG_TEXT
BITS 32
;
; Perform dequantization and inverse DCT on one block of coefficients.
;
; GLOBAL(void)
; jsimd_idct_islow_sse2(void *dct_table, JCOEFPTR coef_block,
; JSAMPARRAY output_buf, JDIMENSION output_col)
;
%define dct_table(b) (b) + 8 ; jpeg_component_info *compptr
%define coef_block(b) (b) + 12 ; JCOEFPTR coef_block
%define output_buf(b) (b) + 16 ; JSAMPARRAY output_buf
%define output_col(b) (b) + 20 ; JDIMENSION output_col
%define original_ebp ebp + 0
%define wk(i) ebp - (WK_NUM - (i)) * SIZEOF_XMMWORD
; xmmword wk[WK_NUM]
%define WK_NUM 12
align 32
GLOBAL_FUNCTION(jsimd_idct_islow_sse2)
EXTN(jsimd_idct_islow_sse2):
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
and esp, byte (-SIZEOF_XMMWORD) ; align to 128 bits
mov [esp], eax
mov ebp, esp ; ebp = aligned ebp
lea esp, [wk(0)]
pushpic ebx
; push ecx ; unused
; push edx ; need not be preserved
push esi
push edi
get_GOT ebx ; get GOT address
; ---- Pass 1: process columns from input.
; mov eax, [original_ebp]
mov edx, POINTER [dct_table(eax)] ; quantptr
mov esi, JCOEFPTR [coef_block(eax)] ; inptr
%ifndef NO_ZERO_COLUMN_TEST_ISLOW_SSE2
mov eax, DWORD [DWBLOCK(1,0,esi,SIZEOF_JCOEF)]
or eax, DWORD [DWBLOCK(2,0,esi,SIZEOF_JCOEF)]
jnz near .columnDCT
movdqa xmm0, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
por xmm0, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
por xmm1, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
por xmm0, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
por xmm1, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
por xmm0, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
por xmm1, xmm0
packsswb xmm1, xmm1
packsswb xmm1, xmm1
movd eax, xmm1
test eax, eax
jnz short .columnDCT
; -- AC terms all zero
movdqa xmm5, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
pmullw xmm5, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
psllw xmm5, PASS1_BITS
movdqa xmm4, xmm5 ; xmm5=in0=(00 01 02 03 04 05 06 07)
punpcklwd xmm5, xmm5 ; xmm5=(00 00 01 01 02 02 03 03)
punpckhwd xmm4, xmm4 ; xmm4=(04 04 05 05 06 06 07 07)
pshufd xmm7, xmm5, 0x00 ; xmm7=col0=(00 00 00 00 00 00 00 00)
pshufd xmm6, xmm5, 0x55 ; xmm6=col1=(01 01 01 01 01 01 01 01)
pshufd xmm1, xmm5, 0xAA ; xmm1=col2=(02 02 02 02 02 02 02 02)
pshufd xmm5, xmm5, 0xFF ; xmm5=col3=(03 03 03 03 03 03 03 03)
pshufd xmm0, xmm4, 0x00 ; xmm0=col4=(04 04 04 04 04 04 04 04)
pshufd xmm3, xmm4, 0x55 ; xmm3=col5=(05 05 05 05 05 05 05 05)
pshufd xmm2, xmm4, 0xAA ; xmm2=col6=(06 06 06 06 06 06 06 06)
pshufd xmm4, xmm4, 0xFF ; xmm4=col7=(07 07 07 07 07 07 07 07)
movdqa XMMWORD [wk(8)], xmm6 ; wk(8)=col1
movdqa XMMWORD [wk(9)], xmm5 ; wk(9)=col3
movdqa XMMWORD [wk(10)], xmm3 ; wk(10)=col5
movdqa XMMWORD [wk(11)], xmm4 ; wk(11)=col7
jmp near .column_end
alignx 16, 7
%endif
.columnDCT:
; -- Even part
movdqa xmm0, XMMWORD [XMMBLOCK(0,0,esi,SIZEOF_JCOEF)]
movdqa xmm1, XMMWORD [XMMBLOCK(2,0,esi,SIZEOF_JCOEF)]
pmullw xmm0, XMMWORD [XMMBLOCK(0,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
pmullw xmm1, XMMWORD [XMMBLOCK(2,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
movdqa xmm2, XMMWORD [XMMBLOCK(4,0,esi,SIZEOF_JCOEF)]
movdqa xmm3, XMMWORD [XMMBLOCK(6,0,esi,SIZEOF_JCOEF)]
pmullw xmm2, XMMWORD [XMMBLOCK(4,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
pmullw xmm3, XMMWORD [XMMBLOCK(6,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
; (Original)
; z1 = (z2 + z3) * 0.541196100;
; tmp2 = z1 + z3 * -1.847759065;
; tmp3 = z1 + z2 * 0.765366865;
;
; (This implementation)
; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
movdqa xmm4, xmm1 ; xmm1=in2=z2
movdqa xmm5, xmm1
punpcklwd xmm4, xmm3 ; xmm3=in6=z3
punpckhwd xmm5, xmm3
movdqa xmm1, xmm4
movdqa xmm3, xmm5
pmaddwd xmm4, [GOTOFF(ebx,PW_F130_F054)] ; xmm4=tmp3L
pmaddwd xmm5, [GOTOFF(ebx,PW_F130_F054)] ; xmm5=tmp3H
pmaddwd xmm1, [GOTOFF(ebx,PW_F054_MF130)] ; xmm1=tmp2L
pmaddwd xmm3, [GOTOFF(ebx,PW_F054_MF130)] ; xmm3=tmp2H
movdqa xmm6, xmm0
paddw xmm0, xmm2 ; xmm0=in0+in4
psubw xmm6, xmm2 ; xmm6=in0-in4
pxor xmm7, xmm7
pxor xmm2, xmm2
punpcklwd xmm7, xmm0 ; xmm7=tmp0L
punpckhwd xmm2, xmm0 ; xmm2=tmp0H
psrad xmm7, (16-CONST_BITS) ; psrad xmm7,16 & pslld xmm7,CONST_BITS
psrad xmm2, (16-CONST_BITS) ; psrad xmm2,16 & pslld xmm2,CONST_BITS
movdqa xmm0, xmm7
paddd xmm7, xmm4 ; xmm7=tmp10L
psubd xmm0, xmm4 ; xmm0=tmp13L
movdqa xmm4, xmm2
paddd xmm2, xmm5 ; xmm2=tmp10H
psubd xmm4, xmm5 ; xmm4=tmp13H
movdqa XMMWORD [wk(0)], xmm7 ; wk(0)=tmp10L
movdqa XMMWORD [wk(1)], xmm2 ; wk(1)=tmp10H
movdqa XMMWORD [wk(2)], xmm0 ; wk(2)=tmp13L
movdqa XMMWORD [wk(3)], xmm4 ; wk(3)=tmp13H
pxor xmm5, xmm5
pxor xmm7, xmm7
punpcklwd xmm5, xmm6 ; xmm5=tmp1L
punpckhwd xmm7, xmm6 ; xmm7=tmp1H
psrad xmm5, (16-CONST_BITS) ; psrad xmm5,16 & pslld xmm5,CONST_BITS
psrad xmm7, (16-CONST_BITS) ; psrad xmm7,16 & pslld xmm7,CONST_BITS
movdqa xmm2, xmm5
paddd xmm5, xmm1 ; xmm5=tmp11L
psubd xmm2, xmm1 ; xmm2=tmp12L
movdqa xmm0, xmm7
paddd xmm7, xmm3 ; xmm7=tmp11H
psubd xmm0, xmm3 ; xmm0=tmp12H
movdqa XMMWORD [wk(4)], xmm5 ; wk(4)=tmp11L
movdqa XMMWORD [wk(5)], xmm7 ; wk(5)=tmp11H
movdqa XMMWORD [wk(6)], xmm2 ; wk(6)=tmp12L
movdqa XMMWORD [wk(7)], xmm0 ; wk(7)=tmp12H
; -- Odd part
movdqa xmm4, XMMWORD [XMMBLOCK(1,0,esi,SIZEOF_JCOEF)]
movdqa xmm6, XMMWORD [XMMBLOCK(3,0,esi,SIZEOF_JCOEF)]
pmullw xmm4, XMMWORD [XMMBLOCK(1,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
pmullw xmm6, XMMWORD [XMMBLOCK(3,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
movdqa xmm1, XMMWORD [XMMBLOCK(5,0,esi,SIZEOF_JCOEF)]
movdqa xmm3, XMMWORD [XMMBLOCK(7,0,esi,SIZEOF_JCOEF)]
pmullw xmm1, XMMWORD [XMMBLOCK(5,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
pmullw xmm3, XMMWORD [XMMBLOCK(7,0,edx,SIZEOF_ISLOW_MULT_TYPE)]
movdqa xmm5, xmm6
movdqa xmm7, xmm4
paddw xmm5, xmm3 ; xmm5=z3
paddw xmm7, xmm1 ; xmm7=z4
; (Original)
; z5 = (z3 + z4) * 1.175875602;
; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
; z3 += z5; z4 += z5;
;
; (This implementation)
; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
movdqa xmm2, xmm5
movdqa xmm0, xmm5
punpcklwd xmm2, xmm7
punpckhwd xmm0, xmm7
movdqa xmm5, xmm2
movdqa xmm7, xmm0
pmaddwd xmm2, [GOTOFF(ebx,PW_MF078_F117)] ; xmm2=z3L
pmaddwd xmm0, [GOTOFF(ebx,PW_MF078_F117)] ; xmm0=z3H
pmaddwd xmm5, [GOTOFF(ebx,PW_F117_F078)] ; xmm5=z4L
pmaddwd xmm7, [GOTOFF(ebx,PW_F117_F078)] ; xmm7=z4H
movdqa XMMWORD [wk(10)], xmm2 ; wk(10)=z3L
movdqa XMMWORD [wk(11)], xmm0 ; wk(11)=z3H
; (Original)
; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
; tmp0 += z1 + z3; tmp1 += z2 + z4;
; tmp2 += z2 + z3; tmp3 += z1 + z4;
;
; (This implementation)
; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
; tmp0 += z3; tmp1 += z4;
; tmp2 += z3; tmp3 += z4;
movdqa xmm2, xmm3
movdqa xmm0, xmm3
punpcklwd xmm2, xmm4
punpckhwd xmm0, xmm4
movdqa xmm3, xmm2
movdqa xmm4, xmm0
pmaddwd xmm2, [GOTOFF(ebx,PW_MF060_MF089)] ; xmm2=tmp0L
pmaddwd xmm0, [GOTOFF(ebx,PW_MF060_MF089)] ; xmm0=tmp0H
pmaddwd xmm3, [GOTOFF(ebx,PW_MF089_F060)] ; xmm3=tmp3L
pmaddwd xmm4, [GOTOFF(ebx,PW_MF089_F060)] ; xmm4=tmp3H
paddd xmm2, XMMWORD [wk(10)] ; xmm2=tmp0L
paddd xmm0, XMMWORD [wk(11)] ; xmm0=tmp0H
paddd xmm3, xmm5 ; xmm3=tmp3L
paddd xmm4, xmm7 ; xmm4=tmp3H
movdqa XMMWORD [wk(8)], xmm2 ; wk(8)=tmp0L
movdqa XMMWORD [wk(9)], xmm0 ; wk(9)=tmp0H
movdqa xmm2, xmm1
movdqa xmm0, xmm1
punpcklwd xmm2, xmm6
punpckhwd xmm0, xmm6
movdqa xmm1, xmm2
movdqa xmm6, xmm0
pmaddwd xmm2, [GOTOFF(ebx,PW_MF050_MF256)] ; xmm2=tmp1L
pmaddwd xmm0, [GOTOFF(ebx,PW_MF050_MF256)] ; xmm0=tmp1H
pmaddwd xmm1, [GOTOFF(ebx,PW_MF256_F050)] ; xmm1=tmp2L
pmaddwd xmm6, [GOTOFF(ebx,PW_MF256_F050)] ; xmm6=tmp2H
paddd xmm2, xmm5 ; xmm2=tmp1L
paddd xmm0, xmm7 ; xmm0=tmp1H
paddd xmm1, XMMWORD [wk(10)] ; xmm1=tmp2L
paddd xmm6, XMMWORD [wk(11)] ; xmm6=tmp2H
movdqa XMMWORD [wk(10)], xmm2 ; wk(10)=tmp1L
movdqa XMMWORD [wk(11)], xmm0 ; wk(11)=tmp1H
; -- Final output stage
movdqa xmm5, XMMWORD [wk(0)] ; xmm5=tmp10L
movdqa xmm7, XMMWORD [wk(1)] ; xmm7=tmp10H
movdqa xmm2, xmm5
movdqa xmm0, xmm7
paddd xmm5, xmm3 ; xmm5=data0L
paddd xmm7, xmm4 ; xmm7=data0H
psubd xmm2, xmm3 ; xmm2=data7L
psubd xmm0, xmm4 ; xmm0=data7H
movdqa xmm3, [GOTOFF(ebx,PD_DESCALE_P1)] ; xmm3=[PD_DESCALE_P1]
paddd xmm5, xmm3
paddd xmm7, xmm3
psrad xmm5, DESCALE_P1
psrad xmm7, DESCALE_P1
paddd xmm2, xmm3
paddd xmm0, xmm3
psrad xmm2, DESCALE_P1
psrad xmm0, DESCALE_P1
packssdw xmm5, xmm7 ; xmm5=data0=(00 01 02 03 04 05 06 07)
packssdw xmm2, xmm0 ; xmm2=data7=(70 71 72 73 74 75 76 77)
movdqa xmm4, XMMWORD [wk(4)] ; xmm4=tmp11L
movdqa xmm3, XMMWORD [wk(5)] ; xmm3=tmp11H
movdqa xmm7, xmm4
movdqa xmm0, xmm3
paddd xmm4, xmm1 ; xmm4=data1L
paddd xmm3, xmm6 ; xmm3=data1H
psubd xmm7, xmm1 ; xmm7=data6L
psubd xmm0, xmm6 ; xmm0=data6H
movdqa xmm1, [GOTOFF(ebx,PD_DESCALE_P1)] ; xmm1=[PD_DESCALE_P1]
paddd xmm4, xmm1
paddd xmm3, xmm1
psrad xmm4, DESCALE_P1
psrad xmm3, DESCALE_P1
paddd xmm7, xmm1
paddd xmm0, xmm1
psrad xmm7, DESCALE_P1
psrad xmm0, DESCALE_P1
packssdw xmm4, xmm3 ; xmm4=data1=(10 11 12 13 14 15 16 17)
packssdw xmm7, xmm0 ; xmm7=data6=(60 61 62 63 64 65 66 67)
movdqa xmm6, xmm5 ; transpose coefficients(phase 1)
punpcklwd xmm5, xmm4 ; xmm5=(00 10 01 11 02 12 03 13)
punpckhwd xmm6, xmm4 ; xmm6=(04 14 05 15 06 16 07 17)
movdqa xmm1, xmm7 ; transpose coefficients(phase 1)
punpcklwd xmm7, xmm2 ; xmm7=(60 70 61 71 62 72 63 73)
punpckhwd xmm1, xmm2 ; xmm1=(64 74 65 75 66 76 67 77)
movdqa xmm3, XMMWORD [wk(6)] ; xmm3=tmp12L
movdqa xmm0, XMMWORD [wk(7)] ; xmm0=tmp12H
movdqa xmm4, XMMWORD [wk(10)] ; xmm4=tmp1L
movdqa xmm2, XMMWORD [wk(11)] ; xmm2=tmp1H
movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(00 10 01 11 02 12 03 13)
movdqa XMMWORD [wk(1)], xmm6 ; wk(1)=(04 14 05 15 06 16 07 17)
movdqa XMMWORD [wk(4)], xmm7 ; wk(4)=(60 70 61 71 62 72 63 73)
movdqa XMMWORD [wk(5)], xmm1 ; wk(5)=(64 74 65 75 66 76 67 77)
movdqa xmm5, xmm3
movdqa xmm6, xmm0
paddd xmm3, xmm4 ; xmm3=data2L
paddd xmm0, xmm2 ; xmm0=data2H
psubd xmm5, xmm4 ; xmm5=data5L
psubd xmm6, xmm2 ; xmm6=data5H
movdqa xmm7, [GOTOFF(ebx,PD_DESCALE_P1)] ; xmm7=[PD_DESCALE_P1]
paddd xmm3, xmm7
paddd xmm0, xmm7
psrad xmm3, DESCALE_P1
psrad xmm0, DESCALE_P1
paddd xmm5, xmm7
paddd xmm6, xmm7
psrad xmm5, DESCALE_P1
psrad xmm6, DESCALE_P1
packssdw xmm3, xmm0 ; xmm3=data2=(20 21 22 23 24 25 26 27)
packssdw xmm5, xmm6 ; xmm5=data5=(50 51 52 53 54 55 56 57)
movdqa xmm1, XMMWORD [wk(2)] ; xmm1=tmp13L
movdqa xmm4, XMMWORD [wk(3)] ; xmm4=tmp13H
movdqa xmm2, XMMWORD [wk(8)] ; xmm2=tmp0L
movdqa xmm7, XMMWORD [wk(9)] ; xmm7=tmp0H
movdqa xmm0, xmm1
movdqa xmm6, xmm4
paddd xmm1, xmm2 ; xmm1=data3L
paddd xmm4, xmm7 ; xmm4=data3H
psubd xmm0, xmm2 ; xmm0=data4L
psubd xmm6, xmm7 ; xmm6=data4H
movdqa xmm2, [GOTOFF(ebx,PD_DESCALE_P1)] ; xmm2=[PD_DESCALE_P1]
paddd xmm1, xmm2
paddd xmm4, xmm2
psrad xmm1, DESCALE_P1
psrad xmm4, DESCALE_P1
paddd xmm0, xmm2
paddd xmm6, xmm2
psrad xmm0, DESCALE_P1
psrad xmm6, DESCALE_P1
packssdw xmm1, xmm4 ; xmm1=data3=(30 31 32 33 34 35 36 37)
packssdw xmm0, xmm6 ; xmm0=data4=(40 41 42 43 44 45 46 47)
movdqa xmm7, XMMWORD [wk(0)] ; xmm7=(00 10 01 11 02 12 03 13)
movdqa xmm2, XMMWORD [wk(1)] ; xmm2=(04 14 05 15 06 16 07 17)
movdqa xmm4, xmm3 ; transpose coefficients(phase 1)
punpcklwd xmm3, xmm1 ; xmm3=(20 30 21 31 22 32 23 33)
punpckhwd xmm4, xmm1 ; xmm4=(24 34 25 35 26 36 27 37)
movdqa xmm6, xmm0 ; transpose coefficients(phase 1)
punpcklwd xmm0, xmm5 ; xmm0=(40 50 41 51 42 52 43 53)
punpckhwd xmm6, xmm5 ; xmm6=(44 54 45 55 46 56 47 57)
movdqa xmm1, xmm7 ; transpose coefficients(phase 2)
punpckldq xmm7, xmm3 ; xmm7=(00 10 20 30 01 11 21 31)
punpckhdq xmm1, xmm3 ; xmm1=(02 12 22 32 03 13 23 33)
movdqa xmm5, xmm2 ; transpose coefficients(phase 2)
punpckldq xmm2, xmm4 ; xmm2=(04 14 24 34 05 15 25 35)
punpckhdq xmm5, xmm4 ; xmm5=(06 16 26 36 07 17 27 37)
movdqa xmm3, XMMWORD [wk(4)] ; xmm3=(60 70 61 71 62 72 63 73)
movdqa xmm4, XMMWORD [wk(5)] ; xmm4=(64 74 65 75 66 76 67 77)
movdqa XMMWORD [wk(6)], xmm2 ; wk(6)=(04 14 24 34 05 15 25 35)
movdqa XMMWORD [wk(7)], xmm5 ; wk(7)=(06 16 26 36 07 17 27 37)
movdqa xmm2, xmm0 ; transpose coefficients(phase 2)
punpckldq xmm0, xmm3 ; xmm0=(40 50 60 70 41 51 61 71)
punpckhdq xmm2, xmm3 ; xmm2=(42 52 62 72 43 53 63 73)
movdqa xmm5, xmm6 ; transpose coefficients(phase 2)
punpckldq xmm6, xmm4 ; xmm6=(44 54 64 74 45 55 65 75)
punpckhdq xmm5, xmm4 ; xmm5=(46 56 66 76 47 57 67 77)
movdqa xmm3, xmm7 ; transpose coefficients(phase 3)
punpcklqdq xmm7, xmm0 ; xmm7=col0=(00 10 20 30 40 50 60 70)
punpckhqdq xmm3, xmm0 ; xmm3=col1=(01 11 21 31 41 51 61 71)
movdqa xmm4, xmm1 ; transpose coefficients(phase 3)
punpcklqdq xmm1, xmm2 ; xmm1=col2=(02 12 22 32 42 52 62 72)
punpckhqdq xmm4, xmm2 ; xmm4=col3=(03 13 23 33 43 53 63 73)
movdqa xmm0, XMMWORD [wk(6)] ; xmm0=(04 14 24 34 05 15 25 35)
movdqa xmm2, XMMWORD [wk(7)] ; xmm2=(06 16 26 36 07 17 27 37)
movdqa XMMWORD [wk(8)], xmm3 ; wk(8)=col1
movdqa XMMWORD [wk(9)], xmm4 ; wk(9)=col3
movdqa xmm3, xmm0 ; transpose coefficients(phase 3)
punpcklqdq xmm0, xmm6 ; xmm0=col4=(04 14 24 34 44 54 64 74)
punpckhqdq xmm3, xmm6 ; xmm3=col5=(05 15 25 35 45 55 65 75)
movdqa xmm4, xmm2 ; transpose coefficients(phase 3)
punpcklqdq xmm2, xmm5 ; xmm2=col6=(06 16 26 36 46 56 66 76)
punpckhqdq xmm4, xmm5 ; xmm4=col7=(07 17 27 37 47 57 67 77)
movdqa XMMWORD [wk(10)], xmm3 ; wk(10)=col5
movdqa XMMWORD [wk(11)], xmm4 ; wk(11)=col7
.column_end:
; -- Prefetch the next coefficient block
prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 0*32]
prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 1*32]
prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 2*32]
prefetchnta [esi + DCTSIZE2*SIZEOF_JCOEF + 3*32]
; ---- Pass 2: process rows from work array, store into output array.
mov eax, [original_ebp]
mov edi, JSAMPARRAY [output_buf(eax)] ; (JSAMPROW *)
mov eax, JDIMENSION [output_col(eax)]
; -- Even part
; xmm7=col0, xmm1=col2, xmm0=col4, xmm2=col6
; (Original)
; z1 = (z2 + z3) * 0.541196100;
; tmp2 = z1 + z3 * -1.847759065;
; tmp3 = z1 + z2 * 0.765366865;
;
; (This implementation)
; tmp2 = z2 * 0.541196100 + z3 * (0.541196100 - 1.847759065);
; tmp3 = z2 * (0.541196100 + 0.765366865) + z3 * 0.541196100;
movdqa xmm6, xmm1 ; xmm1=in2=z2
movdqa xmm5, xmm1
punpcklwd xmm6, xmm2 ; xmm2=in6=z3
punpckhwd xmm5, xmm2
movdqa xmm1, xmm6
movdqa xmm2, xmm5
pmaddwd xmm6, [GOTOFF(ebx,PW_F130_F054)] ; xmm6=tmp3L
pmaddwd xmm5, [GOTOFF(ebx,PW_F130_F054)] ; xmm5=tmp3H
pmaddwd xmm1, [GOTOFF(ebx,PW_F054_MF130)] ; xmm1=tmp2L
pmaddwd xmm2, [GOTOFF(ebx,PW_F054_MF130)] ; xmm2=tmp2H
movdqa xmm3, xmm7
paddw xmm7, xmm0 ; xmm7=in0+in4
psubw xmm3, xmm0 ; xmm3=in0-in4
pxor xmm4, xmm4
pxor xmm0, xmm0
punpcklwd xmm4, xmm7 ; xmm4=tmp0L
punpckhwd xmm0, xmm7 ; xmm0=tmp0H
psrad xmm4, (16-CONST_BITS) ; psrad xmm4,16 & pslld xmm4,CONST_BITS
psrad xmm0, (16-CONST_BITS) ; psrad xmm0,16 & pslld xmm0,CONST_BITS
movdqa xmm7, xmm4
paddd xmm4, xmm6 ; xmm4=tmp10L
psubd xmm7, xmm6 ; xmm7=tmp13L
movdqa xmm6, xmm0
paddd xmm0, xmm5 ; xmm0=tmp10H
psubd xmm6, xmm5 ; xmm6=tmp13H
movdqa XMMWORD [wk(0)], xmm4 ; wk(0)=tmp10L
movdqa XMMWORD [wk(1)], xmm0 ; wk(1)=tmp10H
movdqa XMMWORD [wk(2)], xmm7 ; wk(2)=tmp13L
movdqa XMMWORD [wk(3)], xmm6 ; wk(3)=tmp13H
pxor xmm5, xmm5
pxor xmm4, xmm4
punpcklwd xmm5, xmm3 ; xmm5=tmp1L
punpckhwd xmm4, xmm3 ; xmm4=tmp1H
psrad xmm5, (16-CONST_BITS) ; psrad xmm5,16 & pslld xmm5,CONST_BITS
psrad xmm4, (16-CONST_BITS) ; psrad xmm4,16 & pslld xmm4,CONST_BITS
movdqa xmm0, xmm5
paddd xmm5, xmm1 ; xmm5=tmp11L
psubd xmm0, xmm1 ; xmm0=tmp12L
movdqa xmm7, xmm4
paddd xmm4, xmm2 ; xmm4=tmp11H
psubd xmm7, xmm2 ; xmm7=tmp12H
movdqa XMMWORD [wk(4)], xmm5 ; wk(4)=tmp11L
movdqa XMMWORD [wk(5)], xmm4 ; wk(5)=tmp11H
movdqa XMMWORD [wk(6)], xmm0 ; wk(6)=tmp12L
movdqa XMMWORD [wk(7)], xmm7 ; wk(7)=tmp12H
; -- Odd part
movdqa xmm6, XMMWORD [wk(9)] ; xmm6=col3
movdqa xmm3, XMMWORD [wk(8)] ; xmm3=col1
movdqa xmm1, XMMWORD [wk(11)] ; xmm1=col7
movdqa xmm2, XMMWORD [wk(10)] ; xmm2=col5
movdqa xmm5, xmm6
movdqa xmm4, xmm3
paddw xmm5, xmm1 ; xmm5=z3
paddw xmm4, xmm2 ; xmm4=z4
; (Original)
; z5 = (z3 + z4) * 1.175875602;
; z3 = z3 * -1.961570560; z4 = z4 * -0.390180644;
; z3 += z5; z4 += z5;
;
; (This implementation)
; z3 = z3 * (1.175875602 - 1.961570560) + z4 * 1.175875602;
; z4 = z3 * 1.175875602 + z4 * (1.175875602 - 0.390180644);
movdqa xmm0, xmm5
movdqa xmm7, xmm5
punpcklwd xmm0, xmm4
punpckhwd xmm7, xmm4
movdqa xmm5, xmm0
movdqa xmm4, xmm7
pmaddwd xmm0, [GOTOFF(ebx,PW_MF078_F117)] ; xmm0=z3L
pmaddwd xmm7, [GOTOFF(ebx,PW_MF078_F117)] ; xmm7=z3H
pmaddwd xmm5, [GOTOFF(ebx,PW_F117_F078)] ; xmm5=z4L
pmaddwd xmm4, [GOTOFF(ebx,PW_F117_F078)] ; xmm4=z4H
movdqa XMMWORD [wk(10)], xmm0 ; wk(10)=z3L
movdqa XMMWORD [wk(11)], xmm7 ; wk(11)=z3H
; (Original)
; z1 = tmp0 + tmp3; z2 = tmp1 + tmp2;
; tmp0 = tmp0 * 0.298631336; tmp1 = tmp1 * 2.053119869;
; tmp2 = tmp2 * 3.072711026; tmp3 = tmp3 * 1.501321110;
; z1 = z1 * -0.899976223; z2 = z2 * -2.562915447;
; tmp0 += z1 + z3; tmp1 += z2 + z4;
; tmp2 += z2 + z3; tmp3 += z1 + z4;
;
; (This implementation)
; tmp0 = tmp0 * (0.298631336 - 0.899976223) + tmp3 * -0.899976223;
; tmp1 = tmp1 * (2.053119869 - 2.562915447) + tmp2 * -2.562915447;
; tmp2 = tmp1 * -2.562915447 + tmp2 * (3.072711026 - 2.562915447);
; tmp3 = tmp0 * -0.899976223 + tmp3 * (1.501321110 - 0.899976223);
; tmp0 += z3; tmp1 += z4;
; tmp2 += z3; tmp3 += z4;
movdqa xmm0, xmm1
movdqa xmm7, xmm1
punpcklwd xmm0, xmm3
punpckhwd xmm7, xmm3
movdqa xmm1, xmm0
movdqa xmm3, xmm7
pmaddwd xmm0, [GOTOFF(ebx,PW_MF060_MF089)] ; xmm0=tmp0L
pmaddwd xmm7, [GOTOFF(ebx,PW_MF060_MF089)] ; xmm7=tmp0H
pmaddwd xmm1, [GOTOFF(ebx,PW_MF089_F060)] ; xmm1=tmp3L
pmaddwd xmm3, [GOTOFF(ebx,PW_MF089_F060)] ; xmm3=tmp3H
paddd xmm0, XMMWORD [wk(10)] ; xmm0=tmp0L
paddd xmm7, XMMWORD [wk(11)] ; xmm7=tmp0H
paddd xmm1, xmm5 ; xmm1=tmp3L
paddd xmm3, xmm4 ; xmm3=tmp3H
movdqa XMMWORD [wk(8)], xmm0 ; wk(8)=tmp0L
movdqa XMMWORD [wk(9)], xmm7 ; wk(9)=tmp0H
movdqa xmm0, xmm2
movdqa xmm7, xmm2
punpcklwd xmm0, xmm6
punpckhwd xmm7, xmm6
movdqa xmm2, xmm0
movdqa xmm6, xmm7
pmaddwd xmm0, [GOTOFF(ebx,PW_MF050_MF256)] ; xmm0=tmp1L
pmaddwd xmm7, [GOTOFF(ebx,PW_MF050_MF256)] ; xmm7=tmp1H
pmaddwd xmm2, [GOTOFF(ebx,PW_MF256_F050)] ; xmm2=tmp2L
pmaddwd xmm6, [GOTOFF(ebx,PW_MF256_F050)] ; xmm6=tmp2H
paddd xmm0, xmm5 ; xmm0=tmp1L
paddd xmm7, xmm4 ; xmm7=tmp1H
paddd xmm2, XMMWORD [wk(10)] ; xmm2=tmp2L
paddd xmm6, XMMWORD [wk(11)] ; xmm6=tmp2H
movdqa XMMWORD [wk(10)], xmm0 ; wk(10)=tmp1L
movdqa XMMWORD [wk(11)], xmm7 ; wk(11)=tmp1H
; -- Final output stage
movdqa xmm5, XMMWORD [wk(0)] ; xmm5=tmp10L
movdqa xmm4, XMMWORD [wk(1)] ; xmm4=tmp10H
movdqa xmm0, xmm5
movdqa xmm7, xmm4
paddd xmm5, xmm1 ; xmm5=data0L
paddd xmm4, xmm3 ; xmm4=data0H
psubd xmm0, xmm1 ; xmm0=data7L
psubd xmm7, xmm3 ; xmm7=data7H
movdqa xmm1, [GOTOFF(ebx,PD_DESCALE_P2)] ; xmm1=[PD_DESCALE_P2]
paddd xmm5, xmm1
paddd xmm4, xmm1
psrad xmm5, DESCALE_P2
psrad xmm4, DESCALE_P2
paddd xmm0, xmm1
paddd xmm7, xmm1
psrad xmm0, DESCALE_P2
psrad xmm7, DESCALE_P2
packssdw xmm5, xmm4 ; xmm5=data0=(00 10 20 30 40 50 60 70)
packssdw xmm0, xmm7 ; xmm0=data7=(07 17 27 37 47 57 67 77)
movdqa xmm3, XMMWORD [wk(4)] ; xmm3=tmp11L
movdqa xmm1, XMMWORD [wk(5)] ; xmm1=tmp11H
movdqa xmm4, xmm3
movdqa xmm7, xmm1
paddd xmm3, xmm2 ; xmm3=data1L
paddd xmm1, xmm6 ; xmm1=data1H
psubd xmm4, xmm2 ; xmm4=data6L
psubd xmm7, xmm6 ; xmm7=data6H
movdqa xmm2, [GOTOFF(ebx,PD_DESCALE_P2)] ; xmm2=[PD_DESCALE_P2]
paddd xmm3, xmm2
paddd xmm1, xmm2
psrad xmm3, DESCALE_P2
psrad xmm1, DESCALE_P2
paddd xmm4, xmm2
paddd xmm7, xmm2
psrad xmm4, DESCALE_P2
psrad xmm7, DESCALE_P2
packssdw xmm3, xmm1 ; xmm3=data1=(01 11 21 31 41 51 61 71)
packssdw xmm4, xmm7 ; xmm4=data6=(06 16 26 36 46 56 66 76)
packsswb xmm5, xmm4 ; xmm5=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
packsswb xmm3, xmm0 ; xmm3=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
movdqa xmm6, XMMWORD [wk(6)] ; xmm6=tmp12L
movdqa xmm2, XMMWORD [wk(7)] ; xmm2=tmp12H
movdqa xmm1, XMMWORD [wk(10)] ; xmm1=tmp1L
movdqa xmm7, XMMWORD [wk(11)] ; xmm7=tmp1H
movdqa XMMWORD [wk(0)], xmm5 ; wk(0)=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
movdqa XMMWORD [wk(1)], xmm3 ; wk(1)=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
movdqa xmm4, xmm6
movdqa xmm0, xmm2
paddd xmm6, xmm1 ; xmm6=data2L
paddd xmm2, xmm7 ; xmm2=data2H
psubd xmm4, xmm1 ; xmm4=data5L
psubd xmm0, xmm7 ; xmm0=data5H
movdqa xmm5, [GOTOFF(ebx,PD_DESCALE_P2)] ; xmm5=[PD_DESCALE_P2]
paddd xmm6, xmm5
paddd xmm2, xmm5
psrad xmm6, DESCALE_P2
psrad xmm2, DESCALE_P2
paddd xmm4, xmm5
paddd xmm0, xmm5
psrad xmm4, DESCALE_P2
psrad xmm0, DESCALE_P2
packssdw xmm6, xmm2 ; xmm6=data2=(02 12 22 32 42 52 62 72)
packssdw xmm4, xmm0 ; xmm4=data5=(05 15 25 35 45 55 65 75)
movdqa xmm3, XMMWORD [wk(2)] ; xmm3=tmp13L
movdqa xmm1, XMMWORD [wk(3)] ; xmm1=tmp13H
movdqa xmm7, XMMWORD [wk(8)] ; xmm7=tmp0L
movdqa xmm5, XMMWORD [wk(9)] ; xmm5=tmp0H
movdqa xmm2, xmm3
movdqa xmm0, xmm1
paddd xmm3, xmm7 ; xmm3=data3L
paddd xmm1, xmm5 ; xmm1=data3H
psubd xmm2, xmm7 ; xmm2=data4L
psubd xmm0, xmm5 ; xmm0=data4H
movdqa xmm7, [GOTOFF(ebx,PD_DESCALE_P2)] ; xmm7=[PD_DESCALE_P2]
paddd xmm3, xmm7
paddd xmm1, xmm7
psrad xmm3, DESCALE_P2
psrad xmm1, DESCALE_P2
paddd xmm2, xmm7
paddd xmm0, xmm7
psrad xmm2, DESCALE_P2
psrad xmm0, DESCALE_P2
movdqa xmm5, [GOTOFF(ebx,PB_CENTERJSAMP)] ; xmm5=[PB_CENTERJSAMP]
packssdw xmm3, xmm1 ; xmm3=data3=(03 13 23 33 43 53 63 73)
packssdw xmm2, xmm0 ; xmm2=data4=(04 14 24 34 44 54 64 74)
movdqa xmm7, XMMWORD [wk(0)] ; xmm7=(00 10 20 30 40 50 60 70 06 16 26 36 46 56 66 76)
movdqa xmm1, XMMWORD [wk(1)] ; xmm1=(01 11 21 31 41 51 61 71 07 17 27 37 47 57 67 77)
packsswb xmm6, xmm2 ; xmm6=(02 12 22 32 42 52 62 72 04 14 24 34 44 54 64 74)
packsswb xmm3, xmm4 ; xmm3=(03 13 23 33 43 53 63 73 05 15 25 35 45 55 65 75)
paddb xmm7, xmm5
paddb xmm1, xmm5
paddb xmm6, xmm5
paddb xmm3, xmm5
movdqa xmm0, xmm7 ; transpose coefficients(phase 1)
punpcklbw xmm7, xmm1 ; xmm7=(00 01 10 11 20 21 30 31 40 41 50 51 60 61 70 71)
punpckhbw xmm0, xmm1 ; xmm0=(06 07 16 17 26 27 36 37 46 47 56 57 66 67 76 77)
movdqa xmm2, xmm6 ; transpose coefficients(phase 1)
punpcklbw xmm6, xmm3 ; xmm6=(02 03 12 13 22 23 32 33 42 43 52 53 62 63 72 73)
punpckhbw xmm2, xmm3 ; xmm2=(04 05 14 15 24 25 34 35 44 45 54 55 64 65 74 75)
movdqa xmm4, xmm7 ; transpose coefficients(phase 2)
punpcklwd xmm7, xmm6 ; xmm7=(00 01 02 03 10 11 12 13 20 21 22 23 30 31 32 33)
punpckhwd xmm4, xmm6 ; xmm4=(40 41 42 43 50 51 52 53 60 61 62 63 70 71 72 73)
movdqa xmm5, xmm2 ; transpose coefficients(phase 2)
punpcklwd xmm2, xmm0 ; xmm2=(04 05 06 07 14 15 16 17 24 25 26 27 34 35 36 37)
punpckhwd xmm5, xmm0 ; xmm5=(44 45 46 47 54 55 56 57 64 65 66 67 74 75 76 77)
movdqa xmm1, xmm7 ; transpose coefficients(phase 3)
punpckldq xmm7, xmm2 ; xmm7=(00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17)
punpckhdq xmm1, xmm2 ; xmm1=(20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37)
movdqa xmm3, xmm4 ; transpose coefficients(phase 3)
punpckldq xmm4, xmm5 ; xmm4=(40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57)
punpckhdq xmm3, xmm5 ; xmm3=(60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77)
pshufd xmm6, xmm7, 0x4E ; xmm6=(10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07)
pshufd xmm0, xmm1, 0x4E ; xmm0=(30 31 32 33 34 35 36 37 20 21 22 23 24 25 26 27)
pshufd xmm2, xmm4, 0x4E ; xmm2=(50 51 52 53 54 55 56 57 40 41 42 43 44 45 46 47)
pshufd xmm5, xmm3, 0x4E ; xmm5=(70 71 72 73 74 75 76 77 60 61 62 63 64 65 66 67)
mov edx, JSAMPROW [edi+0*SIZEOF_JSAMPROW]
mov esi, JSAMPROW [edi+2*SIZEOF_JSAMPROW]
movq XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm7
movq XMM_MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm1
mov edx, JSAMPROW [edi+4*SIZEOF_JSAMPROW]
mov esi, JSAMPROW [edi+6*SIZEOF_JSAMPROW]
movq XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm4
movq XMM_MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm3
mov edx, JSAMPROW [edi+1*SIZEOF_JSAMPROW]
mov esi, JSAMPROW [edi+3*SIZEOF_JSAMPROW]
movq XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm6
movq XMM_MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm0
mov edx, JSAMPROW [edi+5*SIZEOF_JSAMPROW]
mov esi, JSAMPROW [edi+7*SIZEOF_JSAMPROW]
movq XMM_MMWORD [edx+eax*SIZEOF_JSAMPLE], xmm2
movq XMM_MMWORD [esi+eax*SIZEOF_JSAMPLE], xmm5
pop edi
pop esi
; pop edx ; need not be preserved
; pop ecx ; unused
poppic ebx
mov esp, ebp ; esp <- aligned ebp
pop esp ; esp <- original ebp
pop ebp
ret
; For some reason, the OS X linker does not honor the request to align the
; segment unless we do this.
align 32
|
; A048479: a(n) = T(7,n), array T given by A048472.
; 1,9,33,97,257,641,1537,3585,8193,18433,40961,90113,196609,425985,917505,1966081,4194305,8912897,18874369,39845889,83886081,176160769,369098753,771751937,1610612737,3355443201,6979321857,14495514625,30064771073,62277025793,128849018881,266287972353,549755813889,1133871366145,2336462209025,4810363371521,9895604649985,20340965113857,41781441855489,85761906966529,175921860444161,360639813910529,738871813865473,1512927999819777,3096224743817217,6333186975989761,12947848928690177,26458647810801665,54043195528445953,110338190870577153,225179981368524801,459367161991790593,936748722493063169,1909526242005090305,3891110078048108545,7926335344172072961,16140901064495857665,32858262881295138817,66869447267197124609,136044737543607943169,276701161105643274241,562625694248141324289,1143698132569992200193,2324289753287403503617,4722366482869645213697,9592306918328966840321,19479761741837286506497,39549819294033278664705,80280230208783968632833,162921643659002759872513,330565653800875164958721,670576040567489620344833,1360041547066457821544449,2757862025995872804798465,5591281915717659933016065,11333679558887148512870401,22969590572677954319417345,46543644055163223226187777,94296213929941075627081729,191010279499111409603575809,386856262276681335905976321,783383931110279705209602049,1586110675334393477214502913,3210906976896455088019603457,6499185206248246443220402177,13153112917407165420803194881,26615710844635675910331170817,53850391708914041958111903745,108938723457113464191122931713,220353326992797688932044111873,445658414142736898963684720641,901220348599756840126562435073,1822247737828079764651510857729,3684109556913291698099793690625,7447447276340847733793131331585,15053350877710224142773350563841,30423614405477505635920876929025,61481054111069125972590105460737,124229758822366481346676914126849,250994818845189421496347234664449
mov $1,2
pow $1,$0
mul $1,4
mul $1,$0
add $1,1
mov $0,$1
|
; ===== Makefile Headers =====
; MBC 0x00
; RAM 0x00
INCLUDE "hardware.inc"
SECTION "Header", ROM0[0]
ds $100 - @
SECTION "Test", ROM0[$100]
EntryPoint::
jr Main
ds $150 - @
;----------------------------------------------------------------------------
; This Test ROM simply loads a few basic tiles and arranges them to display
; a smiley face. Palette initialization doesn't matter, the only thing being
; tested is the use of the correct tile data and tilemap memory regions.
;----------------------------------------------------------------------------
Main::
;====================================================
; Wait for VBlank & Stop PPU
ld a, [rLY]
cp SCRN_Y
jr c, Main
xor a
ldh [rLCDC], a
;====================================================
; Initialize Palettes
; DMG Palettes
ld a, %11100100
ldh [rBGP], a
; CGB Palettes
ld a, BCPSF_AUTOINC
ldh [rBCPS], a
ld a, $FF
ldh [rBCPD], a
ldh [rBCPD], a
xor a
ldh [rBCPD], a
ldh [rBCPD], a
ldh [rBCPD], a
ldh [rBCPD], a
ldh [rBCPD], a
ldh [rBCPD], a
;====================================================
; Clear VRAM before anything
ld hl, $8000
ld de, $2000
.vramClearLoop
xor a
ld [hli], a
dec de
ld a, d
or e
jr nz, .vramClearLoop
;====================================================
; Load Tile Data into VRAM
ld hl, TileData
; Load VRAM address into DE, check if end of data
.loadTileDataLoop
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
cp $FF
jr z, .endLoadTileData
; Load tile data into VRAM
ld a, [hli]
ld b, $10
.tileLoadLoop
ld [de], a
inc de
dec b
jr nz, .tileLoadLoop
jr .loadTileDataLoop
.endLoadTileData
;====================================================
; Load Tilemaps
; Valid Tilemap
ld hl, TilemapGood
ld de, $9800
call LoadTilemap
; Unused Tilemap
ld hl, TilemapBad
ld de, $9C00
call LoadTilemap
;====================================================
; Initialize LCDC and loop infinitely
ld a, LCDCF_ON | LCDCF_BG8000 | LCDCF_BG9800 | LCDCF_BGON
ldh [rLCDC], a
jr @
;----------------------------------------------------------------------------
; Routine used to load tilemaps into VRAM. (See Tilemaps Section for format)
; Inputs:
; * HL - Pointer to Tilemap Data
; * DE - Pointer to VRAM
;----------------------------------------------------------------------------
LoadTilemap::
; Load Count into B, return if end of data
ld a, [hli]
ld b, a
bit 7, a
ret nz
; Load Tile ID into A and insert B times
ld a, [hli]
.tilemapLoadLoop
ld [de], a
inc de
dec b
jr nz, .tilemapLoadLoop
jr LoadTilemap
;----------------------------------------------------------------------------
; The following section contains tile data in the following format:
; * [2 byte] VRAM Address
; * [1 byte] Graphics Data, repeated for all 16 bytes in the tile data
;----------------------------------------------------------------------------
SECTION "Tile Data", ROM0
TileData::
dw $8010
db $FF
dw $8030
db $FF
dw $9010
db $FF
dw $9020
db $FF
dw $FFFF
;----------------------------------------------------------------------------
; The following section contains tilemaps in the following format:
; * [1 byte] Amount of tiles in succession
; Bit 7 Set = End of Tilemap
; * [1 byte] Tile ID to be inserted X times
;----------------------------------------------------------------------------
SECTION "Tilemap Data", ROM0
TilemapBad::
db $40, $00
db $08, $00, $04, $01, $14, $00
db $06, $00, $02, $01, $04, $00, $02, $01, $12, $00
db $05, $00, $01, $01, $08, $00, $01, $01, $11, $00
db $04, $00, $01, $01, $03, $00, $01, $01, $02, $00, $01, $01, $03, $00, $01, $01, $10, $00
db $04, $00, $01, $01, $03, $00, $01, $01, $02, $00, $01, $01, $03, $00, $01, $01, $10, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $04, $00, $01, $01, $02, $00, $06, $01, $02, $00, $01, $01, $10, $00
db $04, $00, $01, $01, $01, $00, $01, $01, $06, $00, $01, $01, $01, $00, $01, $01, $10, $00
db $05, $00, $01, $01, $08, $00, $01, $01, $11, $00
db $06, $00, $02, $01, $04, $00, $02, $01, $12, $00
db $08, $00, $04, $01, $14, $00
db $80 ; End of Tilemap
TilemapGood::
db $40, $00
db $08, $00, $04, $01, $14, $00
db $06, $00, $02, $01, $04, $00, $02, $01, $12, $00
db $05, $00, $01, $01, $08, $00, $01, $01, $11, $00
db $04, $00, $01, $01, $03, $00, $01, $01, $02, $00, $01, $01, $03, $00, $01, $01, $10, $00
db $04, $00, $01, $01, $03, $00, $01, $01, $02, $00, $01, $01, $03, $00, $01, $01, $10, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $03, $00, $01, $01, $0C, $00, $01, $01, $0F, $00
db $04, $00, $01, $01, $01, $00, $01, $01, $06, $02, $01, $01, $01, $00, $01, $01, $10, $00
db $04, $00, $01, $01, $02, $00, $06, $03, $02, $00, $01, $01, $10, $00
db $05, $00, $01, $01, $08, $00, $01, $01, $11, $00
db $06, $00, $02, $01, $04, $00, $02, $01, $12, $00
db $08, $00, $04, $01, $14, $00
db $80 ; End of Tilemap |
db DEX_PIDGEOTTO ; pokedex id
db 63 ; base hp
db 60 ; base attack
db 55 ; base defense
db 71 ; base speed
db 50 ; base special
db NORMAL ; species type 1
db FLYING ; species type 2
db 120 ; catch rate
db 113 ; base exp yield
INCBIN "pic/ymon/pidgeotto.pic",0,1 ; 66, sprite dimensions
dw PidgeottoPicFront
dw PidgeottoPicBack
; attacks known at lvl 0
db GUST
db SAND_ATTACK
db 0
db 0
db 3 ; growth rate
; learnset
tmlearn 2,4,6
tmlearn 9,10
tmlearn 20
tmlearn 31,32
tmlearn 33,34,39
tmlearn 43,44
tmlearn 50,52
db BANK(PidgeottoPicFront)
|
<%
from pwnlib.shellcraft.i386.linux import syscall
%>
<%page args="mqdes, msg_ptr, msg_len, msg_prio, abs_timeout"/>
<%docstring>
Invokes the syscall mq_timedsend. See 'man 2 mq_timedsend' for more information.
Arguments:
mqdes(mqd_t): mqdes
msg_ptr(char): msg_ptr
msg_len(size_t): msg_len
msg_prio(unsigned): msg_prio
abs_timeout(timespec): abs_timeout
</%docstring>
${syscall('SYS_mq_timedsend', mqdes, msg_ptr, msg_len, msg_prio, abs_timeout)}
|
; A175833: Periodic sequence: repeat 4,7,11.
; 4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11,4,7,11
mod $0,3
mov $1,$0
mul $1,4
trn $1,1
add $1,4
|
Music_DancingHall:
musicheader 3, 1, Music_DancingHall_Ch1
musicheader 1, 2, Music_DancingHall_Ch2
musicheader 1, 3, Music_DancingHall_Ch3
db $3
Music_DancingHall_Ch1:
tempo 208
volume $77
stereopanning $f
notetype $6, $b7
note __, 3
dutycycle $0
Music_DancingHall_branch_ef9d3:
notetype $c, $b7
callchannel Music_DancingHall_branch_efa17
note __, 16
callchannel Music_DancingHall_branch_efa17
note __, 16
note __, 16
note __, 16
intensity $b1
octave 2
note B_, 1
octave 3
note D_, 1
note F_, 1
note A_, 1
note B_, 1
note A_, 1
note B_, 1
octave 4
note D_, 1
note F_, 2
notetype $8, $b1
note D_, 1
note E_, 1
note D_, 1
octave 3
note B_, 3
note A_, 3
notetype $c, $b1
note B_, 1
note A_, 1
note D_, 1
note E_, 1
octave 4
note F_, 2
notetype $8, $b1
octave 3
note B_, 1
octave 4
note D_, 1
octave 3
note B_, 1
notetype $c, $b5
note A_, 1
note __, 1
note B_, 1
note B_, 1
note A_, 1
note __, 1
note F_, 2
loopchannel 0, Music_DancingHall_branch_ef9d3
Music_DancingHall_branch_efa17:
octave 3
note B_, 1
note __, 1
note A_, 1
note __, 1
note B_, 1
note __, 1
note A_, 1
note __, 1
octave 4
note E_, 1
note __, 1
note D_, 1
note __, 1
octave 3
note B_, 1
note __, 1
octave 4
note D_, 1
note __, 1
endchannel
Music_DancingHall_Ch2:
stereopanning $f0
notetype $6, $a1
dutycycle $0
vibrato $10, $24
note __, 3
Music_DancingHall_branch_efa37:
notetype $6, $a2
callchannel Music_DancingHall_branch_efa7a
callchannel Music_DancingHall_branch_efa7a
intensity $a7
octave 2
note D_, 16
note F_, 16
notetype $c, $a7
note E_, 16
octave 3
note F_, 1
note A_, 1
note B_, 1
octave 4
note D_, 1
note E_, 1
note D_, 1
note E_, 1
note A_, 1
note B_, 2
notetype $8, $a7
note A_, 1
note B_, 1
note A_, 1
note F_, 3
note D_, 3
notetype $c, $a7
note E_, 1
note D_, 1
octave 3
note A_, 1
note B_, 1
octave 4
note A_, 2
notetype $8, $a7
note F_, 1
note A_, 1
note F_, 1
notetype $c, $a7
note E_, 1
note __, 1
note F_, 1
note F_, 1
note E_, 1
note __, 1
note D_, 2
loopchannel 0, Music_DancingHall_branch_efa37
Music_DancingHall_branch_efa7a:
intensity $a1
octave 4
note E_, 4
octave 2
note E_, 4
octave 4
note E_, 4
octave 2
note E_, 4
octave 4
note B_, 4
note A_, 4
note F_, 4
note A_, 4
intensity $33
note D_, 1
note F_, 1
intensity $63
note D_, 1
note F_, 1
intensity $93
note D_, 1
note F_, 1
intensity $c3
note D_, 1
note F_, 1
intensity $e3
note D_, 1
note F_, 1
intensity $a3
note D_, 1
note F_, 1
intensity $83
note D_, 1
note F_, 1
intensity $53
note D_, 1
note F_, 1
intensity $73
octave 3
note B_, 1
octave 4
note E_, 1
intensity $a3
octave 3
note B_, 1
octave 4
note E_, 1
intensity $b3
octave 3
note A_, 1
octave 4
note D_, 1
intensity $c3
octave 3
note A_, 1
octave 4
note D_, 1
intensity $d3
octave 3
note E_, 1
note B_, 1
intensity $e3
note E_, 1
note B_, 1
intensity $f3
note A_, 1
octave 4
note D_, 1
intensity $f3
octave 3
note A_, 1
octave 4
note D_, 1
endchannel
Music_DancingHall_Ch3:
stereopanning $ff
vibrato $16, $24
notetype $6, $10
octave 5
note A_, 1
note B_, 1
octave 6
note D_, 1
Music_DancingHall_branch_efae3:
note E_, 13
note D_, 1
note E_, 1
note A_, 1
note B_, 16
intensity $14
octave 3
note F_, 16
note E_, 14
intensity $10
octave 6
note E_, 1
note F_, 1
note E_, 13
note D_, 1
note E_, 1
note A_, 1
note B_, 16
intensity $14
octave 3
note F_, 16
note E_, 16
intensity $13
octave 4
note F_, 2
note A_, 2
note B_, 2
octave 5
note D_, 2
note E_, 2
note D_, 2
note E_, 2
note A_, 2
note A#, 1
note B_, 3
notetype $8, $13
note A_, 1
note B_, 1
note A_, 1
note F_, 3
note D_, 3
notetype $c, $13
note E_, 1
note D_, 1
octave 4
note A_, 1
note B_, 1
octave 5
note A_, 2
notetype $8, $13
note F_, 1
note A_, 1
note F_, 1
notetype $6, $13
note D#, 1
note E_, 3
note D_, 4
octave 4
note B_, 4
octave 5
note D_, 4
intensity $14
octave 3
note D_, 16
note F_, 16
note E_, 16
note E_, 13
intensity $10
octave 5
note A_, 1
note B_, 1
octave 6
note D_, 1
loopchannel 0, Music_DancingHall_branch_efae3
|
timekeeper_hours equ $7FFB
timekeeper_minutes equ $7FFA
timekeeper_seconds equ $7FF9
entrypoint clock
.block
LD A, 71
OUT gaddr_l, A
LD A, 29
OUT gaddr_h, A
LD A, (timekeeper_hours)
CALL ROM_PRINT_BYTE
LD A, ':'
OUT chars_io, A
LD A, (timekeeper_minutes)
CALL ROM_PRINT_BYTE
LD A, ':'
OUT chars_io, A
LD A, (timekeeper_seconds)
CALL ROM_PRINT_BYTE
RET
.endblock
|
; A090042: a(n) = 2*a(n-1) + 11*a(n-2) for n > 1, a(0) = a(1) = 1.
; Submitted by Jon Maiga
; 1,1,13,37,217,841,4069,17389,79537,350353,1575613,7005109,31341961,139740121,624241813,2785624957,12437909857,55517694241,247852396909,1106399430469,4939175226937,22048744189033,98428415874373,439393017828109,1961498610274321,8756320416657841,39089125546333213,174497775675902677,778975932361470697,3477427397157870841,15523590050291919349,69298881469320417949,309357253491851948737,1381002203146228494913,6164934194702828425933,27520892624014170295909,122856061389759453277081
mov $3,1
lpb $0
sub $0,1
mov $2,$3
mul $2,12
add $3,$1
add $1,$2
lpe
mov $0,$3
|
#ROM *
#Uses v2_18g3.inc
;*******************************************************************************
#DATA
;*******************************************************************************
ready fcb 0
FLEET fcb 0
PLAYER fcb 1
MASK fcb 0
ROW fcb 0
COL fcb 0
KEY fcb 5
boardRows fcb 4
boardCols fcb 4
p1ships fcb 0
p2ships fcb 0
p1board rmb 16
p2board rmb 16
filler fcs ' '
title fcs ' BATTLESHIP '
subtitle fcs ' A crappy game. '
p1 fcs ' Player 1 '
p2 fcs ' Player 2 '
place fcs 'Place a ship. '
enter fcs 'Enter coords. '
shoot fcs 'Shoot a ship. '
over fcs ' Game over. '
invalid fcs 'invalid position'
occupied fcs 'already occupied'
available fcs ' Nice ship! '
hit fcs ' hit! '
miss fcs 'miss... '
win fcs "You're the ship."
loss fcs "You're crappy. "
DEBUGinterrupt fcs LF,'INTERRUPTION DETECTED',LF
DEBUGbegin fcs 'Begin',LF
DEBUGstrategize fcs 'Strategizing...',LF
DEBUGfirst fcs ' -1st ship placed',LF
DEBUGsecond fcs ' -2nd ship placed',LF
DEBUGthird fcs ' -3rd ship placed',LF
DEBUGfourth fcs ' -4th ship placed',LF
DEBUGgetCoord fcs 'Getting coordinates...',LF,' -waiting for input...',LF
DEBUGgotCoord fcs ' -input received',LF,' -mapping to board position...',LF
DEBUGgotError fcs ' -ERROR detected: invalid input received',LF
DEBUGmask fcs ' -current mask: '
DEBUGrow fcs ' -current row: '
DEBUGcol fcs ' -current col: '
DEBUGgotRow fcs ' -ROW: '
DEBUGgotCol fcs ' -COL: '
DEBUGgotKey fcs ' -KEY: '
DEBUGplaceShit fcs 'Placing ships...',LF
DEBUGplaceError fcs ' -ERROR detected: invalid ship position (already taken)',LF
DEBUGswitch fcs 'Switching players...',LF
DEBUGfire fcs 'Firing at ships...',LF
DEBUGshootP1 fcs ' -shooting at player 1',LF
DEBUGshootP2 fcs ' -shooting at player 2',LF
DEBUGhit fcs ' -hit',LF
DEBUGmiss fcs ' -miss',LF
DEBUGupdate fcs 'Updating the fleets...',LF
DEBUGships fcs ' -ships: '
DEBUGfleet fcs ' -fleet status: '
DEBUGinit fcs ' -detected p1 initial setup, suppressing p2 status',LF
DEBUGstatus fcs ' -indicating fleet status',LF
DEBUGcheck fcs 'Checking for a winner...',LF
DEBUGalive fcs ' -alive',LF
DEBUGdead fcs ' -DEAD!',LF
DEBUGwait fcs 'Waiting through a delay...',LF
DEBUGdone fcs 'Finish',LF
;*******************************************************************************
#ROM
;*******************************************************************************
interrupt proc
lda #1 ; set ready bit
sta ready
@print #DEBUGinterrupt
rti
;*******************************************************************************
Main proc
@print #DEBUGbegin
ldx #interrupt ; set interrupt
stx ISR_JUMP15
clra ; clear lights
coma
sta leds
@print 1,#title
@print 2,#subtitle
jsr Delay
;-------------------------------------- ;strategize
@print #DEBUGstrategize
@print 1,#p1
jsr Delay
jsr placeShit ; position p1 ships
@print #DEBUGfirst
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGsecond
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGthird
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGfourth
@print 2,#available
jsr Delay
jsr switchPlayer
jsr placeShit ; position p2 ships
@print #DEBUGfirst
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGsecond
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGthird
@print 2,#available
jsr Delay
jsr placeShit
@print #DEBUGfourth
@print 2,#available
jsr Delay
jsr switchPlayer ; randomly choose first shooter
GameLoop@@ jsr firePiss ; guess
jsr checkWin ; check
jsr switchPlayer ; switch
bra GameLoop@@
;*******************************************************************************
getCoord proc
Loop@@ push
@print 2,#enter
@print #DEBUGgetCoord
clr ready ; clear submission
Input@@ ;@print #DEBUGloop
ldb switches ; get input
lda ready ; check for submission
beq Input@@
@print #DEBUGgotCoord
clr ready ; clear submission
lda #5 ; row 4: ---x----
sta ROW ; 1234(p2)
lda #8 ; start at: ---x----
sta MASK
Row@@ lda ROW ; move to next switch/row
deca
beq Fail@@ ; min row = 1
sta ROW
; @print #DEBUGrow
; psha
; lda ROW
; adda #'0'
; @putc
; pula
; @crlf
lda MASK ; shift mask left
lsla
beq Fail@@ ; min row = binary 256 = binary 0 w/ carry
sta MASK
; @print #DEBUGmask
; pshd
; clra
; ldb MASK
; jsr CONSOLEINT
; puld
; @crlf
bitb MASK ; apply mask
beq Row@@ ; detect row
;-------------------------------------- ; getCoordGotRow
; @print #DEBUGgotRow
; psha
; lda ROW
; adda #'0'
; @putc
; pula
; @crlf
lda #4 ; col 4: -------x
sta COL ; (p1)1234
lda #1 ; start at: -------x
sta MASK
Col@@ bitb MASK ; apply mask
bne GotCol@@ ; detect col
lda COL ; move to next switch/row
deca
ble Fail@@ ; min col = 1
sta COL
; @print #DEBUGcol
; psha
; lda COL
; adda #'0'
; @putc
; pula
; @crlf
lda MASK
lsla ; shift mask left
cmpa #16 ; min col = binary 16
beq Fail@@ ; detect invalid col
sta MASK
; pshd
; @print #DEBUGmask
; clra
; ldb MASK
; jsr CONSOLEINT
; puld
; @crlf
bra Col@@
GotCol@@
; @print #DEBUGgotCol
; psha
; lda COL
; adda #'0'
; @putc
; pula
; @crlf
lda ROW ; KEY = 4(ROW-1)+(COL-1) = 4ROW+COL-5
tab ; a = ROW
lsla:2 ; a = 4ROW
ldb COL
aba ; a = 4ROW+COL
suba #5 ; a = KEY
sta KEY
; @print #DEBUGgotKey
; psha
; lda KEY
; adda #'0'
; @putc
; pula
; @crlf
pull
rts
Fail@@ @print #DEBUGgotError
@print 2,#invalid
jsr Delay
pull
jmp Loop@@ ; try again
;*******************************************************************************
placeShit proc
Loop@@ push
@print 2,#place
@print #DEBUGplaceShit
lda PLAYER ; select correct board
cmpa #2
beq _1@@
;--------------------------------------
@print #p1
@crlf
ldx #p1board ; load p1 board
bra OnBoard@@
;--------------------------------------
_1@@ @print #p2
@crlf
ldx #p2board ; load p2 board
;--------------------------------------
OnBoard@@ jsr getCoord ; get position
psha
@print #DEBUGgotRow
lda ROW
adda #'0'
@putc
@crlf
@print #DEBUGgotCol
lda COL
adda #'0'
@putc
@crlf
@print #DEBUGgotKey
lda KEY
adda #'0'
@putc
@crlf
pula
ldb KEY
abx
lda ,x ; make sure a ship isnt already there
bne ShitTaken@@
lda #1 ; place ship
sta ,x
lda PLAYER ; add ship for the right player
cmpa #2
beq _2@@
;-------------------------------------- ; p1
lda p1ships
inca
sta p1ships
bra Done@@
;-------------------------------------- ; p2
_2@@ lda p2ships
inca
sta p2ships
;--------------------------------------
Done@@ jsr updateFleet
pull
rts
ShitTaken@@ @print #DEBUGplaceError
@print 2,#occupied
pull
jmp Loop@@
;*******************************************************************************
switchPlayer proc
push
@print #DEBUGswitch
lda PLAYER ; get current player
tab
inca ; a = next player
decb ; b = prev player
cmpa #3
bge Prev@@ ; decide how to toggle based on current player
;-------------------------------------- ; switchPlayerNext
@print #p2
@crlf
sta PLAYER ; change player
@print 1,#p2 ; change player indicator
jsr Delay
bra Done@@ ; /
;--------------------------------------
Prev@@ @print #p1
@crlf
stb PLAYER ; change player
@print 1,#p1 ; change player indicator
jsr Delay
;--------------------------------------
Done@@ pull
rts
;*******************************************************************************
firePiss proc
push
@print #DEBUGfire
@print 2,#shoot
jsr getCoord ; get where to fire
lda PLAYER ; detect who is shooting/getting shot at
cmpa #1
beq _1@@
;-------------------------------------- ; shooting at player 1
@print #DEBUGshootP1
ldx #p1board ; check if hit
ldb KEY
abx
lda ,x
beq _4@@
bra _3@@
_1@@ ;-------------------------------------- ; shooting at player 2
@print #DEBUGshootP2
ldx #p2board
ldb KEY
abx
lda ,x
beq _2@@
;-------------------------------------- ; hit for player 1
@print #DEBUGhit
clr ,x ; remove sunken ship
lda p2ships ; decrease count of p2 ships
deca
sta p2ships
bsr updateFleet ; change fleet indicator
@print 2,#hit
jsr Delay
bra Done@@
_2@@ ;-------------------------------------- ; player 1 misses
@print #DEBUGmiss
@print 2,#miss
bra Done@@
_3@@ ;-------------------------------------- ; hit for player 2
@print #DEBUGhit
clr ,x ; remove sunken ship
lda p1ships ; decrease count of p1 ships
deca
sta p1ships
bsr updateFleet ; change fleet indicator
@print 2,#hit
bra Done@@
;-------------------------------------- ; player 2 misses
_4@@ @print #DEBUGhit
@print 2,#miss
;--------------------------------------
Done@@ pull
rts
;*******************************************************************************
updateFleet proc
push
@print #DEBUGupdate
lda #1 ; a = fleet indicator
ldb p1ships ; b = player 1 ships
@print #p1
@crlf
@print #DEBUGships
pshd
clra
ldb p1ships
jsr CONSOLEINT
puld
@crlf
Loop@@ decb ; for each ship
beq Done@@ ; detect end of fleet
jle checkWin ; catch game over
; blt _1@@
lsla ; make room
inca ; add to fleet
bra Loop@@
;_1@@ clra ; avoid incorrect status by storing 0 mask
Done@@ lsla:4 ; offset p1 so as not to block p2
sta FLEET
lda #1 ; reset status for next player
; lda FLEET
@print #DEBUGfleet
psha
clra
ldb FLEET
jsr CONSOLEINT
pula
@crlf
ldb p2ships ; switch players
@print #p2
@crlf
@print #DEBUGships
pshd
clra
ldb p2ships
jsr CONSOLEINT
puld
@crlf
tstb
bne _1@@
@print #DEBUGinit
incb ; avoid problems in initial placement
deca
_1@@ decb
ble _2@@
lsla
inca
bra _1@@
_2@@ ora FLEET ; combine p1 & p2
sta FLEET
pshd
@print #DEBUGfleet
clra
ldb FLEET
jsr CONSOLEINT
@crlf
puld
;-------------------------------------- ; update fleet lights
@print #DEBUGstatus
coma ; display updated fleet
sta leds
pull
rts
;*******************************************************************************
checkWin proc
push
@print #DEBUGcheck
clrb ; b = key counter
@print #p1
@crlf
ldx #p1board ; x = addr. of current key
Loop@@ lda ,x
bne _1@@ ; stop as soon as 1 ship is detected
incb
cmpb #16 ; 4 rows x 4 cols = 16 positions to check
beq checkWinP1Dead ; detect p2 victory
inx
bra Loop@@
_1@@ @print #DEBUGalive
@print #p2
@crlf
ldx #p2board ; switch player
clrb ; reset counter
_2@@ lda ,x
bne _3@@ ; stop as soon as 1 ship is detected
incb
cmpb #16 ; 4 rows x 4 cols = 16 positions to check
beq checkWinP2Dead ; detect p1 victory
inx
bra _2@@
;-------------------------------------- ; both players are still alive
_3@@ @print #DEBUGalive
pull
rts
;*******************************************************************************
checkWinP1Dead proc
@print #DEBUGdead
@print 1,#p1
@print 2,#loss
bsr Delay
@print 1,#p2
@print 2,#win
bra gameOver
;*******************************************************************************
checkWinP2Dead proc
@print #DEBUGdead
@print 1,#p2
@print 2,#loss
bsr Delay
@print 1,#p1
@print 2,#win
bra gameOver
;*******************************************************************************
Delay proc
@print #DEBUGwait
@wait #3000 ; 3 seconds
rts
;*******************************************************************************
gameOver proc
@print #DEBUGdone
@print 1,#title
@print 2,#over
bsr Delay
Loop@@ lda ready ; wait for submission to restart
jne Main
@wait #500 ; .5 second delay
bra Loop@@
|
#include<vector>
#include<iostream>
#include<string>
#include<cstdlib>
#include<ctime>
#include<algorithm>
using namespace std;
// assume data is a not decrease order.
/**
* binary search target
* return: index, if not found return -1
*/
int normal_bin_search(vector<int> &data, int target) {
int left = 0;
int right = data.size() - 1;
int mid = 0;
while (left <= right) {
mid = left + (right - left) >> 2;
if (data[mid] < target)
left = mid + 1;
else if (data[mid] > target)
right = mid - 1;
else
return mid;
}
return -1;
}
/**
* find right most match of target number
*/
int right_bound_bin_search(vector<int> &data, int target) {
int left = 0;
int right = data.size() - 1;
int mid = 0;
while (left <= right) {
mid = left + (right - left) >> 2;
if (data[mid] <= target)
left = mid + 1;
else
right = mid - 1;
}
if (data[right] == target)
return right;
else
return -1;
}
/**
* find left most match of target number
*/
int left_bound_bin_search(vector<int> &data, int target) {
int left = 0;
int right = data.size() - 1;
int mid = 0;
while (left <= right) {
mid = left + (right - left) >> 2;
if (data[mid] < target)
left = mid + 1;
else
right = mid - 1;
}
if (data[left] == target)
return left;
else
return -1;
}
int main()
{
srand(time(NULL));
vector<int> data;
for (int i = 0; i < 10; ++i) {
data.push_back(rand() % 10);
}
sort(data.begin(), data.end());
for (int i = 0; i < 10; ++i) {
cout << data[i] << " ";
}
cout << endl;
cout << normal_bin_search(data, 6) << endl;
cout << left_bound_bin_search(data, 6) << endl;
cout << right_bound_bin_search(data, 6) << endl;
return 0;
}
|
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <assert.h>
#include <lib/zx/timer.h>
#include <stdio.h>
#include <threads.h>
#include <unistd.h>
#include <zxtest/zxtest.h>
namespace {
TEST(TimersTest, DeadlineAfter) {
auto then = zx_clock_get_monotonic();
// The day we manage to boot and run this test in less than 1uS we need to fix this.
ASSERT_GT(then, 1000u);
auto one_hour_later = zx_deadline_after(ZX_HOUR(1));
EXPECT_LT(then, one_hour_later);
zx_duration_t too_big = INT64_MAX - 100;
auto clamped = zx_deadline_after(too_big);
EXPECT_EQ(clamped, ZX_TIME_INFINITE);
EXPECT_LT(0, zx_deadline_after(10 * 365 * ZX_HOUR(24)));
EXPECT_LT(zx_deadline_after(ZX_TIME_INFINITE_PAST), 0);
}
TEST(TimersTest, SetNegativeDeadline) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
zx::duration slack;
ASSERT_OK(timer.set(zx::time(-1), slack));
zx_signals_t pending;
ASSERT_OK(timer.wait_one(ZX_TIMER_SIGNALED, zx::time::infinite(), &pending));
ASSERT_EQ(pending, ZX_TIMER_SIGNALED);
}
TEST(TimersTest, SetNegativeDeadlineMax) {
zx::timer timer;
ASSERT_EQ(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer), ZX_OK);
zx::duration slack;
ASSERT_OK(timer.set(zx::time(ZX_TIME_INFINITE_PAST), slack));
zx_signals_t pending;
ASSERT_OK(timer.wait_one(ZX_TIMER_SIGNALED, zx::time::infinite(), &pending));
ASSERT_EQ(pending, ZX_TIMER_SIGNALED);
}
TEST(TimersTest, SetNegativeSlack) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
ASSERT_EQ(timer.set(zx::time(), zx::duration(-1)), ZX_ERR_OUT_OF_RANGE);
}
TEST(TimersTest, Basic) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
zx_signals_t pending;
EXPECT_EQ(timer.wait_one(ZX_TIMER_SIGNALED, zx::time(), &pending), ZX_ERR_TIMED_OUT);
EXPECT_EQ(pending, 0u);
for (int ix = 0; ix != 10; ++ix) {
const auto deadline_timer = zx::deadline_after(zx::msec(50));
const auto deadline_wait = zx::deadline_after(zx::sec(1));
// Timer should fire faster than the wait timeout.
ASSERT_OK(timer.set(deadline_timer, zx::nsec(0)));
EXPECT_OK(timer.wait_one(ZX_TIMER_SIGNALED, deadline_wait, &pending));
EXPECT_EQ(pending, ZX_TIMER_SIGNALED);
}
}
TEST(TimersTest, Restart) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
zx_signals_t pending;
for (int ix = 0; ix != 10; ++ix) {
const auto deadline_timer = zx::deadline_after(zx::msec(500));
const auto deadline_wait = zx::deadline_after(zx::msec(1));
// Setting a timer already running is equivalent to a cancel + set.
ASSERT_OK(timer.set(deadline_timer, zx::nsec(0)));
EXPECT_EQ(timer.wait_one(ZX_TIMER_SIGNALED, deadline_wait, &pending), ZX_ERR_TIMED_OUT);
EXPECT_EQ(pending, 0u);
}
}
TEST(TimersTest, InvalidCalls) {
zx::timer timer;
ASSERT_EQ(zx::timer::create(0, ZX_CLOCK_UTC, &timer), ZX_ERR_INVALID_ARGS);
ASSERT_EQ(zx::timer::create(ZX_TIMER_SLACK_LATE + 1, ZX_CLOCK_UTC, &timer), ZX_ERR_INVALID_ARGS);
}
TEST(TimersTest, EdgeCases) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
ASSERT_OK(timer.set(zx::time(), zx::nsec(0)));
}
// furiously spin resetting the timer, trying to race with it going off to look for
// race conditions.
TEST(TimersTest, RestartRace) {
const zx_time_t kTestDuration = ZX_SEC(5);
auto start = zx_clock_get_monotonic();
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
while (zx_clock_get_monotonic() - start < kTestDuration) {
ASSERT_OK(timer.set(zx::deadline_after(zx::usec(100)), zx::nsec(0)));
}
EXPECT_OK(timer.cancel());
}
// If the timer is already due at the moment it is started then the signal should be
// asserted immediately. Likewise canceling the timer should immediately deassert
// the signal.
TEST(TimersTest, SignalsAssertedImmediately) {
zx::timer timer;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer));
for (int i = 0; i < 100; i++) {
zx::time now = zx::clock::get_monotonic();
EXPECT_OK(timer.set(now, zx::nsec(0)));
zx_signals_t pending;
EXPECT_OK(timer.wait_one(ZX_TIMER_SIGNALED, zx::time(), &pending));
EXPECT_EQ(pending, ZX_TIMER_SIGNALED);
EXPECT_OK(timer.cancel());
EXPECT_EQ(timer.wait_one(ZX_TIMER_SIGNALED, zx::time(), &pending), ZX_ERR_TIMED_OUT);
EXPECT_EQ(pending, 0u);
}
}
// Tests using CheckCoalescing are disabled because they are flaky. The system might have a timer
// nearby |deadline_1| or |deadline_2| and as such the test will fire either earlier or later than
// expected. The precise behavior is still tested by the "k timer tests" command.
//
// See ZX-1087 for the current owner.
void CheckCoalescing(uint32_t mode) {
// The second timer will coalesce to the first one for ZX_TIMER_SLACK_LATE
// but not for ZX_TIMER_SLACK_EARLY. This test is not precise because the
// system might have other timers that interfere with it. Precise tests are
// avaliable as kernel tests.
zx::timer timer_1;
ASSERT_OK(zx::timer::create(0, ZX_CLOCK_MONOTONIC, &timer_1));
zx::timer timer_2;
ASSERT_OK(zx::timer::create(mode, ZX_CLOCK_MONOTONIC, &timer_2));
zx_time_t start = zx_clock_get_monotonic();
const auto deadline_1 = zx::time(start + ZX_MSEC(350));
const auto deadline_2 = zx::time(start + ZX_MSEC(250));
ASSERT_OK(timer_1.set(deadline_1, zx::nsec(0)));
ASSERT_OK(timer_2.set(deadline_2, zx::msec(110)));
zx_signals_t pending;
EXPECT_OK(timer_2.wait_one(ZX_TIMER_SIGNALED, zx::time::infinite(), &pending));
EXPECT_EQ(pending, ZX_TIMER_SIGNALED);
auto duration = zx_clock_get_monotonic() - start;
if (mode == ZX_TIMER_SLACK_LATE) {
EXPECT_GE(duration, ZX_MSEC(350));
} else if (mode == ZX_TIMER_SLACK_EARLY) {
EXPECT_LE(duration, ZX_MSEC(345));
} else {
assert(false);
}
}
// Test is disabled, see |CheckCoalescing|.
//
// TODO(ZX-4592): Use DISABLED_ prefix when it's available.
//
// TEST(TimersTest, CoalesceTestEarly) {
// ASSERT_NO_FAILURES(CheckCoalescing(ZX_TIMER_SLACK_EARLY));
// }
// Test is disabled, see |CheckCoalescing|.
//
// TODO(ZX-4592): Use DISABLED_ prefix when it's available.
//
// TEST(TimersTest, CoalesceTestLate) {
// ASSERT_NO_FAILURES(CheckCoalescing(ZX_TIMER_SLACK_LATE));
// }
} // anonymous namespace
|
; A086090: 2^n+n3^n.
; Submitted by Jamie Morken(s3)
; 1,5,22,89,340,1247,4438,15437,52744,177659,591514,1950665,6381388,20734391,66977950,215266373,688813072,2195513843,6973830946,22083492161,69736736596,219669514415,690387505702,2165301501629
mov $1,2
pow $1,$0
add $1,1
mov $2,3
pow $2,$0
mul $2,$0
add $1,$2
mov $0,$1
sub $0,1
|
#include "Mcu.inc"
#include "FarCalls.inc"
#include "Door.inc"
#include "TestFixture.inc"
#include "../InitialiseAfterDoorMock.inc"
radix decimal
InitialisationChainTest code
global testArrange
testArrange:
fcall initialiseInitialiseAfterDoorMock
testAct:
fcall initialiseDoor
testAssert:
banksel calledInitialiseAfterDoor
.assert "calledInitialiseAfterDoor != 0, 'Next initialiser in chain was not called.'"
return
end
|
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2013, Image Engine Design Inc. 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 John Haddon nor the names of
// any other contributors to this software 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 OWNER 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.
//
//////////////////////////////////////////////////////////////////////////
#include "GafferUI/Pointer.h"
#include "IECore/CachedReader.h"
using namespace GafferUI;
static ConstPointerPtr g_current;
typedef std::map<std::string, ConstPointerPtr> Registry;
static Registry ®istry()
{
static Registry r;
if( !r.size() )
{
// register standard pointers
r["move"] = new Pointer( "move.png", Imath::V2i( 10 ) );
r["moveDiagonallyUp"] = new Pointer( "moveDiagonallyUp.png", Imath::V2i( 10 ) );
r["moveDiagonallyDown"] = new Pointer( "moveDiagonallyDown.png", Imath::V2i( 10 ) );
r["moveHorizontally"] = new Pointer( "moveHorizontally.png", Imath::V2i( 10 ) );
r["moveVertically"] = new Pointer( "moveVertically.png", Imath::V2i( 10 ) );
r["nodes"] = new Pointer( "nodes.png", Imath::V2i( 10, 5 ) );
r["objects"] = new Pointer( "objects.png", Imath::V2i( 53, 14 ) );
r["plug"] = new Pointer( "plug.png", Imath::V2i( 8, 7 ) );
r["rgba"] = new Pointer( "rgba.png", Imath::V2i( 11, 5 ) );
r["values"] = new Pointer( "values.png", Imath::V2i( 18, 11 ) );
r["paths"] = new Pointer( "paths.png", Imath::V2i( 7, 6 ) );
r["contextMenu"] = new Pointer( "pointerContextMenu.png", Imath::V2i( 1 ) );
r["tab"] = new Pointer( "pointerTab.png", Imath::V2i( 12, 13 ) );
r["detachedPanel"] = new Pointer( "pointerDetachedPanel.png", Imath::V2i( 12, 13 ) );
r["target"] = new Pointer( "pointerTarget.png", Imath::V2i( 14 ) );
r["crossHair"] = new Pointer( "pointerCrossHair.png", Imath::V2i( 14 ) );
}
return r;
}
Pointer::Pointer( const IECoreImage::ImagePrimitive *image, const Imath::V2i &hotspot )
: m_image( image->copy() ), m_hotspot( hotspot )
{
}
Pointer::Pointer( const std::string &fileName, const Imath::V2i &hotspot )
: m_image( nullptr ), m_hotspot( hotspot )
{
static IECore::CachedReaderPtr g_reader;
if( !g_reader )
{
const char *sp = getenv( "GAFFERUI_IMAGE_PATHS" );
sp = sp ? sp : "";
g_reader = new IECore::CachedReader( IECore::SearchPath( sp ) );
}
m_image = IECore::runTimeCast<const IECoreImage::ImagePrimitive>( g_reader->read( fileName ) );
if( !m_image )
{
throw IECore::Exception(
boost::str( boost::format( "File \"%s\" does not contain an image." ) % fileName )
);
}
}
const IECoreImage::ImagePrimitive *Pointer::image() const
{
return m_image.get();
}
const Imath::V2i &Pointer::hotspot() const
{
return m_hotspot;
}
void Pointer::setCurrent( ConstPointerPtr pointer )
{
if( !pointer && !g_current )
{
return;
}
if(
pointer && g_current &&
pointer->image()->isEqualTo( g_current->image() ) &&
pointer->hotspot() == g_current->hotspot()
)
{
return;
}
g_current = pointer;
changedSignal()();
}
void Pointer::setCurrent( const std::string &name )
{
if( !name.size() )
{
Pointer::setCurrent( (Pointer *)nullptr );
return;
}
const Registry &r = registry();
Registry::const_iterator it = r.find( name );
if( it == r.end() )
{
throw IECore::Exception( boost::str( boost::format( "Pointer \"%s\" does not exist" ) % name ) );
}
setCurrent( it->second );
}
const Pointer *Pointer::getCurrent()
{
return g_current.get();
}
void Pointer::registerPointer( const std::string &name, ConstPointerPtr pointer )
{
registry()[name] = pointer;
}
Pointer::ChangedSignal &Pointer::changedSignal()
{
static ChangedSignal s;
return s;
}
|
#include <data_transfer.h>
DataTransfer::DataTransfer(const String &connection_string): connection_string(connection_string){
interval_counter = 0;
send_data = true;
}
bool DataTransfer::senData(struct sendData *ptr){
bool retValue = false;
if (send_data){
client.begin(wifi_client, this->connection_string);
serialize_doc.clear();
serialize_doc["mac_addr"] = String(ptr->mac_addr);
serialize_doc["temperature"] = ptr->temperature;
serialize_doc["eCO2"] = ptr->eCO2;
serialize_doc["raw_Ethanol"] = ptr->raw_Ethanol;
serialize_doc["raw_H2"] = ptr->raw_H2;
serialize_doc["pressure"] = ptr->pressure;
serialize_doc["humidity"] = ptr->humidity;
serialize_doc["TVOC"] = ptr->TVOC;
String JSONString;
serializeJson(serialize_doc, JSONString);
client.addHeader("Content-Type", "application/json");
unsigned int statusCode = client.POST(JSONString);
if (statusCode == 200){
retValue = true;
}
client.end();
send_data = false;
}
return retValue;
}
void DataTransfer::handle_send_data(void){
if (interval_counter++ >= 60*5){
send_data = true;
interval_counter = 0;
}
}
|
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_Action_tAF41423D285AE0862865348CF6CE51CD085ABBA6();
IL2CPP_EXTERN_C_CONST RuntimeType Action_tAF41423D285AE0862865348CF6CE51CD085ABBA6_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_AndroidJavaRunnable_tFA31E7D68EAAEB756F1B8F2EF8344C24042EDD60();
IL2CPP_EXTERN_C_CONST RuntimeType AndroidJavaRunnable_tFA31E7D68EAAEB756F1B8F2EF8344C24042EDD60_0_0_0;
IL2CPP_EXTERN_C void AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_0_0_0;
IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_0_0_0;
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_0_0_0;
IL2CPP_EXTERN_C void AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_0_0_0;
IL2CPP_EXTERN_C void AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_0_0_0;
IL2CPP_EXTERN_C void Assembly_t_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Assembly_t_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Assembly_t_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Assembly_t_0_0_0;
IL2CPP_EXTERN_C void AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_0_0_0;
IL2CPP_EXTERN_C void AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_0_0_0;
IL2CPP_EXTERN_C void AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_0_0_0;
IL2CPP_EXTERN_C void AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_0_0_0;
IL2CPP_EXTERN_C void AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_0_0_0;
IL2CPP_EXTERN_C void AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_0_0_0;
IL2CPP_EXTERN_C void AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_0_0_0;
IL2CPP_EXTERN_C void AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_0_0_0;
IL2CPP_EXTERN_C void AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_0_0_0;
IL2CPP_EXTERN_C void BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_0_0_0;
IL2CPP_EXTERN_C void CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_0_0_0;
IL2CPP_EXTERN_C void CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_0_0_0;
IL2CPP_EXTERN_C void CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_0_0_0;
IL2CPP_EXTERN_C void CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_0_0_0;
IL2CPP_EXTERN_C void CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_0_0_0;
IL2CPP_EXTERN_C void Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_0_0_0;
IL2CPP_EXTERN_C void Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Collision2D_t95B5FD331CE95276D3658140844190B485D26564_0_0_0;
IL2CPP_EXTERN_C void ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_0_0_0;
IL2CPP_EXTERN_C void ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_0_0_0;
IL2CPP_EXTERN_C void ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_0_0_0;
IL2CPP_EXTERN_C void Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_0_0_0;
IL2CPP_EXTERN_C void ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_0_0_0;
IL2CPP_EXTERN_C void Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_CrossContextDelegate_t12C7A08ED124090185A3E209E6CA9E28148A7682();
IL2CPP_EXTERN_C_CONST RuntimeType CrossContextDelegate_t12C7A08ED124090185A3E209E6CA9E28148A7682_0_0_0;
IL2CPP_EXTERN_C void CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_0_0_0;
IL2CPP_EXTERN_C void CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CultureData_t53CDF1C5F789A28897415891667799420D3C5529_0_0_0;
IL2CPP_EXTERN_C void CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_0_0_0;
IL2CPP_EXTERN_C void CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_0_0_0;
IL2CPP_EXTERN_C void CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_0_0_0;
IL2CPP_EXTERN_C void DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_0_0_0;
IL2CPP_EXTERN_C void DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_0_0_0;
IL2CPP_EXTERN_C void DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_0_0_0;
IL2CPP_EXTERN_C void DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_0_0_0;
IL2CPP_EXTERN_C void Delegate_t_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Delegate_t_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Delegate_t_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Delegate_t_0_0_0;
IL2CPP_EXTERN_C void DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_0_0_0;
IL2CPP_EXTERN_C void DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_0_0_0;
IL2CPP_EXTERN_C void DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_0_0_0;
IL2CPP_EXTERN_C void Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Enum_t23B90B40F60E677A8025267341651C94AE079CDA_0_0_0;
IL2CPP_EXTERN_C void Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_0_0_0;
IL2CPP_EXTERN_C void Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_0_0_0;
IL2CPP_EXTERN_C void Exception_t_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Exception_t_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Exception_t_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Exception_t_0_0_0;
IL2CPP_EXTERN_C void ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_0_0_0;
IL2CPP_EXTERN_C void ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_0_0_0;
IL2CPP_EXTERN_C void FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_0_0_0;
IL2CPP_EXTERN_C void FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_0_0_0;
IL2CPP_EXTERN_C void GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_0_0_0;
IL2CPP_EXTERN_C void GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_0_0_0;
IL2CPP_EXTERN_C void GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_0_0_0;
IL2CPP_EXTERN_C void Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_0_0_0;
IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_0_0_0;
IL2CPP_EXTERN_C void IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_0_0_0;
IL2CPP_EXTERN_C void IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_0_0_0;
IL2CPP_EXTERN_C void IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_0_0_0;
IL2CPP_EXTERN_C void InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_0_0_0;
IL2CPP_EXTERN_C void InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_0_0_0;
IL2CPP_EXTERN_C void InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_0_0_0;
IL2CPP_EXTERN_C void InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_0_0_0;
IL2CPP_EXTERN_C void IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_0_0_0;
IL2CPP_EXTERN_C void IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_0_0_0;
IL2CPP_EXTERN_C void InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_0_0_0;
IL2CPP_EXTERN_C void InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_0_0_0;
IL2CPP_EXTERN_C void Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_0_0_0;
IL2CPP_EXTERN_C void LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_0_0_0;
IL2CPP_EXTERN_C void LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_0_0_0;
IL2CPP_EXTERN_C void LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_0_0_0;
IL2CPP_EXTERN_C void LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_0_0_0;
IL2CPP_EXTERN_C void MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_0_0_0;
IL2CPP_EXTERN_C void MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_0_0_0;
IL2CPP_EXTERN_C void MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_0_0_0;
IL2CPP_EXTERN_C void Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_0_0_0;
IL2CPP_EXTERN_C void MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_0_0_0;
IL2CPP_EXTERN_C void MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_0_0_0;
IL2CPP_EXTERN_C void MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_0_0_0;
IL2CPP_EXTERN_C void MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_0_0_0;
IL2CPP_EXTERN_C void MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_0_0_0;
IL2CPP_EXTERN_C void MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_0_0_0;
IL2CPP_EXTERN_C void MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_0_0_0;
IL2CPP_EXTERN_C void MulticastDelegate_t_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void MulticastDelegate_t_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void MulticastDelegate_t_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType MulticastDelegate_t_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_NativeUpdateCallback_t617743B3361FE4B086E28DDB8EDB4A7AC2490FC6();
IL2CPP_EXTERN_C_CONST RuntimeType NativeUpdateCallback_t617743B3361FE4B086E28DDB8EDB4A7AC2490FC6_0_0_0;
IL2CPP_EXTERN_C void Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_0_0_0;
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_0_0_0;
IL2CPP_EXTERN_C void ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_0_0_0;
IL2CPP_EXTERN_C void ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_0_0_0;
IL2CPP_EXTERN_C void ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_0_0_0;
IL2CPP_EXTERN_C void PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_0_0_0;
IL2CPP_EXTERN_C void PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_0_0_0;
IL2CPP_EXTERN_C void PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_0_0_0;
IL2CPP_EXTERN_C void PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_0_0_0;
IL2CPP_EXTERN_C void PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_0_0_0;
IL2CPP_EXTERN_C void PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_0_0_0;
IL2CPP_EXTERN_C void RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_0_0_0;
IL2CPP_EXTERN_C void RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_0_0_0;
IL2CPP_EXTERN_C void RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_0_0_0;
IL2CPP_EXTERN_C void RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_0_0_0;
IL2CPP_EXTERN_C void RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_0_0_0;
IL2CPP_EXTERN_C void RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_0_0_0;
IL2CPP_EXTERN_C void ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_0_0_0;
IL2CPP_EXTERN_C void ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_0_0_0;
IL2CPP_EXTERN_C void SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_0_0_0;
IL2CPP_EXTERN_C void ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_0_0_0;
IL2CPP_EXTERN_C void SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_0_0_0;
IL2CPP_EXTERN_C void SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_SerializationEventHandler_t3033BE1E86AE40A7533AD615FF9122FC8ED0B7C1();
IL2CPP_EXTERN_C_CONST RuntimeType SerializationEventHandler_t3033BE1E86AE40A7533AD615FF9122FC8ED0B7C1_0_0_0;
IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_0_0_0;
IL2CPP_EXTERN_C void SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_0_0_0;
IL2CPP_EXTERN_C void SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_0_0_0;
IL2CPP_EXTERN_C void SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_0_0_0;
IL2CPP_EXTERN_C void SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_0_0_0;
IL2CPP_EXTERN_C void SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_0_0_0;
IL2CPP_EXTERN_C void StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_0_0_0;
IL2CPP_EXTERN_C void StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_0_0_0;
IL2CPP_EXTERN_C void TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_0_0_0;
IL2CPP_EXTERN_C void TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_0_0_0;
IL2CPP_EXTERN_C void TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_ThreadStart_tA13019555BA3CB2B0128F0880760196BF790E687();
IL2CPP_EXTERN_C_CONST RuntimeType ThreadStart_tA13019555BA3CB2B0128F0880760196BF790E687_0_0_0;
IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_0_0_0;
IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_0_0_0;
IL2CPP_EXTERN_C void TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_0_0_0;
IL2CPP_EXTERN_C void TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_0_0_0;
IL2CPP_EXTERN_C void UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099();
IL2CPP_EXTERN_C_CONST RuntimeType UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099_0_0_0;
IL2CPP_EXTERN_C void VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_0_0_0;
IL2CPP_EXTERN_C void VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_0_0_0;
IL2CPP_EXTERN_C void VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_0_0_0;
IL2CPP_EXTERN_C void VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_0_0_0;
IL2CPP_EXTERN_C void ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_0_0_0;
IL2CPP_EXTERN_C void VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_0_0_0;
IL2CPP_EXTERN_C void WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_0_0_0;
IL2CPP_EXTERN_C void WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WindowActivated_t1467F1E2E584D7D8C71AC3E24E8AA39AC7B445BF();
IL2CPP_EXTERN_C_CONST RuntimeType WindowActivated_t1467F1E2E584D7D8C71AC3E24E8AA39AC7B445BF_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WindowSizeChanged_t06E270A73B037C3980FF00B56D20FD49CC201D65();
IL2CPP_EXTERN_C_CONST RuntimeType WindowSizeChanged_t06E270A73B037C3980FF00B56D20FD49CC201D65_0_0_0;
IL2CPP_EXTERN_C void YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_0_0_0;
IL2CPP_EXTERN_C void __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType __DTString_t594255B76730E715A2A5655F8238B0029484B27A_0_0_0;
IL2CPP_EXTERN_C void jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_IdentityTokenChanged_t306C7E37727221C44C9D5843455B1FD7286C38B1();
IL2CPP_EXTERN_C_CONST RuntimeType IdentityTokenChanged_t306C7E37727221C44C9D5843455B1FD7286C38B1_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_SessionStateChanged_tB042EAE0E6718825B246F7744C738DC80E529ACF();
IL2CPP_EXTERN_C_CONST RuntimeType SessionStateChanged_tB042EAE0E6718825B246F7744C738DC80E529ACF_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C();
IL2CPP_EXTERN_C_CONST RuntimeType OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_LogCallback_t8C3C9B1E0F185E2A25D09DE10DD8414898698BBD();
IL2CPP_EXTERN_C_CONST RuntimeType LogCallback_t8C3C9B1E0F185E2A25D09DE10DD8414898698BBD_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_LowMemoryCallback_tF94AC614EDACA9AD4CEA3DE77FF8EFF5DA1E5240();
IL2CPP_EXTERN_C_CONST RuntimeType LowMemoryCallback_tF94AC614EDACA9AD4CEA3DE77FF8EFF5DA1E5240_0_0_0;
IL2CPP_EXTERN_C void SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_0_0_0;
IL2CPP_EXTERN_C void SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B();
IL2CPP_EXTERN_C_CONST RuntimeType PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C();
IL2CPP_EXTERN_C_CONST RuntimeType PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_AudioConfigurationChangeHandler_t1A997C51DF7B553A94DAD358F8D968308994774A();
IL2CPP_EXTERN_C_CONST RuntimeType AudioConfigurationChangeHandler_t1A997C51DF7B553A94DAD358F8D968308994774A_0_0_0;
IL2CPP_EXTERN_C void OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_0_0_0;
IL2CPP_EXTERN_C void RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WillRenderCanvases_t459621B4F3FA2571DE0ED6B4DEF0752F2E9EE958();
IL2CPP_EXTERN_C_CONST RuntimeType WillRenderCanvases_t459621B4F3FA2571DE0ED6B4DEF0752F2E9EE958_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_InternalCancelHandler_t7F0E9BBFE542C3B0E62620118961AC10E0DFB000();
IL2CPP_EXTERN_C_CONST RuntimeType InternalCancelHandler_t7F0E9BBFE542C3B0E62620118961AC10E0DFB000_0_0_0;
IL2CPP_EXTERN_C void ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_StateChanged_tAE96F0A8860BFCD704179F6C1F376A6FAE3E25E0();
IL2CPP_EXTERN_C_CONST RuntimeType StateChanged_tAE96F0A8860BFCD704179F6C1F376A6FAE3E25E0_0_0_0;
IL2CPP_EXTERN_C void Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_0_0_0;
IL2CPP_EXTERN_C void Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Resources_tA64317917B3D01310E84588407113D059D802DEB_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_DictationCompletedDelegate_tE6D2D2F684A5A59434BE8AF87FCDC43BD191F3DC();
IL2CPP_EXTERN_C_CONST RuntimeType DictationCompletedDelegate_tE6D2D2F684A5A59434BE8AF87FCDC43BD191F3DC_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_DictationErrorHandler_t0DEE0680E9AD9FFB1CEFC4DD62C0651AC21A2489();
IL2CPP_EXTERN_C_CONST RuntimeType DictationErrorHandler_t0DEE0680E9AD9FFB1CEFC4DD62C0651AC21A2489_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_DictationHypothesisDelegate_tB114A80C520E9A7AEBCC6FB097CD282D887C5EB4();
IL2CPP_EXTERN_C_CONST RuntimeType DictationHypothesisDelegate_tB114A80C520E9A7AEBCC6FB097CD282D887C5EB4_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_DictationResultDelegate_t88BDCB6357C9490F858C89A42042833C6D61866D();
IL2CPP_EXTERN_C_CONST RuntimeType DictationResultDelegate_t88BDCB6357C9490F858C89A42042833C6D61866D_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_DisplaysUpdatedDelegate_tC6A6AD44FAD98C9E28479FFF4BD3D9932458A6A1();
IL2CPP_EXTERN_C_CONST RuntimeType DisplaysUpdatedDelegate_tC6A6AD44FAD98C9E28479FFF4BD3D9932458A6A1_0_0_0;
IL2CPP_EXTERN_C void EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_0_0_0;
IL2CPP_EXTERN_C void EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_0_0_0;
IL2CPP_EXTERN_C void Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_0_0_0;
IL2CPP_EXTERN_C void Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_ReadDelegate_tB245FDB608C11A53AC71F333C1A6BE3D7CDB21BB();
IL2CPP_EXTERN_C_CONST RuntimeType ReadDelegate_tB245FDB608C11A53AC71F333C1A6BE3D7CDB21BB_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WriteDelegate_tF68E6D874C089E69933FA2B9A0C1C6639929C4F6();
IL2CPP_EXTERN_C_CONST RuntimeType WriteDelegate_tF68E6D874C089E69933FA2B9A0C1C6639929C4F6_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_FontTextureRebuildCallback_tBF11A511EBD8D237A1C5885D460B42A45DDBB2DB();
IL2CPP_EXTERN_C_CONST RuntimeType FontTextureRebuildCallback_tBF11A511EBD8D237A1C5885D460B42A45DDBB2DB_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WindowFunction_tFA5DBAB811627D7B0946C4AAD398D4CC154C174D();
IL2CPP_EXTERN_C_CONST RuntimeType WindowFunction_tFA5DBAB811627D7B0946C4AAD398D4CC154C174D_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_SkinChangedDelegate_t8BECC691E2A259B07F4A51D8F1A639B83F055E1E();
IL2CPP_EXTERN_C_CONST RuntimeType SkinChangedDelegate_t8BECC691E2A259B07F4A51D8F1A639B83F055E1E_0_0_0;
IL2CPP_EXTERN_C void GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_0_0_0;
IL2CPP_EXTERN_C void bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnValidateInput_t721D2C2A7710D113E4909B36D9893CC6B1C69B9F();
IL2CPP_EXTERN_C_CONST RuntimeType OnValidateInput_t721D2C2A7710D113E4909B36D9893CC6B1C69B9F_0_0_0;
IL2CPP_EXTERN_C void Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnNavMeshPreUpdate_t5E34F761F39A1F6B898F0E729B36C0782B92D572();
IL2CPP_EXTERN_C_CONST RuntimeType OnNavMeshPreUpdate_t5E34F761F39A1F6B898F0E729B36C0782B92D572_0_0_0;
IL2CPP_EXTERN_C void NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_InvocationEntryDelegate_t751DEAE9B64F61CCD4029B67E7916F00C823E61A();
IL2CPP_EXTERN_C_CONST RuntimeType InvocationEntryDelegate_t751DEAE9B64F61CCD4029B67E7916F00C823E61A_0_0_0;
IL2CPP_EXTERN_C void FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_0_0_0;
IL2CPP_EXTERN_C void EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnCaptureResourceCreatedCallback_t4975687A3DBE3DF603E72841D83C2BE2346B54DD();
IL2CPP_EXTERN_C_CONST RuntimeType OnCaptureResourceCreatedCallback_t4975687A3DBE3DF603E72841D83C2BE2346B54DD_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnCapturedToDiskCallback_t3B89E8D38F2086237DA0EC9615D2678B14ED4F85();
IL2CPP_EXTERN_C_CONST RuntimeType OnCapturedToDiskCallback_t3B89E8D38F2086237DA0EC9615D2678B14ED4F85_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnPhotoModeStartedCallback_t21FCF86FB7933100968EE01A7B4BFB751F53EF92();
IL2CPP_EXTERN_C_CONST RuntimeType OnPhotoModeStartedCallback_t21FCF86FB7933100968EE01A7B4BFB751F53EF92_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnPhotoModeStoppedCallback_tF6A2F039E1A8DB64BD4CF25675BED44F74E5B1F6();
IL2CPP_EXTERN_C_CONST RuntimeType OnPhotoModeStoppedCallback_tF6A2F039E1A8DB64BD4CF25675BED44F74E5B1F6_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_ErrorDelegate_t4E0F6E50E9C786DB72C82D69540E01FB9EFD3D9C();
IL2CPP_EXTERN_C_CONST RuntimeType ErrorDelegate_t4E0F6E50E9C786DB72C82D69540E01FB9EFD3D9C_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_StatusDelegate_tD751E0623EDFECE1A8492E9DB58E762EFC0D2528();
IL2CPP_EXTERN_C_CONST RuntimeType StatusDelegate_tD751E0623EDFECE1A8492E9DB58E762EFC0D2528_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_CreateOutputMethod_t7A129D00E8823B50AEDD0C9B082C9CB3DF863876();
IL2CPP_EXTERN_C_CONST RuntimeType CreateOutputMethod_t7A129D00E8823B50AEDD0C9B082C9CB3DF863876_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_UpdateFunction_tEDC2A88F61F179480CAA9443E6ADDA3F126B8AEA();
IL2CPP_EXTERN_C_CONST RuntimeType UpdateFunction_tEDC2A88F61F179480CAA9443E6ADDA3F126B8AEA_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_GetRayIntersectionAllCallback_t9D6C059892DE030746D2873EB8871415BAC79311();
IL2CPP_EXTERN_C_CONST RuntimeType GetRayIntersectionAllCallback_t9D6C059892DE030746D2873EB8871415BAC79311_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_GetRayIntersectionAllNonAllocCallback_t6DAE64211C37E996B257BF2C54707DAD3474D69C();
IL2CPP_EXTERN_C_CONST RuntimeType GetRayIntersectionAllNonAllocCallback_t6DAE64211C37E996B257BF2C54707DAD3474D69C_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_GetRaycastNonAllocCallback_tA4A6A2336A9B9FEE31F8F5344576B3BB0A7B3F34();
IL2CPP_EXTERN_C_CONST RuntimeType GetRaycastNonAllocCallback_tA4A6A2336A9B9FEE31F8F5344576B3BB0A7B3F34_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_Raycast2DCallback_t125C1CA6D0148380915E597AC8ADBB93EFB0EE29();
IL2CPP_EXTERN_C_CONST RuntimeType Raycast2DCallback_t125C1CA6D0148380915E597AC8ADBB93EFB0EE29_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_Raycast3DCallback_t27A8B301052E9C6A4A7D38F95293CA129C39373F();
IL2CPP_EXTERN_C_CONST RuntimeType Raycast3DCallback_t27A8B301052E9C6A4A7D38F95293CA129C39373F_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_RaycastAllCallback_t48E12CFDCFDEA0CD7D83F9DDE1E341DBCC855005();
IL2CPP_EXTERN_C_CONST RuntimeType RaycastAllCallback_t48E12CFDCFDEA0CD7D83F9DDE1E341DBCC855005_0_0_0;
IL2CPP_EXTERN_C void LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_UpdatedEventHandler_tB65DDD5524F88B07DDF23FD1607DF1887404EC55();
IL2CPP_EXTERN_C_CONST RuntimeType UpdatedEventHandler_tB65DDD5524F88B07DDF23FD1607DF1887404EC55_0_0_0;
IL2CPP_EXTERN_C void HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_0_0_0;
IL2CPP_EXTERN_C void Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType Escape_t0479DB63473055AD46754E698B2114579D5D944E_0_0_0;
IL2CPP_EXTERN_C void FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_0_0_0;
IL2CPP_EXTERN_C void DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_0_0_0;
IL2CPP_EXTERN_C void TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_0_0_0;
IL2CPP_EXTERN_C void TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_0_0_0;
IL2CPP_EXTERN_C void WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_0_0_0;
IL2CPP_EXTERN_C void UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_0_0_0;
IL2CPP_EXTERN_C void VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnStartedRecordingVideoCallback_tF42862BD94B6DEE3AFBAEC068CB93D2B35E366A9();
IL2CPP_EXTERN_C_CONST RuntimeType OnStartedRecordingVideoCallback_tF42862BD94B6DEE3AFBAEC068CB93D2B35E366A9_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnStoppedRecordingVideoCallback_t2D7EC27C8904AE0EE068D13F918E42EECF965DD6();
IL2CPP_EXTERN_C_CONST RuntimeType OnStoppedRecordingVideoCallback_t2D7EC27C8904AE0EE068D13F918E42EECF965DD6_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnVideoCaptureResourceCreatedCallback_t3699FD2DE7FEF286A229B548E358133211BBA956();
IL2CPP_EXTERN_C_CONST RuntimeType OnVideoCaptureResourceCreatedCallback_t3699FD2DE7FEF286A229B548E358133211BBA956_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnVideoModeStartedCallback_t201EBB65059DA254ED2A4B24D365C4F6EAE9DF75();
IL2CPP_EXTERN_C_CONST RuntimeType OnVideoModeStartedCallback_t201EBB65059DA254ED2A4B24D365C4F6EAE9DF75_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_OnVideoModeStoppedCallback_tA0921FEE66B3EDE3E01E8D6526CF5203ED3C273C();
IL2CPP_EXTERN_C_CONST RuntimeType OnVideoModeStoppedCallback_tA0921FEE66B3EDE3E01E8D6526CF5203ED3C273C_0_0_0;
IL2CPP_EXTERN_C void XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_0_0_0;
IL2CPP_EXTERN_C void XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke(void* managedStructure, void* marshaledStructure);
IL2CPP_EXTERN_C void XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke_back(void* marshaledStructure, void* managedStructure);
IL2CPP_EXTERN_C void XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke_cleanup(void* marshaledStructure);
IL2CPP_EXTERN_C_CONST RuntimeType XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_WindowsCancelHandler_tFD0F0B721F93ACA04D9CD9340DA39075A8FF2ACF();
IL2CPP_EXTERN_C_CONST RuntimeType WindowsCancelHandler_tFD0F0B721F93ACA04D9CD9340DA39075A8FF2ACF_0_0_0;
IL2CPP_EXTERN_C void DelegatePInvokeWrapper_EtwEnableCallback_t0A092DCCAA1CF6D740310D3C16BCFEB2667D26FA();
IL2CPP_EXTERN_C_CONST RuntimeType EtwEnableCallback_t0A092DCCAA1CF6D740310D3C16BCFEB2667D26FA_0_0_0;
IL2CPP_EXTERN_C Il2CppInteropData g_Il2CppInteropData[];
Il2CppInteropData g_Il2CppInteropData[218] =
{
{ DelegatePInvokeWrapper_Action_tAF41423D285AE0862865348CF6CE51CD085ABBA6, NULL, NULL, NULL, NULL, NULL, &Action_tAF41423D285AE0862865348CF6CE51CD085ABBA6_0_0_0 } /* System.Action */,
{ DelegatePInvokeWrapper_AndroidJavaRunnable_tFA31E7D68EAAEB756F1B8F2EF8344C24042EDD60, NULL, NULL, NULL, NULL, NULL, &AndroidJavaRunnable_tFA31E7D68EAAEB756F1B8F2EF8344C24042EDD60_0_0_0 } /* UnityEngine.AndroidJavaRunnable */,
{ NULL, AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke, AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke_back, AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_marshal_pinvoke_cleanup, NULL, NULL, &AnimationCurve_t2D452A14820CEDB83BFF2C911682A4E59001AD03_0_0_0 } /* UnityEngine.AnimationCurve */,
{ NULL, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_back, AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_marshal_pinvoke_cleanup, NULL, NULL, &AnimationEvent_tC15CA47BE450896AF876FFA75D7A8E22C2D286AF_0_0_0 } /* UnityEngine.AnimationEvent */,
{ NULL, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_back, AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_marshal_pinvoke_cleanup, NULL, NULL, &AnimatorTransitionInfo_t7D0BAD3D274C055F1FC7ACE0F3A195CA3C9026A0_0_0_0 } /* UnityEngine.AnimatorTransitionInfo */,
{ NULL, AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke, AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke_back, AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_marshal_pinvoke_cleanup, NULL, NULL, &AppDomain_tBEB6322D51DCB12C09A56A49886C2D09BA1C1A8A_0_0_0 } /* System.AppDomain */,
{ NULL, AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke, AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke_back, AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_marshal_pinvoke_cleanup, NULL, NULL, &AppDomainSetup_tF2C6AD0D3A09543EAC7388BD3F6500E8527F63A8_0_0_0 } /* System.AppDomainSetup */,
{ NULL, Assembly_t_marshal_pinvoke, Assembly_t_marshal_pinvoke_back, Assembly_t_marshal_pinvoke_cleanup, NULL, NULL, &Assembly_t_0_0_0 } /* System.Reflection.Assembly */,
{ NULL, AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke, AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke_back, AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_marshal_pinvoke_cleanup, NULL, NULL, &AssemblyName_t066E458E26373ECD644F79643E9D4483212C9824_0_0_0 } /* System.Reflection.AssemblyName */,
{ NULL, AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke, AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke_back, AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_marshal_pinvoke_cleanup, NULL, NULL, &AssetBundleCreateRequest_t6AB0C8676D1DAA5F624663445F46FAB7D63EAA3A_0_0_0 } /* UnityEngine.AssetBundleCreateRequest */,
{ NULL, AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke, AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke_back, AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_marshal_pinvoke_cleanup, NULL, NULL, &AssetBundleRecompressOperation_t960AA4671D6EB0A10A041FA29B8C2A7D70C07D31_0_0_0 } /* UnityEngine.AssetBundleRecompressOperation */,
{ NULL, AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke, AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke_back, AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_marshal_pinvoke_cleanup, NULL, NULL, &AssetBundleRequest_tBCF59D1FD408125E4C2C937EC23AB0ABB7E4051A_0_0_0 } /* UnityEngine.AssetBundleRequest */,
{ NULL, AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke, AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke_back, AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_marshal_pinvoke_cleanup, NULL, NULL, &AsyncMethodBuilderCore_t2C85055E04767C52B9F66144476FCBF500DBFA34_0_0_0 } /* System.Runtime.CompilerServices.AsyncMethodBuilderCore */,
{ NULL, AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke, AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke_back, AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_marshal_pinvoke_cleanup, NULL, NULL, &AsyncOperation_tB6913CEC83169F22E96067CE8C7117A221E51A86_0_0_0 } /* UnityEngine.AsyncOperation */,
{ NULL, AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke, AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke_back, AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_marshal_pinvoke_cleanup, NULL, NULL, &AsyncReadManagerMetricsFilters_t8C1F78DA967FD9457A11E672AB0FF865D6BD3787_0_0_0 } /* Unity.IO.LowLevel.Unsafe.AsyncReadManagerMetricsFilters */,
{ NULL, AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke, AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke_back, AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_marshal_pinvoke_cleanup, NULL, NULL, &AsyncReadManagerRequestMetric_t3F1145613E99A2410D1AFBCE8BEFF59D07FE26E0_0_0_0 } /* Unity.IO.LowLevel.Unsafe.AsyncReadManagerRequestMetric */,
{ NULL, AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke, AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke_back, AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_marshal_pinvoke_cleanup, NULL, NULL, &AsyncResult_t7AD876FCD0341D8317ADB430701F4E391E6BB75B_0_0_0 } /* System.Runtime.Remoting.Messaging.AsyncResult */,
{ NULL, BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke, BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke_back, BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_marshal_pinvoke_cleanup, NULL, NULL, &BatchRendererGroup_t68C1EAC6F7158DC1C02C16D4E343397D5EC4574A_0_0_0 } /* UnityEngine.Rendering.BatchRendererGroup */,
{ NULL, CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke, CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke_back, CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_marshal_pinvoke_cleanup, NULL, NULL, &CalendarData_t76EF6EAAED8C2BC4089643722CE589E213F7B4A4_0_0_0 } /* System.Globalization.CalendarData */,
{ NULL, CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke, CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke_back, CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_marshal_pinvoke_cleanup, NULL, NULL, &CancellationCallbackCoreWorkArguments_t9ECCD883EF9DF3283696D1CE1F7A81C0F075923E_0_0_0 } /* System.Threading.CancellationCallbackCoreWorkArguments */,
{ NULL, CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke, CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke_back, CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_marshal_pinvoke_cleanup, NULL, NULL, &CancellationToken_tC9D68381C9164A4BA10397257E87ADC832AF5FFD_0_0_0 } /* System.Threading.CancellationToken */,
{ NULL, CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke, CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke_back, CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_marshal_pinvoke_cleanup, NULL, NULL, &CancellationTokenRegistration_t407059AA0E00ABE74F43C533E7D035C4BA451F6A_0_0_0 } /* System.Threading.CancellationTokenRegistration */,
{ NULL, CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke, CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke_back, CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_marshal_pinvoke_cleanup, NULL, NULL, &CertificateHandler_tDA66C86D1302CE4266DBB078361F7A363C7B005E_0_0_0 } /* UnityEngine.Networking.CertificateHandler */,
{ NULL, Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke, Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke_back, Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_marshal_pinvoke_cleanup, NULL, NULL, &Collision_tDC11F9B3834FD25DEB8C7DD1C51B635D240BBBF0_0_0_0 } /* UnityEngine.Collision */,
{ NULL, Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke, Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke_back, Collision2D_t95B5FD331CE95276D3658140844190B485D26564_marshal_pinvoke_cleanup, NULL, NULL, &Collision2D_t95B5FD331CE95276D3658140844190B485D26564_0_0_0 } /* UnityEngine.Collision2D */,
{ NULL, ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke, ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke_back, ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_marshal_pinvoke_cleanup, NULL, NULL, &ColorTween_tB608DC1CF7A7F226B0D4DD8B269798F27CECE339_0_0_0 } /* UnityEngine.UI.CoroutineTween.ColorTween */,
{ NULL, ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke, ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke_back, ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_marshal_pinvoke_cleanup, NULL, NULL, &ConsoleKeyInfo_tDA8AC07839288484FCB167A81B4FBA92ECCEAF88_0_0_0 } /* System.ConsoleKeyInfo */,
{ NULL, ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke, ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke_back, ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_marshal_pinvoke_cleanup, NULL, NULL, &ContactFilter2D_t82BBB159A7E392A24921803A0E79669F4E34DFCB_0_0_0 } /* UnityEngine.ContactFilter2D */,
{ NULL, Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke, Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke_back, Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_marshal_pinvoke_cleanup, NULL, NULL, &Context_t8A5B564FD0F970E10A97ACB8A7579FFF3EE4C678_0_0_0 } /* System.Runtime.Remoting.Contexts.Context */,
{ NULL, ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke, ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke_back, ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_marshal_pinvoke_cleanup, NULL, NULL, &ControllerColliderHit_t483E787AA2D92263EC1F899BCF1FFC3F2B96D550_0_0_0 } /* UnityEngine.ControllerColliderHit */,
{ NULL, Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke, Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke_back, Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_marshal_pinvoke_cleanup, NULL, NULL, &Coroutine_t899D5232EF542CB8BA70AF9ECEECA494FAA9CCB7_0_0_0 } /* UnityEngine.Coroutine */,
{ DelegatePInvokeWrapper_CrossContextDelegate_t12C7A08ED124090185A3E209E6CA9E28148A7682, NULL, NULL, NULL, NULL, NULL, &CrossContextDelegate_t12C7A08ED124090185A3E209E6CA9E28148A7682_0_0_0 } /* System.Runtime.Remoting.Contexts.CrossContextDelegate */,
{ NULL, CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke, CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke_back, CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_marshal_pinvoke_cleanup, NULL, NULL, &CullingGroup_t63379D76B9825516F762DDEDD594814B981DB307_0_0_0 } /* UnityEngine.CullingGroup */,
{ NULL, CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke, CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke_back, CultureData_t53CDF1C5F789A28897415891667799420D3C5529_marshal_pinvoke_cleanup, NULL, NULL, &CultureData_t53CDF1C5F789A28897415891667799420D3C5529_0_0_0 } /* System.Globalization.CultureData */,
{ NULL, CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke, CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke_back, CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_marshal_pinvoke_cleanup, NULL, NULL, &CultureInfo_t1B787142231DB79ABDCE0659823F908A040E9A98_0_0_0 } /* System.Globalization.CultureInfo */,
{ NULL, CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke, CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke_back, CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_marshal_pinvoke_cleanup, NULL, NULL, &CustomAttributeNamedArgument_t618778691CF7F5B44F7177210A817A29D3DAEDDA_0_0_0 } /* System.Reflection.CustomAttributeNamedArgument */,
{ NULL, CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke, CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke_back, CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_marshal_pinvoke_cleanup, NULL, NULL, &CustomAttributeTypedArgument_tE7152E8FACDD29A8E0040E151C86F436FA8E6910_0_0_0 } /* System.Reflection.CustomAttributeTypedArgument */,
{ NULL, DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke, DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke_back, DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_marshal_pinvoke_cleanup, NULL, NULL, &DTSubString_t17C1E5092BC79CB2A5DA8B2B4AB2047B2BE51F74_0_0_0 } /* System.DTSubString */,
{ NULL, DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke, DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke_back, DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_marshal_pinvoke_cleanup, NULL, NULL, &DataCollector_tD68BA1A069862A9021E9B77A3E8DFF466A351777_0_0_0 } /* System.Diagnostics.Tracing.DataCollector */,
{ NULL, DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke, DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke_back, DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_marshal_pinvoke_cleanup, NULL, NULL, &DateTimeRawInfo_t0054428F65AC1EA6EADE6C93D4075B3D96A47ECE_0_0_0 } /* System.DateTimeRawInfo */,
{ NULL, DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke, DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke_back, DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_marshal_pinvoke_cleanup, NULL, NULL, &DateTimeResult_t44941ADE58F716AB71DABBFE9BE490F0331F3EF0_0_0_0 } /* System.DateTimeResult */,
{ NULL, Delegate_t_marshal_pinvoke, Delegate_t_marshal_pinvoke_back, Delegate_t_marshal_pinvoke_cleanup, NULL, NULL, &Delegate_t_0_0_0 } /* System.Delegate */,
{ NULL, DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke, DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke_back, DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_marshal_pinvoke_cleanup, NULL, NULL, &DictionaryEntry_tF60471FAB430320A9C7D4382BF966EAAC06D7A90_0_0_0 } /* System.Collections.DictionaryEntry */,
{ NULL, DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke, DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke_back, DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_marshal_pinvoke_cleanup, NULL, NULL, &DirectionalLight_t64077C15074628F61CE703ED3A168AA8AB7F0AB7_0_0_0 } /* UnityEngine.Experimental.GlobalIllumination.DirectionalLight */,
{ NULL, DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke, DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke_back, DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_marshal_pinvoke_cleanup, NULL, NULL, &DiscLight_t2F3E542C8536D7FE93D943F5336DCCE844D6CB8D_0_0_0 } /* UnityEngine.Experimental.GlobalIllumination.DiscLight */,
{ NULL, Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke, Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke_back, Enum_t23B90B40F60E677A8025267341651C94AE079CDA_marshal_pinvoke_cleanup, NULL, NULL, &Enum_t23B90B40F60E677A8025267341651C94AE079CDA_0_0_0 } /* System.Enum */,
{ NULL, Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke, Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke_back, Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_marshal_pinvoke_cleanup, NULL, NULL, &Ephemeron_t76EEAA1BDD5BE64FEAF9E3CD185451837EAA6208_0_0_0 } /* System.Runtime.CompilerServices.Ephemeron */,
{ NULL, Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke, Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke_back, Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_marshal_pinvoke_cleanup, NULL, NULL, &Event_tED49F8EC5A2514F6E877E301B1AB7ABE4647253E_0_0_0 } /* UnityEngine.Event */,
{ NULL, Exception_t_marshal_pinvoke, Exception_t_marshal_pinvoke_back, Exception_t_marshal_pinvoke_cleanup, NULL, NULL, &Exception_t_0_0_0 } /* System.Exception */,
{ NULL, ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke, ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke_back, ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_marshal_pinvoke_cleanup, NULL, NULL, &ExceptionHandlingClause_t5ECB535787E9B1D0DF95061E051CAEDDBB363104_0_0_0 } /* System.Reflection.ExceptionHandlingClause */,
{ NULL, ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke, ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke_back, ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_marshal_pinvoke_cleanup, NULL, NULL, &ExecutionContextSwitcher_t11B7DEE83408478EE3D5E29C988E5385AA9D7277_0_0_0 } /* System.Threading.ExecutionContextSwitcher */,
{ NULL, FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke, FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke_back, FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_marshal_pinvoke_cleanup, NULL, NULL, &FailedToLoadScriptObject_tDD47793ADC980A7A6E4369C9E9381609453869B4_0_0_0 } /* UnityEngine.FailedToLoadScriptObject */,
{ NULL, FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke, FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke_back, FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_marshal_pinvoke_cleanup, NULL, NULL, &FloatTween_tFC6A79CB4DD9D51D99523093925F926E12D2F228_0_0_0 } /* UnityEngine.UI.CoroutineTween.FloatTween */,
{ NULL, GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke, GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke_back, GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_marshal_pinvoke_cleanup, NULL, NULL, &GUIContent_t39256993BF4A33F76E073488D6A2F13D678DF60E_0_0_0 } /* UnityEngine.GUIContent */,
{ NULL, GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke, GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke_back, GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_marshal_pinvoke_cleanup, NULL, NULL, &GUIStyle_t29C59470ACD0A35C81EB0615653FD38C455A4726_0_0_0 } /* UnityEngine.GUIStyle */,
{ NULL, GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke, GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke_back, GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_marshal_pinvoke_cleanup, NULL, NULL, &GUIStyleState_tC89202668617B1D7884980314F293AD382B9AAD9_0_0_0 } /* UnityEngine.GUIStyleState */,
{ NULL, Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke, Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke_back, Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_marshal_pinvoke_cleanup, NULL, NULL, &Gradient_t297BAC6722F67728862AE2FBE760A400DA8902F2_0_0_0 } /* UnityEngine.Gradient */,
{ NULL, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_back, HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_marshal_pinvoke_cleanup, NULL, NULL, &HumanBone_tFEE7CD9B6E62BBB95CC4A6F1AA7FC7A26541D62D_0_0_0 } /* UnityEngine.HumanBone */,
{ NULL, IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke, IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke_back, IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_marshal_pinvoke_cleanup, NULL, NULL, &IOAsyncResult_t099E328DEE4054063493B8A96C1FE9AFB0EDAAF9_0_0_0 } /* System.IOAsyncResult */,
{ NULL, IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke, IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke_back, IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_marshal_pinvoke_cleanup, NULL, NULL, &IOSelectorJob_t684DF541EAF1AB720C017E9DE172EA8168FDBDA9_0_0_0 } /* System.IOSelectorJob */,
{ NULL, IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke, IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke_back, IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_marshal_pinvoke_cleanup, NULL, NULL, &IPv6AddressFormatter_tB4B75557A1014D1E6E250A35E5F94411EF2979BA_0_0_0 } /* System.Net.IPv6AddressFormatter */,
{ NULL, InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke, InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke_back, InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_marshal_pinvoke_cleanup, NULL, NULL, &InputDevice_t69B790C68145C769BA3819DE33AA94155C77207E_0_0_0 } /* UnityEngine.XR.InputDevice */,
{ NULL, InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke, InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke_back, InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_marshal_pinvoke_cleanup, NULL, NULL, &InputDevices_t50F530D78AE16C2F160416FBAE9BC04024C448CC_0_0_0 } /* UnityEngine.XR.InputDevices */,
{ NULL, InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke, InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke_back, InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_marshal_pinvoke_cleanup, NULL, NULL, &InputFeatureUsage_tB971D811B38B1DA549F529BB15E60672940FB0EE_0_0_0 } /* UnityEngine.XR.InputFeatureUsage */,
{ NULL, InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke, InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke_back, InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_marshal_pinvoke_cleanup, NULL, NULL, &InputRecord_t041607D11686DA35B10AE9E9F71E2448ACDCB1A8_0_0_0 } /* System.InputRecord */,
{ NULL, IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke, IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke_back, IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_marshal_pinvoke_cleanup, NULL, NULL, &IntegratedSubsystem_t8FB3A371F812CF9521903AC016C64E95C7412002_0_0_0 } /* UnityEngine.IntegratedSubsystem */,
{ NULL, IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke, IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke_back, IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_marshal_pinvoke_cleanup, NULL, NULL, &IntegratedSubsystemDescriptor_tDC8AF8E5B67B983E4492D784A419F01693926D7A_0_0_0 } /* UnityEngine.IntegratedSubsystemDescriptor */,
{ NULL, InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke, InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke_back, InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_marshal_pinvoke_cleanup, NULL, NULL, &InternalCodePageDataItem_t885932F372A8EEC39396B0D57CC93AC72E2A3DA7_0_0_0 } /* System.Globalization.InternalCodePageDataItem */,
{ NULL, InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke, InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke_back, InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_marshal_pinvoke_cleanup, NULL, NULL, &InternalEncodingDataItem_t2854F84125B1F420ABB3AA251C75E288EC87568C_0_0_0 } /* System.Globalization.InternalEncodingDataItem */,
{ NULL, Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke, Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke_back, Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_marshal_pinvoke_cleanup, NULL, NULL, &Internal_DrawTextureArguments_tEC89385CEA5FBDBE4EB8FA253CA94370AE533E90_0_0_0 } /* UnityEngine.Internal_DrawTextureArguments */,
{ NULL, LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke, LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke_back, LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_marshal_pinvoke_cleanup, NULL, NULL, &LightBakingOutput_t4F4130B900C21B6DADEF7D2AEAB2F120DCC84553_0_0_0 } /* UnityEngine.LightBakingOutput */,
{ NULL, LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke, LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke_back, LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_marshal_pinvoke_cleanup, NULL, NULL, &LightProbes_t32F17E0994042933C3CECAAD32AC3A5D3BB50284_0_0_0 } /* UnityEngine.LightProbes */,
{ NULL, LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke, LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke_back, LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_marshal_pinvoke_cleanup, NULL, NULL, &LocalBuilder_t7D66C7BAA00271B00F8FDBE1F3D85A6223E99E16_0_0_0 } /* System.Reflection.Emit.LocalBuilder */,
{ NULL, LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke, LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke_back, LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_marshal_pinvoke_cleanup, NULL, NULL, &LocalVariableInfo_t886B53D36BA0B4BA37FEEB6DB4834A6933FDAF61_0_0_0 } /* System.Reflection.LocalVariableInfo */,
{ NULL, MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke, MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke_back, MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_marshal_pinvoke_cleanup, NULL, NULL, &MarshalByRefObject_tD4DF91B488B284F899417EC468D8E50E933306A8_0_0_0 } /* System.MarshalByRefObject */,
{ NULL, MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke, MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke_back, MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_marshal_pinvoke_cleanup, NULL, NULL, &MeshGenerationResult_t081845588E8932BB4BA2D6F087D2F2F0EE3373CF_0_0_0 } /* UnityEngine.XR.MeshGenerationResult */,
{ NULL, MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke, MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke_back, MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_marshal_pinvoke_cleanup, NULL, NULL, &MethodBody_t994D7AC5F4F2C64BBDFA87CF62D9520EDBC44975_0_0_0 } /* System.Reflection.MethodBody */,
{ NULL, Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke, Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke_back, Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_marshal_pinvoke_cleanup, NULL, NULL, &Module_tAAF0DBC4FB20AB46035441C66C41A8DB813C8CD7_0_0_0 } /* System.Reflection.Module */,
{ NULL, MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke, MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke_back, MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_marshal_pinvoke_cleanup, NULL, NULL, &MonoAsyncCall_t4BAF695CDD88BF675F1E67C0CF12E3115D3F158E_0_0_0 } /* System.MonoAsyncCall */,
{ NULL, MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke, MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke_back, MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_marshal_pinvoke_cleanup, NULL, NULL, &MonoEventInfo_t0748824AF7D8732CE1A1D0F67436972A448CB59F_0_0_0 } /* System.Reflection.MonoEventInfo */,
{ NULL, MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke, MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke_back, MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_marshal_pinvoke_cleanup, NULL, NULL, &MonoMethodInfo_tE93FDE712D5034241FFC36C41D315D9EDD2C2D38_0_0_0 } /* System.Reflection.MonoMethodInfo */,
{ NULL, MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke, MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke_back, MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_marshal_pinvoke_cleanup, NULL, NULL, &MonoMethodMessage_t0B5F9B92AC439517E0DD283EFEBAFBDBE8B12FAC_0_0_0 } /* System.Runtime.Remoting.Messaging.MonoMethodMessage */,
{ NULL, MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke, MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke_back, MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_marshal_pinvoke_cleanup, NULL, NULL, &MonoPropertyInfo_tA5A058F3C4CD862912818E54A4B6152F21433B82_0_0_0 } /* System.Reflection.MonoPropertyInfo */,
{ NULL, MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke, MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke_back, MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_marshal_pinvoke_cleanup, NULL, NULL, &MonoTypeInfo_tD048FE6E8A79174435DD9BA986294B02C68DFC79_0_0_0 } /* System.MonoTypeInfo */,
{ NULL, MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke, MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke_back, MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_marshal_pinvoke_cleanup, NULL, NULL, &MovedFromAttributeData_tD215FAE7C2C99058DABB245C5A5EC95AEF05533C_0_0_0 } /* UnityEngine.Scripting.APIUpdating.MovedFromAttributeData */,
{ NULL, MulticastDelegate_t_marshal_pinvoke, MulticastDelegate_t_marshal_pinvoke_back, MulticastDelegate_t_marshal_pinvoke_cleanup, NULL, NULL, &MulticastDelegate_t_0_0_0 } /* System.MulticastDelegate */,
{ DelegatePInvokeWrapper_NativeUpdateCallback_t617743B3361FE4B086E28DDB8EDB4A7AC2490FC6, NULL, NULL, NULL, NULL, NULL, &NativeUpdateCallback_t617743B3361FE4B086E28DDB8EDB4A7AC2490FC6_0_0_0 } /* UnityEngineInternal.Input.NativeUpdateCallback */,
{ NULL, Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke, Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke_back, Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_marshal_pinvoke_cleanup, NULL, NULL, &Navigation_t1CF0FFB22C0357CD64714FB7A40A275F899D363A_0_0_0 } /* UnityEngine.UI.Navigation */,
{ NULL, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_back, Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_marshal_pinvoke_cleanup, NULL, NULL, &Object_tF2F3778131EFF286AF62B7B013A170F95A91571A_0_0_0 } /* UnityEngine.Object */,
{ NULL, ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke, ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke_back, ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_marshal_pinvoke_cleanup, NULL, NULL, &ParameterInfo_t9D9DBDD93E685815E35F4F6D6F58E90EBC8852B7_0_0_0 } /* System.Reflection.ParameterInfo */,
{ NULL, ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke, ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke_back, ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_marshal_pinvoke_cleanup, NULL, NULL, &ParameterModifier_tC1C793BD8B003B24010657487AFD17A4BA3DF6EA_0_0_0 } /* System.Reflection.ParameterModifier */,
{ NULL, ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke, ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke_back, ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_marshal_pinvoke_cleanup, NULL, NULL, &ParamsArray_t23479E79CB44DA9007429A97C23DAB83F26857CB_0_0_0 } /* System.ParamsArray */,
{ NULL, PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke, PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke_back, PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_marshal_pinvoke_cleanup, NULL, NULL, &PhotoCapture_t776617AFD6DE0F6CEE985719380EC3DB91C8BB74_0_0_0 } /* UnityEngine.Windows.WebCam.PhotoCapture */,
{ NULL, PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke, PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke_back, PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_marshal_pinvoke_cleanup, NULL, NULL, &PhraseRecognizedEventArgs_tC5746BBD42781AC39F1A02EACCF7CF8950AE6BEF_0_0_0 } /* UnityEngine.Windows.Speech.PhraseRecognizedEventArgs */,
{ NULL, PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke, PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke_back, PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_marshal_pinvoke_cleanup, NULL, NULL, &PlayableBinding_t265202500C703254AD9777368C05D1986C8AC7A2_0_0_0 } /* UnityEngine.Playables.PlayableBinding */,
{ NULL, PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke, PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke_back, PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_marshal_pinvoke_cleanup, NULL, NULL, &PlayerLoopSystem_t3C4FAE5D2149A8DBB8BED0C2AE9B957B7830E54C_0_0_0 } /* UnityEngine.LowLevel.PlayerLoopSystem */,
{ NULL, PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke, PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke_back, PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_marshal_pinvoke_cleanup, NULL, NULL, &PlayerLoopSystemInternal_t47326D2B668596299A94B36D0A20A874FBED781B_0_0_0 } /* UnityEngine.LowLevel.PlayerLoopSystemInternal */,
{ NULL, PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke, PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke_back, PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_marshal_pinvoke_cleanup, NULL, NULL, &PointLight_t543DD0461FFC4EA9F3B08CF9F4BF5BB2164D167E_0_0_0 } /* UnityEngine.Experimental.GlobalIllumination.PointLight */,
{ NULL, RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke, RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke_back, RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_marshal_pinvoke_cleanup, NULL, NULL, &RaycastResult_t9EFDE24B29650BD6DC8A49D954A3769E17146BCE_0_0_0 } /* UnityEngine.EventSystems.RaycastResult */,
{ NULL, RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke, RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke_back, RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_marshal_pinvoke_cleanup, NULL, NULL, &RealProxy_t323149046389A393F3F96DBAD6066A96B21CB744_0_0_0 } /* System.Runtime.Remoting.Proxies.RealProxy */,
{ NULL, RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke, RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke_back, RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_marshal_pinvoke_cleanup, NULL, NULL, &RectOffset_tE3A58467CD0749AD9D3E1271F9E315B38F39AE70_0_0_0 } /* UnityEngine.RectOffset */,
{ NULL, RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke, RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke_back, RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_marshal_pinvoke_cleanup, NULL, NULL, &RectangleLight_t9F02AC7041621773D7676A5E2707898F24892985_0_0_0 } /* UnityEngine.Experimental.GlobalIllumination.RectangleLight */,
{ NULL, RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke, RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke_back, RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_marshal_pinvoke_cleanup, NULL, NULL, &RegionInfo_t3F61C7100AA2F796A6BC57D31F1EFA76F6DCE59A_0_0_0 } /* System.Globalization.RegionInfo */,
{ NULL, RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke, RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke_back, RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_marshal_pinvoke_cleanup, NULL, NULL, &RemoteConfigSettings_tAA5BDD4B4E416F9907EB1B5E6295157CD224A932_0_0_0 } /* UnityEngine.RemoteConfigSettings */,
{ NULL, ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke, ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke_back, ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_marshal_pinvoke_cleanup, NULL, NULL, &ResourceLocator_t3D496606F94367D5D6B24DA9DC0A3B46E6B53B11_0_0_0 } /* System.Resources.ResourceLocator */,
{ NULL, ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke, ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke_back, ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_marshal_pinvoke_cleanup, NULL, NULL, &ResourceRequest_tD2D09E98C844087E6AB0F04532B7AA139558CBAD_0_0_0 } /* UnityEngine.ResourceRequest */,
{ NULL, SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke, SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke_back, SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_marshal_pinvoke_cleanup, NULL, NULL, &SafeStringMarshal_t3F5BD5E96CFBAF124814DED946144CF39A82F11E_0_0_0 } /* Mono.SafeStringMarshal */,
{ NULL, ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke, ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke_back, ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_marshal_pinvoke_cleanup, NULL, NULL, &ScriptableObject_t4361E08CEBF052C650D3666C7CEC37EB31DE116A_0_0_0 } /* UnityEngine.ScriptableObject */,
{ NULL, SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke, SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke_back, SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_marshal_pinvoke_cleanup, NULL, NULL, &SemanticMeaning_t5AEB02C787CA22E278A1E6D32FDA7CCA378F86E3_0_0_0 } /* UnityEngine.Windows.Speech.SemanticMeaning */,
{ NULL, SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke, SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke_back, SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_marshal_pinvoke_cleanup, NULL, NULL, &SerializationEntry_t33A292618975AD7AC936CB98B2F28256817A467E_0_0_0 } /* System.Runtime.Serialization.SerializationEntry */,
{ DelegatePInvokeWrapper_SerializationEventHandler_t3033BE1E86AE40A7533AD615FF9122FC8ED0B7C1, NULL, NULL, NULL, NULL, NULL, &SerializationEventHandler_t3033BE1E86AE40A7533AD615FF9122FC8ED0B7C1_0_0_0 } /* System.Runtime.Serialization.SerializationEventHandler */,
{ NULL, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_back, SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_marshal_pinvoke_cleanup, NULL, NULL, &SkeletonBone_t0AD95EAD0BE7D2EC13B2C7505225D340CB456A9E_0_0_0 } /* UnityEngine.SkeletonBone */,
{ NULL, SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke, SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke_back, SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_marshal_pinvoke_cleanup, NULL, NULL, &SortKey_tBBD5A739AC7187C1514CBA47698C1D5E36877F52_0_0_0 } /* System.Globalization.SortKey */,
{ NULL, SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke, SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke_back, SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_marshal_pinvoke_cleanup, NULL, NULL, &SpotLight_tAE1210A6FAE3F41CA62CB63E9012C9BED625AC9D_0_0_0 } /* UnityEngine.Experimental.GlobalIllumination.SpotLight */,
{ NULL, SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke, SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke_back, SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_marshal_pinvoke_cleanup, NULL, NULL, &SpriteBone_t7BF68B13FD8E65DC10C7C48D4B6C1D14030AFF2D_0_0_0 } /* UnityEngine.U2D.SpriteBone */,
{ NULL, SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke, SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke_back, SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_marshal_pinvoke_cleanup, NULL, NULL, &SpriteRendererGroup_tC158DDBE7C79A8EE915F52F3D3D0412B05F8522E_0_0_0 } /* UnityEngine.Experimental.U2D.SpriteRendererGroup */,
{ NULL, SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke, SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke_back, SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_marshal_pinvoke_cleanup, NULL, NULL, &SpriteState_t9024961148433175CE2F3D9E8E9239A8B1CAB15E_0_0_0 } /* UnityEngine.UI.SpriteState */,
{ NULL, StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke, StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke_back, StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_marshal_pinvoke_cleanup, NULL, NULL, &StackFrame_t6018A5362C2E8F6F80F153F3D40623D213094E0F_0_0_0 } /* System.Diagnostics.StackFrame */,
{ NULL, StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke, StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke_back, StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_marshal_pinvoke_cleanup, NULL, NULL, &StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505_0_0_0 } /* System.Runtime.Serialization.StreamingContext */,
{ NULL, TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke, TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke_back, TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_marshal_pinvoke_cleanup, NULL, NULL, &TaskAwaiter_t3780D365E9D10C2D6C4E76C78AA0CDF92B8F181C_0_0_0 } /* System.Runtime.CompilerServices.TaskAwaiter */,
{ NULL, TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke, TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke_back, TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_marshal_pinvoke_cleanup, NULL, NULL, &TextGenerationSettings_tAD927E4DCB8644B1B2BB810B5FB13C90B753898A_0_0_0 } /* UnityEngine.TextGenerationSettings */,
{ NULL, TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke, TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke_back, TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_marshal_pinvoke_cleanup, NULL, NULL, &TextGenerator_t893F256D3587633108E00E5731CDC5A77AFF1B70_0_0_0 } /* UnityEngine.TextGenerator */,
{ DelegatePInvokeWrapper_ThreadStart_tA13019555BA3CB2B0128F0880760196BF790E687, NULL, NULL, NULL, NULL, NULL, &ThreadStart_tA13019555BA3CB2B0128F0880760196BF790E687_0_0_0 } /* System.Threading.ThreadStart */,
{ NULL, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_back, TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_marshal_pinvoke_cleanup, NULL, NULL, &TileAnimationData_t149DEA00C16D767DB34BA1004B18C610D67F9D26_0_0_0 } /* UnityEngine.Tilemaps.TileAnimationData */,
{ NULL, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_back, TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_marshal_pinvoke_cleanup, NULL, NULL, &TileData_tC1E1EE7E156EBC2D759086B44BC45C056BFEEAF6_0_0_0 } /* UnityEngine.Tilemaps.TileData */,
{ NULL, TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke, TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke_back, TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_marshal_pinvoke_cleanup, NULL, NULL, &TrackedReference_t17AA313389C655DCF279F96A2D85332B29596514_0_0_0 } /* UnityEngine.TrackedReference */,
{ NULL, TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke, TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke_back, TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_marshal_pinvoke_cleanup, NULL, NULL, &TransparentProxy_t0A3E7468290B2C8EEEC64C242D586F3EE7B3F968_0_0_0 } /* System.Runtime.Remoting.Proxies.TransparentProxy */,
{ NULL, UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke, UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke_back, UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_marshal_pinvoke_cleanup, NULL, NULL, &UnSafeCharBuffer_tC2F1C142D69686631C1660F318C983106FF36F23_0_0_0 } /* System.UnSafeCharBuffer */,
{ DelegatePInvokeWrapper_UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099, NULL, NULL, NULL, NULL, NULL, &UnityAction_t22E545F8BE0A62EE051C6A83E209587A0DB1C099_0_0_0 } /* UnityEngine.Events.UnityAction */,
{ NULL, VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke, VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke_back, VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_marshal_pinvoke_cleanup, NULL, NULL, &VFXEventAttribute_tC4E90458100D52776F591CE62B19FF6051F423EF_0_0_0 } /* UnityEngine.VFX.VFXEventAttribute */,
{ NULL, VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke, VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke_back, VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_marshal_pinvoke_cleanup, NULL, NULL, &VFXExpressionValues_tFB46D1CD053E9CD5BD04CBE4DB1B0ED24C9C0883_0_0_0 } /* UnityEngine.VFX.VFXExpressionValues */,
{ NULL, VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke, VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke_back, VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_marshal_pinvoke_cleanup, NULL, NULL, &VFXOutputEventArgs_tE7E97EDFD67E4561E4412D2E4B1C999F95850BF5_0_0_0 } /* UnityEngine.VFX.VFXOutputEventArgs */,
{ NULL, VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke, VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke_back, VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_marshal_pinvoke_cleanup, NULL, NULL, &VFXSpawnerState_t5879CC401019E9C9D4F81128147AE52AAED167CD_0_0_0 } /* UnityEngine.VFX.VFXSpawnerState */,
{ NULL, ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke, ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke_back, ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshal_pinvoke_cleanup, NULL, NULL, &ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_0_0_0 } /* System.ValueType */,
{ NULL, VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke, VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke_back, VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_marshal_pinvoke_cleanup, NULL, NULL, &VideoCapture_tD1E122C49208E6DCCEF7FDE2A2C91DD47D010C91_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture */,
{ NULL, WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke, WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke_back, WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_marshal_pinvoke_cleanup, NULL, NULL, &WaitForSeconds_t8F9189BE6E467C98C99177038881F8982E0E4013_0_0_0 } /* UnityEngine.WaitForSeconds */,
{ NULL, WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke, WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke_back, WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_marshal_pinvoke_cleanup, NULL, NULL, &WaitHandle_t1D7DD8480FD5DA4E3AF92F569890FB972D9B1842_0_0_0 } /* System.Threading.WaitHandle */,
{ DelegatePInvokeWrapper_WindowActivated_t1467F1E2E584D7D8C71AC3E24E8AA39AC7B445BF, NULL, NULL, NULL, NULL, NULL, &WindowActivated_t1467F1E2E584D7D8C71AC3E24E8AA39AC7B445BF_0_0_0 } /* UnityEngine.WSA.WindowActivated */,
{ DelegatePInvokeWrapper_WindowSizeChanged_t06E270A73B037C3980FF00B56D20FD49CC201D65, NULL, NULL, NULL, NULL, NULL, &WindowSizeChanged_t06E270A73B037C3980FF00B56D20FD49CC201D65_0_0_0 } /* UnityEngine.WSA.WindowSizeChanged */,
{ NULL, YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke, YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke_back, YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_marshal_pinvoke_cleanup, NULL, NULL, &YieldInstruction_tB0B4E05316710E51ECCC1E57174C27FE6DEBBEAF_0_0_0 } /* UnityEngine.YieldInstruction */,
{ NULL, __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke, __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke_back, __DTString_t594255B76730E715A2A5655F8238B0029484B27A_marshal_pinvoke_cleanup, NULL, NULL, &__DTString_t594255B76730E715A2A5655F8238B0029484B27A_0_0_0 } /* System.__DTString */,
{ NULL, jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke, jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke_back, jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_marshal_pinvoke_cleanup, NULL, NULL, &jvalue_t220BECEE73180D6A4DE0F66CB6BA852EC6A5B587_0_0_0 } /* UnityEngine.jvalue */,
{ DelegatePInvokeWrapper_IdentityTokenChanged_t306C7E37727221C44C9D5843455B1FD7286C38B1, NULL, NULL, NULL, NULL, NULL, &IdentityTokenChanged_t306C7E37727221C44C9D5843455B1FD7286C38B1_0_0_0 } /* UnityEngine.Analytics.AnalyticsSessionInfo/IdentityTokenChanged */,
{ DelegatePInvokeWrapper_SessionStateChanged_tB042EAE0E6718825B246F7744C738DC80E529ACF, NULL, NULL, NULL, NULL, NULL, &SessionStateChanged_tB042EAE0E6718825B246F7744C738DC80E529ACF_0_0_0 } /* UnityEngine.Analytics.AnalyticsSessionInfo/SessionStateChanged */,
{ DelegatePInvokeWrapper_OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C, NULL, NULL, NULL, NULL, NULL, &OnOverrideControllerDirtyCallback_t9E38572D7CF06EEFF943EA68082DAC68AB40476C_0_0_0 } /* UnityEngine.AnimatorOverrideController/OnOverrideControllerDirtyCallback */,
{ DelegatePInvokeWrapper_LogCallback_t8C3C9B1E0F185E2A25D09DE10DD8414898698BBD, NULL, NULL, NULL, NULL, NULL, &LogCallback_t8C3C9B1E0F185E2A25D09DE10DD8414898698BBD_0_0_0 } /* UnityEngine.Application/LogCallback */,
{ DelegatePInvokeWrapper_LowMemoryCallback_tF94AC614EDACA9AD4CEA3DE77FF8EFF5DA1E5240, NULL, NULL, NULL, NULL, NULL, &LowMemoryCallback_tF94AC614EDACA9AD4CEA3DE77FF8EFF5DA1E5240_0_0_0 } /* UnityEngine.Application/LowMemoryCallback */,
{ NULL, SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke, SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke_back, SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_marshal_pinvoke_cleanup, NULL, NULL, &SorterGenericArray_t2369B44171030E280B31E4036E95D06C4810BBB9_0_0_0 } /* System.Array/SorterGenericArray */,
{ NULL, SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke, SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke_back, SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_marshal_pinvoke_cleanup, NULL, NULL, &SorterObjectArray_t60785845A840F9562AA723FF11ECA3597C5A9FD1_0_0_0 } /* System.Array/SorterObjectArray */,
{ DelegatePInvokeWrapper_PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B, NULL, NULL, NULL, NULL, NULL, &PCMReaderCallback_t9CA1437D36509A9FAC5EDD8FF2BC3259C24D0E0B_0_0_0 } /* UnityEngine.AudioClip/PCMReaderCallback */,
{ DelegatePInvokeWrapper_PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C, NULL, NULL, NULL, NULL, NULL, &PCMSetPositionCallback_tBDD99E7C0697687F1E7B06CDD5DE444A3709CF4C_0_0_0 } /* UnityEngine.AudioClip/PCMSetPositionCallback */,
{ DelegatePInvokeWrapper_AudioConfigurationChangeHandler_t1A997C51DF7B553A94DAD358F8D968308994774A, NULL, NULL, NULL, NULL, NULL, &AudioConfigurationChangeHandler_t1A997C51DF7B553A94DAD358F8D968308994774A_0_0_0 } /* UnityEngine.AudioSettings/AudioConfigurationChangeHandler */,
{ NULL, OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke, OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke_back, OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_marshal_pinvoke_cleanup, NULL, NULL, &OrderBlock_t0B106828F588BC2F0B9895425E6FD39EDA45C1E2_0_0_0 } /* UnityEngine.BeforeRenderHelper/OrderBlock */,
{ NULL, RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke, RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke_back, RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_marshal_pinvoke_cleanup, NULL, NULL, &RenderRequest_t7DEDFA6AAA1C8D381280183054C328F26BBCCE94_0_0_0 } /* UnityEngine.Camera/RenderRequest */,
{ DelegatePInvokeWrapper_WillRenderCanvases_t459621B4F3FA2571DE0ED6B4DEF0752F2E9EE958, NULL, NULL, NULL, NULL, NULL, &WillRenderCanvases_t459621B4F3FA2571DE0ED6B4DEF0752F2E9EE958_0_0_0 } /* UnityEngine.Canvas/WillRenderCanvases */,
{ DelegatePInvokeWrapper_InternalCancelHandler_t7F0E9BBFE542C3B0E62620118961AC10E0DFB000, NULL, NULL, NULL, NULL, NULL, &InternalCancelHandler_t7F0E9BBFE542C3B0E62620118961AC10E0DFB000_0_0_0 } /* System.Console/InternalCancelHandler */,
{ NULL, ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke, ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke_back, ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_marshal_pinvoke_cleanup, NULL, NULL, &ProcessMessageRes_tEB8A216399166053C37BA6F520ADEA92455104E9_0_0_0 } /* System.Runtime.Remoting.Channels.CrossAppDomainSink/ProcessMessageRes */,
{ DelegatePInvokeWrapper_StateChanged_tAE96F0A8860BFCD704179F6C1F376A6FAE3E25E0, NULL, NULL, NULL, NULL, NULL, &StateChanged_tAE96F0A8860BFCD704179F6C1F376A6FAE3E25E0_0_0_0 } /* UnityEngine.CullingGroup/StateChanged */,
{ NULL, Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke, Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke_back, Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_marshal_pinvoke_cleanup, NULL, NULL, &Data_tD2910A75571233E80DF4714C1F6CBB1852B3BF68_0_0_0 } /* System.Globalization.CultureInfo/Data */,
{ NULL, Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke, Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke_back, Resources_tA64317917B3D01310E84588407113D059D802DEB_marshal_pinvoke_cleanup, NULL, NULL, &Resources_tA64317917B3D01310E84588407113D059D802DEB_0_0_0 } /* UnityEngine.UI.DefaultControls/Resources */,
{ DelegatePInvokeWrapper_DictationCompletedDelegate_tE6D2D2F684A5A59434BE8AF87FCDC43BD191F3DC, NULL, NULL, NULL, NULL, NULL, &DictationCompletedDelegate_tE6D2D2F684A5A59434BE8AF87FCDC43BD191F3DC_0_0_0 } /* UnityEngine.Windows.Speech.DictationRecognizer/DictationCompletedDelegate */,
{ DelegatePInvokeWrapper_DictationErrorHandler_t0DEE0680E9AD9FFB1CEFC4DD62C0651AC21A2489, NULL, NULL, NULL, NULL, NULL, &DictationErrorHandler_t0DEE0680E9AD9FFB1CEFC4DD62C0651AC21A2489_0_0_0 } /* UnityEngine.Windows.Speech.DictationRecognizer/DictationErrorHandler */,
{ DelegatePInvokeWrapper_DictationHypothesisDelegate_tB114A80C520E9A7AEBCC6FB097CD282D887C5EB4, NULL, NULL, NULL, NULL, NULL, &DictationHypothesisDelegate_tB114A80C520E9A7AEBCC6FB097CD282D887C5EB4_0_0_0 } /* UnityEngine.Windows.Speech.DictationRecognizer/DictationHypothesisDelegate */,
{ DelegatePInvokeWrapper_DictationResultDelegate_t88BDCB6357C9490F858C89A42042833C6D61866D, NULL, NULL, NULL, NULL, NULL, &DictationResultDelegate_t88BDCB6357C9490F858C89A42042833C6D61866D_0_0_0 } /* UnityEngine.Windows.Speech.DictationRecognizer/DictationResultDelegate */,
{ DelegatePInvokeWrapper_DisplaysUpdatedDelegate_tC6A6AD44FAD98C9E28479FFF4BD3D9932458A6A1, NULL, NULL, NULL, NULL, NULL, &DisplaysUpdatedDelegate_tC6A6AD44FAD98C9E28479FFF4BD3D9932458A6A1_0_0_0 } /* UnityEngine.Display/DisplaysUpdatedDelegate */,
{ NULL, EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke, EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke_back, EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_marshal_pinvoke_cleanup, NULL, NULL, &EnumResult_tF32101A07E46A15120BB6C094F7E2EF6464828EC_0_0_0 } /* System.Enum/EnumResult */,
{ NULL, EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke, EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke_back, EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_marshal_pinvoke_cleanup, NULL, NULL, &EventMetadata_t0F1E6D6A3AE52945C8B5DC3D6BF5F5F0BA3D3218_0_0_0 } /* System.Diagnostics.Tracing.EventSource/EventMetadata */,
{ NULL, Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke, Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke_back, Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_marshal_pinvoke_cleanup, NULL, NULL, &Sha1ForNonSecretPurposes_t1544A7E09077CB790C774E861C0185053CC0E39A_0_0_0 } /* System.Diagnostics.Tracing.EventSource/Sha1ForNonSecretPurposes */,
{ NULL, Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke, Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke_back, Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_marshal_pinvoke_cleanup, NULL, NULL, &Reader_t6C70587C0F5A8CE8367A0407E3109E196764848C_0_0_0 } /* System.Threading.ExecutionContext/Reader */,
{ DelegatePInvokeWrapper_ReadDelegate_tB245FDB608C11A53AC71F333C1A6BE3D7CDB21BB, NULL, NULL, NULL, NULL, NULL, &ReadDelegate_tB245FDB608C11A53AC71F333C1A6BE3D7CDB21BB_0_0_0 } /* System.IO.FileStream/ReadDelegate */,
{ DelegatePInvokeWrapper_WriteDelegate_tF68E6D874C089E69933FA2B9A0C1C6639929C4F6, NULL, NULL, NULL, NULL, NULL, &WriteDelegate_tF68E6D874C089E69933FA2B9A0C1C6639929C4F6_0_0_0 } /* System.IO.FileStream/WriteDelegate */,
{ DelegatePInvokeWrapper_FontTextureRebuildCallback_tBF11A511EBD8D237A1C5885D460B42A45DDBB2DB, NULL, NULL, NULL, NULL, NULL, &FontTextureRebuildCallback_tBF11A511EBD8D237A1C5885D460B42A45DDBB2DB_0_0_0 } /* UnityEngine.Font/FontTextureRebuildCallback */,
{ DelegatePInvokeWrapper_WindowFunction_tFA5DBAB811627D7B0946C4AAD398D4CC154C174D, NULL, NULL, NULL, NULL, NULL, &WindowFunction_tFA5DBAB811627D7B0946C4AAD398D4CC154C174D_0_0_0 } /* UnityEngine.GUI/WindowFunction */,
{ DelegatePInvokeWrapper_SkinChangedDelegate_t8BECC691E2A259B07F4A51D8F1A639B83F055E1E, NULL, NULL, NULL, NULL, NULL, &SkinChangedDelegate_t8BECC691E2A259B07F4A51D8F1A639B83F055E1E_0_0_0 } /* UnityEngine.GUISkin/SkinChangedDelegate */,
{ NULL, GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke, GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke_back, GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_marshal_pinvoke_cleanup, NULL, NULL, &GuidResult_t0DA162EF4F1F1C93059A6A44E1C5CCE6F2924A6E_0_0_0 } /* System.Guid/GuidResult */,
{ NULL, bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke, bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke_back, bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_marshal_pinvoke_cleanup, NULL, NULL, &bucket_t56D642DDC4ABBCED9DB7F620CC35AEEC0778869D_0_0_0 } /* System.Collections.Hashtable/bucket */,
{ DelegatePInvokeWrapper_OnValidateInput_t721D2C2A7710D113E4909B36D9893CC6B1C69B9F, NULL, NULL, NULL, NULL, NULL, &OnValidateInput_t721D2C2A7710D113E4909B36D9893CC6B1C69B9F_0_0_0 } /* UnityEngine.UI.InputField/OnValidateInput */,
{ NULL, Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke, Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke_back, Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_marshal_pinvoke_cleanup, NULL, NULL, &Reader_tCFB139CA143817B24496D4F1B0DD8F51A256AB13_0_0_0 } /* System.Runtime.Remoting.Messaging.LogicalCallContext/Reader */,
{ DelegatePInvokeWrapper_OnNavMeshPreUpdate_t5E34F761F39A1F6B898F0E729B36C0782B92D572, NULL, NULL, NULL, NULL, NULL, &OnNavMeshPreUpdate_t5E34F761F39A1F6B898F0E729B36C0782B92D572_0_0_0 } /* UnityEngine.AI.NavMesh/OnNavMeshPreUpdate */,
{ NULL, NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke, NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke_back, NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_marshal_pinvoke_cleanup, NULL, NULL, &NumberBuffer_t5EC5B27BA4105EA147F2DE7CE7B96D7E9EAC9271_0_0_0 } /* System.Number/NumberBuffer */,
{ DelegatePInvokeWrapper_InvocationEntryDelegate_t751DEAE9B64F61CCD4029B67E7916F00C823E61A, NULL, NULL, NULL, NULL, NULL, &InvocationEntryDelegate_t751DEAE9B64F61CCD4029B67E7916F00C823E61A_0_0_0 } /* System.Threading.OSSpecificSynchronizationContext/InvocationEntryDelegate */,
{ NULL, FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke, FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke_back, FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_marshal_pinvoke_cleanup, NULL, NULL, &FormatParam_tA765680E7894569CC4BDEB5DF722F646311E23EE_0_0_0 } /* System.ParameterizedStrings/FormatParam */,
{ NULL, EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke, EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke_back, EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_marshal_pinvoke_cleanup, NULL, NULL, &EmitParams_t4F6429654653488A5D430701CD0743D011807CCC_0_0_0 } /* UnityEngine.ParticleSystem/EmitParams */,
{ DelegatePInvokeWrapper_OnCaptureResourceCreatedCallback_t4975687A3DBE3DF603E72841D83C2BE2346B54DD, NULL, NULL, NULL, NULL, NULL, &OnCaptureResourceCreatedCallback_t4975687A3DBE3DF603E72841D83C2BE2346B54DD_0_0_0 } /* UnityEngine.Windows.WebCam.PhotoCapture/OnCaptureResourceCreatedCallback */,
{ DelegatePInvokeWrapper_OnCapturedToDiskCallback_t3B89E8D38F2086237DA0EC9615D2678B14ED4F85, NULL, NULL, NULL, NULL, NULL, &OnCapturedToDiskCallback_t3B89E8D38F2086237DA0EC9615D2678B14ED4F85_0_0_0 } /* UnityEngine.Windows.WebCam.PhotoCapture/OnCapturedToDiskCallback */,
{ DelegatePInvokeWrapper_OnPhotoModeStartedCallback_t21FCF86FB7933100968EE01A7B4BFB751F53EF92, NULL, NULL, NULL, NULL, NULL, &OnPhotoModeStartedCallback_t21FCF86FB7933100968EE01A7B4BFB751F53EF92_0_0_0 } /* UnityEngine.Windows.WebCam.PhotoCapture/OnPhotoModeStartedCallback */,
{ DelegatePInvokeWrapper_OnPhotoModeStoppedCallback_tF6A2F039E1A8DB64BD4CF25675BED44F74E5B1F6, NULL, NULL, NULL, NULL, NULL, &OnPhotoModeStoppedCallback_tF6A2F039E1A8DB64BD4CF25675BED44F74E5B1F6_0_0_0 } /* UnityEngine.Windows.WebCam.PhotoCapture/OnPhotoModeStoppedCallback */,
{ DelegatePInvokeWrapper_ErrorDelegate_t4E0F6E50E9C786DB72C82D69540E01FB9EFD3D9C, NULL, NULL, NULL, NULL, NULL, &ErrorDelegate_t4E0F6E50E9C786DB72C82D69540E01FB9EFD3D9C_0_0_0 } /* UnityEngine.Windows.Speech.PhraseRecognitionSystem/ErrorDelegate */,
{ DelegatePInvokeWrapper_StatusDelegate_tD751E0623EDFECE1A8492E9DB58E762EFC0D2528, NULL, NULL, NULL, NULL, NULL, &StatusDelegate_tD751E0623EDFECE1A8492E9DB58E762EFC0D2528_0_0_0 } /* UnityEngine.Windows.Speech.PhraseRecognitionSystem/StatusDelegate */,
{ DelegatePInvokeWrapper_CreateOutputMethod_t7A129D00E8823B50AEDD0C9B082C9CB3DF863876, NULL, NULL, NULL, NULL, NULL, &CreateOutputMethod_t7A129D00E8823B50AEDD0C9B082C9CB3DF863876_0_0_0 } /* UnityEngine.Playables.PlayableBinding/CreateOutputMethod */,
{ DelegatePInvokeWrapper_UpdateFunction_tEDC2A88F61F179480CAA9443E6ADDA3F126B8AEA, NULL, NULL, NULL, NULL, NULL, &UpdateFunction_tEDC2A88F61F179480CAA9443E6ADDA3F126B8AEA_0_0_0 } /* UnityEngine.LowLevel.PlayerLoopSystem/UpdateFunction */,
{ DelegatePInvokeWrapper_GetRayIntersectionAllCallback_t9D6C059892DE030746D2873EB8871415BAC79311, NULL, NULL, NULL, NULL, NULL, &GetRayIntersectionAllCallback_t9D6C059892DE030746D2873EB8871415BAC79311_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllCallback */,
{ DelegatePInvokeWrapper_GetRayIntersectionAllNonAllocCallback_t6DAE64211C37E996B257BF2C54707DAD3474D69C, NULL, NULL, NULL, NULL, NULL, &GetRayIntersectionAllNonAllocCallback_t6DAE64211C37E996B257BF2C54707DAD3474D69C_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/GetRayIntersectionAllNonAllocCallback */,
{ DelegatePInvokeWrapper_GetRaycastNonAllocCallback_tA4A6A2336A9B9FEE31F8F5344576B3BB0A7B3F34, NULL, NULL, NULL, NULL, NULL, &GetRaycastNonAllocCallback_tA4A6A2336A9B9FEE31F8F5344576B3BB0A7B3F34_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/GetRaycastNonAllocCallback */,
{ DelegatePInvokeWrapper_Raycast2DCallback_t125C1CA6D0148380915E597AC8ADBB93EFB0EE29, NULL, NULL, NULL, NULL, NULL, &Raycast2DCallback_t125C1CA6D0148380915E597AC8ADBB93EFB0EE29_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/Raycast2DCallback */,
{ DelegatePInvokeWrapper_Raycast3DCallback_t27A8B301052E9C6A4A7D38F95293CA129C39373F, NULL, NULL, NULL, NULL, NULL, &Raycast3DCallback_t27A8B301052E9C6A4A7D38F95293CA129C39373F_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/Raycast3DCallback */,
{ DelegatePInvokeWrapper_RaycastAllCallback_t48E12CFDCFDEA0CD7D83F9DDE1E341DBCC855005, NULL, NULL, NULL, NULL, NULL, &RaycastAllCallback_t48E12CFDCFDEA0CD7D83F9DDE1E341DBCC855005_0_0_0 } /* UnityEngine.UI.ReflectionMethodsCache/RaycastAllCallback */,
{ NULL, LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke, LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke_back, LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_marshal_pinvoke_cleanup, NULL, NULL, &LowerCaseMapping_t54FB537AEA4CA2EBAB5BDCC79881428C202241DE_0_0_0 } /* System.Text.RegularExpressions.RegexCharClass/LowerCaseMapping */,
{ DelegatePInvokeWrapper_UpdatedEventHandler_tB65DDD5524F88B07DDF23FD1607DF1887404EC55, NULL, NULL, NULL, NULL, NULL, &UpdatedEventHandler_tB65DDD5524F88B07DDF23FD1607DF1887404EC55_0_0_0 } /* UnityEngine.RemoteSettings/UpdatedEventHandler */,
{ NULL, HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke, HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke_back, HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_marshal_pinvoke_cleanup, NULL, NULL, &HitInfo_t74B96DDC302EB605CCC557B737A5C88EB67B57D6_0_0_0 } /* UnityEngine.SendMouseEvents/HitInfo */,
{ NULL, Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke, Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke_back, Escape_t0479DB63473055AD46754E698B2114579D5D944E_marshal_pinvoke_cleanup, NULL, NULL, &Escape_t0479DB63473055AD46754E698B2114579D5D944E_0_0_0 } /* Mono.Globalization.Unicode.SimpleCollator/Escape */,
{ NULL, FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke, FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke_back, FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_marshal_pinvoke_cleanup, NULL, NULL, &FormatLiterals_t8EC4E080425C3E3AE6627A6BB7F5B487680E3C94_0_0_0 } /* System.Globalization.TimeSpanFormat/FormatLiterals */,
{ NULL, DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke, DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke_back, DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_marshal_pinvoke_cleanup, NULL, NULL, &DYNAMIC_TIME_ZONE_INFORMATION_t2A935E4357B99965B322E468058134B139805895_0_0_0 } /* System.TimeZoneInfo/DYNAMIC_TIME_ZONE_INFORMATION */,
{ NULL, TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke, TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke_back, TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_marshal_pinvoke_cleanup, NULL, NULL, &TIME_ZONE_INFORMATION_t895CF3EE73EA839A7D135CD7187F514DA758F578_0_0_0 } /* System.TimeZoneInfo/TIME_ZONE_INFORMATION */,
{ NULL, TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke, TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke_back, TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_marshal_pinvoke_cleanup, NULL, NULL, &TransitionTime_tD3B9CE442418566444BB123BA7297AE071D0D47A_0_0_0 } /* System.TimeZoneInfo/TransitionTime */,
{ NULL, WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke, WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke_back, WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_marshal_pinvoke_cleanup, NULL, NULL, &WorkRequest_tA19FD4D1269D8EE2EA886AAF036C4F7F09154393_0_0_0 } /* UnityEngine.UnitySynchronizationContext/WorkRequest */,
{ NULL, UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke, UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke_back, UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_marshal_pinvoke_cleanup, NULL, NULL, &UriScheme_t3B7BA17407A0502944A677BEEE38787879AD8CFB_0_0_0 } /* Mono.Security.Uri/UriScheme */,
{ NULL, VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke, VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke_back, VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_marshal_pinvoke_cleanup, NULL, NULL, &VersionResult_tBEB89FF4CFED02E383BC6F59FE5D0CA775DFECC1_0_0_0 } /* System.Version/VersionResult */,
{ DelegatePInvokeWrapper_OnStartedRecordingVideoCallback_tF42862BD94B6DEE3AFBAEC068CB93D2B35E366A9, NULL, NULL, NULL, NULL, NULL, &OnStartedRecordingVideoCallback_tF42862BD94B6DEE3AFBAEC068CB93D2B35E366A9_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture/OnStartedRecordingVideoCallback */,
{ DelegatePInvokeWrapper_OnStoppedRecordingVideoCallback_t2D7EC27C8904AE0EE068D13F918E42EECF965DD6, NULL, NULL, NULL, NULL, NULL, &OnStoppedRecordingVideoCallback_t2D7EC27C8904AE0EE068D13F918E42EECF965DD6_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture/OnStoppedRecordingVideoCallback */,
{ DelegatePInvokeWrapper_OnVideoCaptureResourceCreatedCallback_t3699FD2DE7FEF286A229B548E358133211BBA956, NULL, NULL, NULL, NULL, NULL, &OnVideoCaptureResourceCreatedCallback_t3699FD2DE7FEF286A229B548E358133211BBA956_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture/OnVideoCaptureResourceCreatedCallback */,
{ DelegatePInvokeWrapper_OnVideoModeStartedCallback_t201EBB65059DA254ED2A4B24D365C4F6EAE9DF75, NULL, NULL, NULL, NULL, NULL, &OnVideoModeStartedCallback_t201EBB65059DA254ED2A4B24D365C4F6EAE9DF75_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture/OnVideoModeStartedCallback */,
{ DelegatePInvokeWrapper_OnVideoModeStoppedCallback_tA0921FEE66B3EDE3E01E8D6526CF5203ED3C273C, NULL, NULL, NULL, NULL, NULL, &OnVideoModeStoppedCallback_tA0921FEE66B3EDE3E01E8D6526CF5203ED3C273C_0_0_0 } /* UnityEngine.Windows.WebCam.VideoCapture/OnVideoModeStoppedCallback */,
{ NULL, XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke, XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke_back, XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_marshal_pinvoke_cleanup, NULL, NULL, &XRMirrorViewBlitDesc_t3BD136F0BF088017ABB0EF1856191541211848A5_0_0_0 } /* UnityEngine.XR.XRDisplaySubsystem/XRMirrorViewBlitDesc */,
{ NULL, XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke, XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke_back, XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_marshal_pinvoke_cleanup, NULL, NULL, &XRRenderPass_tCB4A9F3B07C2C59889BD3EE40F44E9347A2BC9BB_0_0_0 } /* UnityEngine.XR.XRDisplaySubsystem/XRRenderPass */,
{ DelegatePInvokeWrapper_WindowsCancelHandler_tFD0F0B721F93ACA04D9CD9340DA39075A8FF2ACF, NULL, NULL, NULL, NULL, NULL, &WindowsCancelHandler_tFD0F0B721F93ACA04D9CD9340DA39075A8FF2ACF_0_0_0 } /* System.Console/WindowsConsole/WindowsCancelHandler */,
{ DelegatePInvokeWrapper_EtwEnableCallback_t0A092DCCAA1CF6D740310D3C16BCFEB2667D26FA, NULL, NULL, NULL, NULL, NULL, &EtwEnableCallback_t0A092DCCAA1CF6D740310D3C16BCFEB2667D26FA_0_0_0 } /* Microsoft.Win32.UnsafeNativeMethods/ManifestEtw/EtwEnableCallback */,
NULL,
};
|
; A316569: a(n) = Jacobi (or Kronecker) symbol (n, 15).
; 0,1,1,0,1,0,0,-1,1,0,0,-1,0,-1,-1,0,1,1,0,1,0,0,-1,1,0,0,-1,0,-1,-1,0,1,1,0,1,0,0,-1,1,0,0,-1,0,-1,-1,0,1,1,0,1,0,0,-1,1,0,0,-1,0,-1,-1,0,1,1,0,1,0,0,-1,1,0,0,-1,0,-1,-1,0
mov $1,$0
mod $0,3
mov $2,$1
mul $2,2
mul $0,$2
pow $0,2
lpb $0
sub $0,10
lpe
mov $1,$0
div $1,4
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/assistant/model/ui/assistant_error_element.h"
#include "ash/assistant/ui/assistant_ui_constants.h"
#include "ui/base/l10n/l10n_util.h"
namespace ash {
AssistantErrorElement::AssistantErrorElement(int message_id)
: AssistantUiElement(AssistantUiElementType::kError),
message_id_(message_id) {}
AssistantErrorElement::~AssistantErrorElement() = default;
bool AssistantErrorElement::Compare(const AssistantUiElement& other) const {
return other.type() == AssistantUiElementType::kError &&
static_cast<const AssistantErrorElement&>(other).message_id() ==
message_id_;
}
} // namespace ash
|
/*
Copyright (c) 2011 Arduino. All right reserved.
This 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.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#ifdef __cplusplus
extern "C" {
#endif
// Pin number
const PinName digitalPin[] = {
PG_9, //D0
PG_14, //D1
PF_15, //D2
PE_13, //D3
PF_14, //D4
PE_11, //D5
PE_9, //D6
PF_13, //D7
PF_12, //D8
PD_15, //D9
PD_14, //D10
PA_7, //D11
PA_6, //D12
PA_5, //D13
PB_9, //D14
PB_8, //D15
PC_6, //D16
PB_15, //D17
PB_13, //D18
PB_12, //D19
PA_15, //D20
PC_7, //D21
PB_5, //D22
PB_3, //D23
PA_4, //D24
PB_4, //D25
PB_6, //D26
PB_2, //D27
PD_13, //D28
PD_12, //D29
PD_11, //D30
PE_2, //D31
PA_0, //D32
PB_0, //D33 - LED_GREEN
PE_0, //D34
PB_11, //D35
PB_10, //D36
PE_15, //D37
PE_14, //D38
PE_12, //D39
PE_10, //D40
PE_7, //D41
PE_8, //D42
PC_8, //D43
PC_9, //D44
PC_10, //D45
PC_11, //D46
PC_12, //D47
PD_2, //D48
PG_2, //D49
PG_3, //D50
PD_7, //D51
PD_6, //D52
PD_5, //D53
PD_4, //D54
PD_3, //D55
PE_2, //D56
PE_4, //D57
PE_5, //D58
PE_6, //D59
PE_3, //D60
PF_8, //D61
PF_7, //D62
PF_9, //D63
PG_1, //D64
PG_0, //D65
PD_1, //D66
PD_0, //D67
PF_0, //D68
PF_1, //D69
PF_2, //D70
PA_7, //D71
NC, //D72
PB_7, //D73 - LED_BLUE
PB_14, //D74 - LED_RED
PC_13, //D75 - USER_BTN
PD_9, //D76 - Serial Rx
PD_8, //D77 - Serial Tx
PA_3, //D78/A0
PC_0, //D79/A1
PC_3, //D80/A2
PF_3, //D81/A3
PF_5, //D82/A4
PF_10, //D83/A5
PB_1, //D84/A6
PC_2, //D85/A7
PF_4, //D86/A8
PF_6, //D87/A9
// Duplicated pins in order to be aligned with PinMap_ADC
PA_7, //D88/A10 = D11
PA_6, //D89/A11 = D12
PA_5, //D90/A12 = D13
PA_4, //D91/A13 = D24
PA_0, //D92/A14 = D32
PF_8, //D93/A15 = D61
PF_7, //D94/A16 = D62
PF_9 //D95/A17 = D63
};
#ifdef __cplusplus
}
#endif
// ----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief System Clock Configuration
* The system Clock is configured as follow :
* System Clock source = PLL (HSI)
* SYSCLK(Hz) = 216000000
* HCLK(Hz) = 216000000
* AHB Prescaler = 1
* APB1 Prescaler = 4
* APB2 Prescaler = 2
* HSE Frequency(Hz) = 16000000
* PLL_M = 8
* PLL_N = 216
* PLL_P = 2
* PLL_Q = 9
* PLLSAI_N = 192
* PLLSAI_P = 2
* VDD(V) = 3.3
* Main regulator output voltage = Scale1 mode
* Flash Latency(WS) = 7
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
/* Configure the main internal regulator output voltage */
__HAL_RCC_PWR_CLK_ENABLE();
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/* Initializes the CPU, AHB and APB busses clocks */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = 16;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
RCC_OscInitStruct.PLL.PLLM = 8;
RCC_OscInitStruct.PLL.PLLN = 216;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 9;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
/* Activate the Over-Drive mode */
if (HAL_PWREx_EnableOverDrive() != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
/* Initializes the CPU, AHB and APB busses clocks */
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48;
PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLL;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
/* Configure the Systick interrupt time */
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
/* Configure the Systick */
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
/* SysTick_IRQn interrupt configuration */
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
}
#ifdef __cplusplus
}
#endif
|
PIC_WIDTH = 320
PIC_HEIGHT equ 256
bsr init
bsr main
bsr exit
rts
init move.w #PIC_WIDTH,d0
move.w #PIC_HEIGHT,d1
rts
main moveq.l #0,d0
rts
exit illegal
rts |
; A017031: a(n) = (7*n + 4)^3.
; 64,1331,5832,15625,32768,59319,97336,148877,216000,300763,405224,531441,681472,857375,1061208,1295029,1560896,1860867,2197000,2571353,2985984,3442951,3944312,4492125,5088448,5735339,6434856,7189057,8000000,8869743,9800344,10793861,11852352,12977875,14172488,15438249,16777216,18191447,19683000,21253933,22906304,24642171,26463592,28372625,30371328,32461759,34645976,36926037,39304000,41781923,44361864,47045881,49836032,52734375,55742968,58863869,62099136,65450827,68921000,72511713,76225024,80062991,84027672,88121125,92345408,96702579,101194696,105823817,110592000,115501303,120553784,125751501,131096512,136590875,142236648,148035889,153990656,160103007,166375000,172808693,179406144,186169411,193100552,200201625,207474688,214921799,222545016,230346397,238328000,246491883,254840104,263374721,272097792,281011375,290117528,299418309,308915776,318611987,328509000,338608873,348913664,359425431,370146232,381078125,392223168,403583419,415160936,426957777,438976000,451217663,463684824,476379541,489303872,502459875,515849608,529475129,543338496,557441767,571787000,586376253,601211584,616295051,631628712,647214625,663054848,679151439,695506456,712121957,729000000,746142643,763551944,781229961,799178752,817400375,835896888,854670349,873722816,893056347,912673000,932574833,952763904,973242271,994011992,1015075125,1036433728,1058089859,1080045576,1102302937,1124864000,1147730823,1170905464,1194389981,1218186432,1242296875,1266723368,1291467969,1316532736,1341919727,1367631000,1393668613,1420034624,1446731091,1473760072,1501123625,1528823808,1556862679,1585242296,1613964717,1643032000,1672446203,1702209384,1732323601,1762790912,1793613375,1824793048,1856331989,1888232256,1920495907,1953125000,1986121593,2019487744,2053225511,2087336952,2121824125,2156689088,2191933899,2227560616,2263571297,2299968000,2336752783,2373927704,2411494821,2449456192,2487813875,2526569928,2565726409,2605285376,2645248887,2685619000,2726397773,2767587264,2809189531,2851206632,2893640625,2936493568,2979767519,3023464536,3067586677,3112136000,3157114563,3202524424,3248367641,3294646272,3341362375,3388518008,3436115229,3484156096,3532642667,3581577000,3630961153,3680797184,3731087151,3781833112,3833037125,3884701248,3936827539,3989418056,4042474857,4096000000,4149995543,4204463544,4259406061,4314825152,4370722875,4427101288,4483962449,4541308416,4599141247,4657463000,4716275733,4775581504,4835382371,4895680392,4956477625,5017776128,5079577959,5141885176,5204699837,5268024000,5331859723
mov $1,7
mul $1,$0
add $1,4
pow $1,3
|
; A307371: Numbers k such that the digits of sqrt(k) begin with k.
; 0,1,98,99,100,9998,9999,10000,999998,999999,1000000,99999998,99999999,100000000,9999999998,9999999999,10000000000,999999999998,999999999999,1000000000000,99999999999998,99999999999999,100000000000000,9999999999999998,9999999999999999
mov $2,1
lpb $0,1
sub $0,3
mul $2,100
lpe
add $0,$2
mov $1,$0
sub $1,1
|
; unsigned char esx_ide_bank_reserve(unsigned char banktype,unsigned char page)
SECTION code_esxdos
PUBLIC _esx_ide_bank_reserve_callee
PUBLIC l0_esx_ide_bank_reserve_callee
EXTERN asm_esx_ide_bank_reserve
_esx_ide_bank_reserve_callee:
pop hl
ex (sp),hl
l0_esx_ide_bank_reserve_callee:
push ix
push iy
call asm_esx_ide_bank_reserve
pop iy
pop ix
ret
|
/*!
* \author Ruben Martins - rubenm@andrew.cmu.edu
*
* @section LICENSE
*
* Open-WBO, Copyright (c) 2013-2022, Ruben Martins, Vasco Manquinho, Ines Lynce
* UpMax, Copyright (c) 2022, Pedro Orvalho, Vasco Manquinho, Ruben Martins
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
#include "MaxSAT.h"
#include <signal.h>
#include <sstream>
#include <iostream>
using namespace upmax;
/************************************************************************************************
//
// Public methods
//
************************************************************************************************/
StatusCode MaxSAT::search() {
if(print) printf("Error: Invalid MaxSAT algoritm.\n");
throw MaxSATException(__FILE__, __LINE__, "Did not implement MaxSAT search");
return _ERROR_;
}
void MaxSAT::setInitialTime(double initial) {
initialTime = initial;
} // Sets the initial time.
/************************************************************************************************
//
// SAT solver interface
//
************************************************************************************************/
int MaxSAT::_n_opt_sols;
// Creates an empty SAT Solver.
Solver *MaxSAT::newSATSolver() {
#ifdef SIMP
NSPACE::SimpSolver *S = new NSPACE::SimpSolver();
#else
Solver *S = new Solver();
#endif
return (Solver *)S;
}
// Creates a new variable in the SAT solver.
void MaxSAT::newSATVariable(Solver *S) {
#ifdef SIMP
((NSPACE::SimpSolver *)S)->newVar();
#else
S->newVar();
#endif
}
// Makes sure the underlying SAT solver has the given amount of variables
// reserved.
void MaxSAT::reserveSATVariables(Solver *S, unsigned maxVariable) {
#ifdef SAT_HAS_RESERVATION
#ifdef SIMP
((NSPACE::SimpSolver *)S)->reserveVars(maxVariable);
#else
S->reserveVars(maxVariable);
#endif
#endif
}
// Solve the formula that is currently loaded in the SAT solver with a set of
// assumptions and with the option to use preprocessing for 'simp'.
lbool MaxSAT::searchSATSolver(Solver *S, vec<Lit> &assumptions, bool pre) {
// Currently preprocessing is disabled by default.
// Variable elimination cannot be done on relaxation variables nor on variables
// that belong to soft clauses. To preprocessing to be used those variables
// should be frozen.
#ifdef SIMP
lbool res = ((NSPACE::SimpSolver *)S)->solveLimited(assumptions, pre);
#else
lbool res = S->solveLimited(assumptions);
#endif
return res;
}
// Solve the formula without assumptions.
lbool MaxSAT::searchSATSolver(Solver *S, bool pre) {
vec<Lit> dummy; // Empty set of assumptions.
return searchSATSolver(S, dummy, pre);
}
/************************************************************************************************
//
// Utils for model management
//
************************************************************************************************/
/*_________________________________________________________________________________________________
|
| saveModel : (currentModel : vec<lbool>&) -> [void]
|
| Description:
|
| Saves the current model found by the SAT solver.
|
| Pre-conditions:
| * Assumes that 'nbInitialVariables' has been initialized.
| * Assumes that 'currentModel' is not empty.
|
| Post-conditions:
| * 'model' is updated to the current model.
|
|________________________________________________________________________________________________@*/
void MaxSAT::saveModel(vec<lbool> ¤tModel) {
assert(maxsat_formula->nInitialVars() != 0);
assert(currentModel.size() != 0);
model.clear();
// Only store the value of the variables that belong to the
// original MaxSAT formula.
for (int i = 0; i < maxsat_formula->nInitialVars(); i++)
model.push(currentModel[i]);
}
/*_________________________________________________________________________________________________
|
| computeCostModel : (currentModel : vec<lbool>&) (weight : int) ->
| [uint64_t]
|
| Description:
|
| Computes the cost of 'currentModel'. The cost of a model is the sum of
| the weights of the unsatisfied soft clauses.
| If a weight is specified, then it only considers the sum of the weights
| of the unsatisfied soft clauses with the specified weight.
|
| Pre-conditions:
| * Assumes that 'currentModel' is not empty.
|
|________________________________________________________________________________________________@*/
uint64_t MaxSAT::computeCostModel(vec<lbool> ¤tModel, uint64_t weight) {
assert(currentModel.size() != 0);
uint64_t currentCost = 0;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
bool unsatisfied = true;
for (int j = 0; j < maxsat_formula->getSoftClause(i).clause.size(); j++) {
if (weight != UINT64_MAX &&
maxsat_formula->getSoftClause(i).weight != weight) {
unsatisfied = false;
continue;
}
assert(var(maxsat_formula->getSoftClause(i).clause[j]) <
currentModel.size());
if ((sign(maxsat_formula->getSoftClause(i).clause[j]) &&
currentModel[var(maxsat_formula->getSoftClause(i).clause[j])] ==
l_False) ||
(!sign(maxsat_formula->getSoftClause(i).clause[j]) &&
currentModel[var(maxsat_formula->getSoftClause(i).clause[j])] ==
l_True)) {
unsatisfied = false;
break;
}
}
if (unsatisfied) {
currentCost += maxsat_formula->getSoftClause(i).weight;
}
}
return currentCost;
}
/*_________________________________________________________________________________________________
|
| isBMO : (cache : bool) -> [void]
|
| Description:
|
| Tests if the MaxSAT formula has lexicographical optimization criterion.
|
| For further details see:
| * Joao Marques-Silva, Josep Argelich, Ana Graça, Inês Lynce: Boolean
| lexicographic optimization: algorithms & applications. Ann. Math.
| Artif. Intell. 62(3-4): 317-343 (2011)
|
| Post-conditions:
| * 'orderWeights' is updated with the weights in lexicographical order if
| 'cache' is true.
|
|________________________________________________________________________________________________@*/
bool MaxSAT::isBMO(bool cache) {
assert(orderWeights.size() == 0);
bool bmo = true;
std::set<uint64_t> partitionWeights;
std::map<uint64_t, uint64_t> nbPartitionWeights;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
partitionWeights.insert(maxsat_formula->getSoftClause(i).weight);
nbPartitionWeights[maxsat_formula->getSoftClause(i).weight]++;
}
for (std::set<uint64_t>::iterator iter = partitionWeights.begin();
iter != partitionWeights.end(); ++iter) {
orderWeights.push_back(*iter);
}
std::sort(orderWeights.begin(), orderWeights.end(), greaterThan);
uint64_t totalWeights = 0;
for (int i = 0; i < (int)orderWeights.size(); i++)
totalWeights += orderWeights[i] * nbPartitionWeights[orderWeights[i]];
for (int i = 0; i < (int)orderWeights.size(); i++) {
totalWeights -= orderWeights[i] * nbPartitionWeights[orderWeights[i]];
if (orderWeights[i] < totalWeights) {
bmo = false;
break;
}
}
if (!cache)
orderWeights.clear();
return bmo;
}
/************************************************************************************************
//
// Utils for printing
//
************************************************************************************************/
// Prints information regarding the AMO encoding.
void MaxSAT::print_AMO_configuration(int encoding) {
switch (encoding) {
case _AMO_LADDER_:
printf("c | AMO Encoding: %12s "
" |\n",
"Ladder");
break;
default:
printf("c Error: Invalid AMO encoding.\n");
printf("s UNKNOWN\n");
break;
}
}
// Prints information regarding the PB encoding.
void MaxSAT::print_PB_configuration(int encoding) {
switch (encoding) {
case _PB_SWC_:
printf("c | PB Encoding: %13s "
" |\n",
"SWC");
break;
case _PB_GTE_:
printf("c | PB Encoding: %13s "
" |\n",
"GTE");
break;
default:
printf("c Error: Invalid PB encoding.\n");
printf("s UNKNOWN\n");
break;
}
}
// Prints information regarding the cardinality encoding.
void MaxSAT::print_Card_configuration(int encoding) {
switch (encoding) {
case _CARD_CNETWORKS_:
printf("c | Cardinality Encoding: %12s "
" |\n",
"CNetworks");
break;
case _CARD_TOTALIZER_:
printf("c | Cardinality Encoding: %12s "
" |\n",
"Totalizer");
break;
case _CARD_MTOTALIZER_:
printf("c | Cardinality Encoding: %19s "
" |\n",
"Modulo Totalizer");
break;
default:
printf("c Error: Invalid cardinality encoding.\n");
printf("s UNKNOWN\n");
break;
}
}
void MaxSAT::blockModel(Solver *solver) {
assert(model.size() != 0);
vec<Lit> blocking;
printf("v ");
for (int i = 0; i < model.size(); i++) {
indexMap::const_iterator iter = maxsat_formula->getIndexToName().find(i);
if (iter != maxsat_formula->getIndexToName().end()) {
if (model[i] == l_False)
printf("-");
printf("%s ", iter->second.c_str());
}
}
printf("\n");
for (int i = 0; i < model.size(); i++) {
blocking.push((model[i] == l_True) ? ~mkLit(i) : mkLit(i));
}
solver->addClause(blocking);
}
void MaxSAT::printBound(int64_t bound)
{
if(!print) return;
printf("o %" PRId64 "\n", bound);
}
// Prints the best satisfying model. Assumes that 'model' is not empty.
void MaxSAT::printModel() {
assert(model.size() != 0);
std::stringstream s;
s << "v ";
if (maxsat_formula->getFormat() == _FORMAT_PB_) {
for (int i = 0; i < model.size(); i++) {
indexMap::const_iterator iter = maxsat_formula->getIndexToName().find(i);
if (iter != maxsat_formula->getIndexToName().end()) {
if (model[i] == l_False)
s << "-";
s << iter->second.c_str() << " ";
}
}
} else {
for (int i = 0; i < model.size(); i++) {
if (model[i] == l_True)
s << i+1 << " ";
else
s << -(i+1) << " ";
}
}
printf("%s\n", s.str().c_str());
}
std::string MaxSAT::printSoftClause(int id){
assert (maxsat_formula->getFormat() == _FORMAT_MAXSAT_);
assert (id < maxsat_formula->nSoft());
std::stringstream ss;
ss << maxsat_formula->getSoftClause(id).weight << " ";
for (int j = 0; j < maxsat_formula->getSoftClause(id).clause.size(); j++){
if (sign(maxsat_formula->getSoftClause(id).clause[j]))
ss << "-";
ss << (var(maxsat_formula->getSoftClause(id).clause[j])+1) << " ";
}
ss << "0\n";
return ss.str();
}
void MaxSAT::printUnsatisfiedSoftClauses() {
assert (model.size() != 0);
std::stringstream s;
int soft_size = 0;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
bool unsatisfied = true;
for (int j = 0; j < maxsat_formula->getSoftClause(i).clause.size(); j++) {
assert(var(maxsat_formula->getSoftClause(i).clause[j]) <
model.size());
if ((sign(maxsat_formula->getSoftClause(i).clause[j]) &&
model[var(maxsat_formula->getSoftClause(i).clause[j])] ==
l_False) ||
(!sign(maxsat_formula->getSoftClause(i).clause[j]) &&
model[var(maxsat_formula->getSoftClause(i).clause[j])] ==
l_True)) {
unsatisfied = false;
break;
}
}
if (unsatisfied) {
s << printSoftClause(i);
soft_size++;
}
}
FILE * file = fopen (getPrintSoftFilename(),"w");
fprintf(file,"p cnf %d %d\n",maxsat_formula->nInitialVars(),soft_size);
fprintf(file,"%s", s.str().c_str());
}
// Prints search statistics.
void MaxSAT::printStats() {
double totalTime = cpuTime();
float avgCoreSize = 0;
if (nbCores != 0)
avgCoreSize = (float)sumSizeCores / nbCores;
printf("c\n");
if (model.size() == 0)
printf("c Best solution: %12s\n", "-");
else
printf("c Best solution: %12" PRIu64 "\n", ubCost);
printf("c Total time: %12.2f s\n", totalTime - initialTime);
printf("c Nb SAT calls: %12d\n", nbSatisfiable);
printf("c Nb UNSAT calls: %12d\n", nbCores);
printf("c Average core size: %12.2f\n", avgCoreSize);
printf("c Nb symmetry clauses: %12d\n", nbSymmetryClauses);
printf("c\n");
}
void MaxSAT::serializeStats(int type) { // TODO: write Python bindings instead
if (print_json) {
FILE* res = fopen(getJsonFilename(), "wb");
auto totalTime = cpuTime();
float avgCoreSize = 0;
if (nbCores != 0)
avgCoreSize = (float)sumSizeCores / nbCores;
fprintf(res, "{\n");
fprintf(res, "\"rtime\" : %f,\n", totalTime - initialTime);
fprintf(res, "\"best_solution\" : %llu,\n", ubCost);
fprintf(res, "\"num_sat_calls\" : %d,\n", nbSatisfiable);
fprintf(res, "\"num_unsat_calls\" : %d,\n", nbCores);
fprintf(res, "\"avg_core_size\" : %f,\n", avgCoreSize);
fprintf(res, "\"num_symmetry_clauses\" : %d,\n", nbSymmetryClauses);
switch (type) {
case _SATISFIABLE_:
fprintf(res, "\"result\" : %s\n", "\"sat\"");
break;
case _OPTIMUM_:
fprintf(res, "\"result\" : %s\n", "\"opt\"");
break;
case _UNSATISFIABLE_:
fprintf(res, "\"result\" : %s\n", "\"unsat\"");
break;
case _UNKNOWN_:
fprintf(res, "\"result\" : %s\n", "null");
break;
default:
// printf("c Error: Invalid answer type.\n");
throw std::runtime_error("Invalid answer type");
}
fprintf(res, "}\n");
fflush(res);
fclose(res);
}
else return;
}
// Prints the corresponding answer.
void MaxSAT::printAnswer(int type) {
if (verbosity > 0 && print)
printStats();
if (type == _UNKNOWN_ && model.size() > 0)
type = _SATISFIABLE_;
// store type in member variable
searchStatus = (StatusCode)type;
if(!print) return;
switch (type) {
case _SATISFIABLE_:
printf("s SATISFIABLE\n");
if (print_model)
printModel();
if (print_soft)
printUnsatisfiedSoftClauses();
break;
case _OPTIMUM_:
printf("s OPTIMUM FOUND\n");
if (print_model)
printModel();
if (print_soft)
printUnsatisfiedSoftClauses();
break;
case _UNSATISFIABLE_:
printf("s UNSATISFIABLE\n");
break;
case _UNKNOWN_:
printf("s UNKNOWN\n");
break;
default:
printf("c Error: Invalid answer type.\n");
}
serializeStats(type);
}
uint64_t MaxSAT::getUB() {
// only works for partial MaxSAT currently
Solver *solver = newSATSolver();
vec<Lit> relaxation_vars;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
Lit p = mkLit(maxsat_formula->nVars() + i, false);
relaxation_vars.push(p);
}
for (int i = 0; i < maxsat_formula->nVars() + maxsat_formula->nSoft(); i++)
newSATVariable(solver);
for (int i = 0; i < maxsat_formula->nHard(); i++)
solver->addClause(maxsat_formula->getHardClause(i).clause);
vec<Lit> clause;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
clause.clear();
maxsat_formula->getSoftClause(i).clause.copyTo(clause);
for (int j = 0; j < maxsat_formula->getSoftClause(i).relaxation_vars.size();
j++)
clause.push(maxsat_formula->getSoftClause(i).relaxation_vars[j]);
clause.push(relaxation_vars[i]);
solver->addClause(clause);
}
int limit = 1000;
solver->setConfBudget(limit);
vec<Lit> dummy;
lbool res = searchSATSolver(solver, dummy);
if (res == l_True) {
uint64_t ub = computeCostModel(solver->model);
return ub;
} else if (res == l_False) {
printAnswer(_UNSATISFIABLE_);
exit(_UNSATISFIABLE_);
}
return maxsat_formula->nSoft();
}
std::pair<uint64_t, int> MaxSAT::getLB() {
// only works for partial MaxSAT currently
Solver *solver = newSATSolver();
vec<Lit> relaxation_vars;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
Lit p = mkLit(maxsat_formula->nVars() + i, false);
relaxation_vars.push(p);
}
for (int i = 0; i < maxsat_formula->nVars() + maxsat_formula->nSoft(); i++)
newSATVariable(solver);
for (int i = 0; i < maxsat_formula->nHard(); i++)
solver->addClause(maxsat_formula->getHardClause(i).clause);
vec<Lit> clause;
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
clause.clear();
maxsat_formula->getSoftClause(i).clause.copyTo(clause);
clause.push(relaxation_vars[i]);
solver->addClause(clause);
}
std::map<Lit, int> core; // Mapping between the assumption literal and
// the respective soft clause.
for (int i = 0; i < maxsat_formula->nSoft(); i++)
core[relaxation_vars[i]] = i;
int limit = 1000;
lbool res = l_False;
uint64_t lb = 0;
vec<bool> active;
active.growTo(relaxation_vars.size(), false);
vec<Lit> assumptions;
for (int i = 0; i < relaxation_vars.size(); i++) {
if (!active[i]) {
assumptions.push(~relaxation_vars[i]);
}
}
while (res == l_False) {
solver->setConfBudget(limit);
res = searchSATSolver(solver, assumptions);
if (res == l_False) {
for (int i = 0; i < solver->conflict.size(); i++) {
Lit p = solver->conflict[i];
if (core.find(p) != core.end()) {
assert(!active[core[p]]);
active[core[p]] = true;
}
}
assumptions.clear();
for (int i = 0; i < relaxation_vars.size(); i++) {
if (!active[i]) {
assumptions.push(~relaxation_vars[i]);
}
}
lb++;
}
}
int nb_relaxed = 0;
for (int i = 0; i < relaxation_vars.size(); i++) {
if (active[i])
nb_relaxed++;
}
return std::make_pair(lb, nb_relaxed);
}
StatusCode MaxSAT::enumerate_opt(Solver* solver, vec<Lit>& assumptions) {
_n_opt_sols = 1;
if (_all_opt_sols){
// add signal handler
signal(SIGXCPU, SIGINT_all_opt_exit);
signal(SIGTERM, SIGINT_all_opt_exit);
signal(SIGINT, SIGINT_all_opt_exit);
// formula is in a satisfiable state
assert (solver->model.size() > 0);
uint64_t optCost = computeCostModel(solver->model);
uint64_t newCost = optCost;
vec<Lit> block_model;
lbool res = l_True;
while (res == l_True){
// block model
newCost = computeCostModel(solver->model);
if (newCost != optCost)
break;
block_model.clear();
if (_all_var_sols){
for (int i = 0; i < maxsat_formula->nInitialVars(); i++)
block_model.push(mkLit(i,solver->model[i]==l_True));
} else {
for (int i = 0; i < maxsat_formula->nSoft(); i++) {
for (int j = 0; j < maxsat_formula->getSoftClause(i).relaxation_vars.size(); j++){
int v = var(maxsat_formula->getSoftClause(i).relaxation_vars[j]);
block_model.push(mkLit(v,solver->model[v]==l_True));
}
}
}
if (block_model.size() > 0)
solver->addClause(block_model);
res = searchSATSolver(solver, assumptions);
_n_opt_sols++;
}
}
printf("c Optimal Solutions: %d\n",_n_opt_sols);
return _OPTIMUM_;
} |
; A242412: a(n) = (2n-1)^2 + 14.
; 15,23,39,63,95,135,183,239,303,375,455,543,639,743,855,975,1103,1239,1383,1535,1695,1863,2039,2223,2415,2615,2823,3039,3263,3495,3735,3983,4239,4503,4775,5055,5343,5639,5943,6255,6575,6903,7239,7583,7935,8295,8663,9039,9423,9815
sub $1,$0
bin $1,2
mul $1,8
add $1,15
|
https://practice.geeksforgeeks.org/problems/minimum-swaps-required-to-bring-all-elements-less-than-or-equal-to-k-together4847/1#
sliding window tec:
int minSwap(int *arr, int n, int k) {
// Complet the function
int c=0;
for(int i=0;i<n;i++)
{
if(arr[i]<=k)
c++;
}
int greater_number=0;
for(int i=0;i<c;i++)
{
if(arr[i]>k)
greater_number++;
}
int i=0;
int j=c-1;
int ans=INT_MAX;
while(j<n-1)
{
ans=min(greater_number,ans);
if(arr[i]>k)
{
greater_number--;
}
if(arr[j+1]>k)
{
greater_number++;
}
j++;
i++;
}
return min(greater_number,ans);
}
|
foo: macro
endm
foo |
SECTION code_clib
SECTION code_fp_math48
PUBLIC _isgreaterequal
EXTERN cm48_sdcciy_isgreaterequal
defc _isgreaterequal = cm48_sdcciy_isgreaterequal
|
;/*
; * FreeRTOS Kernel <DEVELOPMENT BRANCH>
; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
; *
; * SPDX-License-Identifier: MIT
; *
; * Permission is hereby granted, free of charge, to any person obtaining a copy of
; * this software and associated documentation files (the "Software"), to deal in
; * the Software without restriction, including without limitation the rights to
; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
; * the Software, and to permit persons to whom the Software is furnished to do so,
; * subject to the following conditions:
; *
; * The above copyright notice and this permission notice shall be included in all
; * copies or substantial portions of the Software.
; *
; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
; *
; * https://www.FreeRTOS.org
; * https://github.com/FreeRTOS
; *
; */
.thumb
.ref pxCurrentTCB
.ref vTaskSwitchContext
.ref ulMaxSyscallInterruptPriority
.def xPortPendSVHandler
.def ulPortGetIPSR
.def vPortSVCHandler
.def vPortStartFirstTask
NVICOffsetConst: .word 0xE000ED08
CPACRConst: .word 0xE000ED88
pxCurrentTCBConst: .word pxCurrentTCB
ulMaxSyscallInterruptPriorityConst: .word ulMaxSyscallInterruptPriority
; -----------------------------------------------------------
.align 4
ulPortGetIPSR: .asmfunc
mrs r0, ipsr
bx r14
.endasmfunc
; -----------------------------------------------------------
.align 4
vPortSetInterruptMask: .asmfunc
push {r0}
ldr r0, ulMaxSyscallInterruptPriorityConst
msr basepri, r0
pop {r0}
bx r14
.endasmfunc
; -----------------------------------------------------------
.align 4
xPortPendSVHandler: .asmfunc
mrs r0, psp
isb
;/* Get the location of the current TCB. */
ldr r3, pxCurrentTCBConst
ldr r2, [r3]
;/* Save the core registers. */
stmdb r0!, {r4-r11}
;/* Save the new top of stack into the first member of the TCB. */
str r0, [r2]
stmdb sp!, {r3, r14}
ldr r0, ulMaxSyscallInterruptPriorityConst
ldr r1, [r0]
msr basepri, r1
dsb
isb
bl vTaskSwitchContext
mov r0, #0
msr basepri, r0
ldmia sp!, {r3, r14}
;/* The first item in pxCurrentTCB is the task top of stack. */
ldr r1, [r3]
ldr r0, [r1]
;/* Pop the core registers. */
ldmia r0!, {r4-r11}
msr psp, r0
isb
bx r14
.endasmfunc
; -----------------------------------------------------------
.align 4
vPortSVCHandler: .asmfunc
;/* Get the location of the current TCB. */
ldr r3, pxCurrentTCBConst
ldr r1, [r3]
ldr r0, [r1]
;/* Pop the core registers. */
ldmia r0!, {r4-r11}
msr psp, r0
isb
mov r0, #0
msr basepri, r0
orr r14, #0xd
bx r14
.endasmfunc
; -----------------------------------------------------------
.align 4
vPortStartFirstTask: .asmfunc
;/* Use the NVIC offset register to locate the stack. */
ldr r0, NVICOffsetConst
ldr r0, [r0]
ldr r0, [r0]
;/* Set the msp back to the start of the stack. */
msr msp, r0
;/* Clear the bit that indicates the FPU is in use in case the FPU was used
;before the scheduler was started - which would otherwise result in the
;unnecessary leaving of space in the SVC stack for lazy saving of FPU
;registers. */
mov r0, #0
msr control, r0
;/* Call SVC to start the first task. */
cpsie i
cpsie f
dsb
isb
svc #0
.endasmfunc
; -----------------------------------------------------------
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.