(c) 2022 YSI contibutors, licensed under MPL 1.1
CTRL_FoundLCTRL(scanner[])
Name | Info |
---|---|
scanner |
[172] The codescan scanner that found a matching pattern. |
This function is called for every single LCTRL
in the compiled AMX, after they are found by the code scanner. It checks if the found register load is for one of the new registers and replaces LCTRL
with a special CALL
.
AMX_GetPointerBinary
AMX_HEADER_COD
AMX_TABLE_PUBLICS
AsmContext
AsmEmitCallAbs
AsmEmitNop
AsmInitPtr
CodeScanGetMatchAddress
CodeScanGetMatchHole
FIXES_format
FUNCTION_LENGTH
__2_cells
__4_cells
true
63 cells
CTRL_FoundSCTRL(scanner[])
Name | Info |
---|---|
scanner |
[172] The codescan scanner that found a matching pattern. |
This function is called for every single SCTRL
in the compiled AMX, after they are found by the code scanner. It checks if the found register store is for one of the new registers and replaces SCTRL
with a special CALL
.
AMX_GetPointerBinary
AMX_HEADER_COD
AMX_TABLE_PUBLICS
AsmContext
AsmEmitCallAbs
AsmEmitNop
AsmInitPtr
CodeScanGetMatchAddress
CodeScanGetMatchHole
FIXES_format
FUNCTION_LENGTH
__2_cells
__4_cells
true
63 cells
CTRL_LCTRLStub()
For every custom readable control register we define we need a special call stub that can convert from passing the parameters in registers to passing the parameters on the stack, without clobbering alt
. A lot of the code is common to all of these stubs, and this function implements that common code. The final handler and return addresses are passed to this, and the parameters are extracted from pri
and alt
.
__2_cells
__4_cells
__9_cells
__cip
__jmp
__param0_offset
__param1_offset
__param2_offset
__param3_offset
__return_offset
1 cells
CTRL_SCTRLStub()
For every custom writable control register we define we need a special call stub that can convert from passing the parameters in registers to passing the parameters on the stack, without clobbering the registers. A lot of the code is common to all of these stubs, and this function implements that common code. The final handler and return addresses are passed to this, and the parameters are extracted from pri
and alt
.
__2_cells
__4_cells
__9_cells
__cip
__jmp
__param0_offset
__param1_offset
__param2_offset
__param3_offset
__return_offset
1 cells
CTRL_WriteLCTRLStub(addr)
Name | Info |
---|---|
addr |
The address to write to. |
For every custom readable control register we define we need a special call stub that can convert from passing the parameters in registers to passing the parameters on the stack, without clobbering alt
. This generates those stubs.
AMX_HEADER_COD
AsmContext
AsmEmitCallAbs
AsmEmitJump
AsmEmitProc
AsmEmitPushC
AsmEmitRetn
AsmInitPtr
DisasmContext
DisasmGetOpcode
DisasmGetOperandReloc
DisasmInit
DisasmNext
OP_CALL
YSI_g_sLCTRLStubAddress
__4_cells
__8_cells
33 cells
CTRL_WriteSCTRLStub(addr)
Name | Info |
---|---|
addr |
The address to write to. |
For every custom writable control register we define we need a special call stub that can convert from passing the parameters in registers to passing the parameters on the stack, without clobbering the registers. This generates those stubs.
AMX_HEADER_COD
AsmContext
AsmEmitCallAbs
AsmEmitJump
AsmEmitProc
AsmEmitPushC
AsmEmitRetn
AsmInitPtr
DisasmContext
DisasmContext_opcode
DisasmGetOperandReloc
DisasmInit
DisasmNext
OP_CALL
YSI_g_sSCTRLStubAddress
__4_cells
__8_cells
33 cells
Timers_OnCodeInit()
Initialise the library.
AMX_GetPointerPrefixBinary
AMX_TABLE_PUBLICS
CTRL_FoundLCTRL
CTRL_FoundSCTRL
CTRL_LCTRLStub
CTRL_SCTRLStub
CTRL_WriteLCTRLStub
CTRL_WriteSCTRLStub
CodeScanAddMatcher
CodeScanInit
CodeScanMatcher
CodeScanMatcherInit_
CodeScanMatcherPattern_
CodeScanRun
CodeScanner
DisasmReloc
O@A_
O@V_
OP_LCTRL
OP_SCTRL
YSI_g_sBaseRelocation
YSI_g_sLCTRLStubAddress
YSI_g_sSCTRLStubAddress
__1_cell
gCodeScanCallback_match
public
526 cells