[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: ff-interface trouble
- From: email@example.com (Tobias Kunze)
- Date: Tue, 4 May 93 23:53:15 +0200
I experience a strange behaviour of mcl's ff-interface:
My c functions need some static variables (they gt called from the midimanager)
which are normally referenced via register a5. When i load the object files,
however, the :a5-abs-refs slot of the ffenv structure is nil and the :a5ptr slot
holds a #<mac Non-Zone pointer #x.....> which is apparently _not_ mcl's a5 but
an address slightly offset (- 4 bytes). Thus, any time my c code tries to access
its variables, unpredictable things happen (at least).
I spent hours in macsbug an could finally replace some of those references by
pc-relative addressing mode instructions and everything worked fine for those
But the ff-interface seems to place the jump-table, a5ptr and data segment in
another memory block than the actual code, so this is not a fix - it only showeed
me that my code is working.
Has anyone an idea what could be done about that?
Or is there a simple solution which i'm just not aware of?
Or does anyone know, how to instruct the mpw compiler to reference these variables pc-relative?
Thanks in advance, tobias