Forums » Programming with the ECS » Intermediate Code »
Operand of call instruction
Added by Rochus Keller over 1 year ago
22.4.2 in the manual states "call Function, Size".
I asked myself, how to call function pointers and received code from the sandbox, which rather suggests, that the instruction expects something like "call MemAddr, Size".
Please advise.
Replies (2)
RE: Operand of call instruction - Added by Florian Negele over 1 year ago
The syntax definition uses either an operand model or an operand class. The operand class Function means that the first operand can be an instance of any operand model that has type function pointer:
- Immediate Value:
call fun 0x1234, 0
- Register:
mov fun $1, fun 0x1234 call fun $1, 0
- Address:
call fun @function, 0
- Memory:
call fun [@variable], 0
RE: Operand of call instruction - Added by Rochus Keller over 1 year ago
Ok, thanks for clarification.