mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-15 07:54:13 +00:00
Add NativeAligned4FromStackOffset() and LPageFromNative() before using them
This commit is contained in:
parent
a448bd0329
commit
889adcaa35
12
inc/adr68k.h
12
inc/adr68k.h
@ -74,6 +74,18 @@ static inline DLword *NativeAligned2FromStackOffset(DLword StackOffset)
|
||||
return Stackspace + StackOffset;
|
||||
}
|
||||
|
||||
static inline LispPTR *NativeAligned4FromStackOffset(DLword StackOffset)
|
||||
{
|
||||
return (LispPTR *)(Stackspace + StackOffset);
|
||||
}
|
||||
|
||||
static inline LispPTR LPageFromNative(void *NAddr)
|
||||
{
|
||||
if ((uintptr_t)NAddr & 1) {
|
||||
printf("Misaligned pointer in LPageFromNative %p\n", NAddr);
|
||||
}
|
||||
return (((DLword *)NAddr) - Lisp_world) >> 8;
|
||||
}
|
||||
/* translate 68k ptr to Lisp DLword address */
|
||||
#define LADDR_from_68k(ptr68k) ((LispPTR)(((UNSIGNED)(ptr68k) - (UNSIGNED)Lisp_world) >>1))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user