mirror of
https://github.com/Interlisp/maiko.git
synced 2026-03-25 17:48:54 +00:00
Use ...FromStackOffset functions where appropriate
Rather than adding/or-ing the STK_OFFSET constant into a stack offset to convert it to a pointer in general Lisp memory and then converting from that to a native address... use the functions specifically present to do those conversions with embedded checks on stack offset validity.
This commit is contained in:
@@ -1664,7 +1664,7 @@ void ccfuncall(unsigned int atom_index, int argnum, int bytenum)
|
||||
CURRENTFX->nextblock = (LAddrFromNative(CurrentStackPTR) & 0x0ffff) - (argnum << 1) + 4 /* +3 */;
|
||||
|
||||
/* Setup IVar */ /* XXX: is it really only 2-byte aligned? */
|
||||
IVar = NativeAligned2FromLAddr((((LispPTR)(CURRENTFX->nextblock)) | STK_OFFSET));
|
||||
IVar = NativeAligned2FromStackOffset(CURRENTFX->nextblock);
|
||||
|
||||
/* Set PC to the Next Instruction and save into FX */
|
||||
CURRENTFX->pc = ((UNSIGNED)PC - (UNSIGNED)FuncObj) + bytenum;
|
||||
|
||||
Reference in New Issue
Block a user