2 /* arg is a primitive number */
4 /* arg is a literal table index, holding an array pair (symbol/dll) */
6 /* a pointer to a compiled word reference */
8 /* a compiled word reference */
14 /* immediate literal */
16 /* address of stack_chain var */
21 /* absolute address in a 64-bit location */
23 /* absolute address in a 32-bit location */
25 /* relative address in a 32-bit location */
27 /* relative address in a PowerPC LIS/ORI sequence */
29 /* relative address in a PowerPC LWZ/STW/BC instruction */
31 /* relative address in a PowerPC B/BL instruction */
33 /* relative address in an ARM B/BL instruction */
35 /* pointer to address in an ARM LDR/STR instruction */
37 /* pointer to address in an ARM LDR/STR instruction offset by 8 bytes */
41 #define REL_RELATIVE_PPC_2_MASK 0xfffc
42 #define REL_RELATIVE_PPC_3_MASK 0x3fffffc
43 #define REL_INDIRECT_ARM_MASK 0xfff
44 #define REL_RELATIVE_ARM_3_MASK 0xffffff
46 /* the rel type is built like a cell to avoid endian-specific code in
48 #define REL_TYPE(r) ((r)->type & 0x000000ff)
49 #define REL_CLASS(r) (((r)->type & 0x0000ff00) >> 8)
50 #define REL_ARGUMENT(r) (((r)->type & 0xffff0000) >> 16)
52 /* code relocation consists of a table of entries for each fixup */
58 #define CREF(array,i) ((CELL)(array) + CELLS * (i))
60 void apply_relocation(CELL
class, CELL offset
, F_FIXNUM absolute_value
);
62 void relocate_code_block(F_COMPILED
*relocating
, CELL code_start
, CELL literals_start
);
64 void default_word_code(F_WORD
*word
, bool relocate
);
66 void set_word_code(F_WORD
*word
, F_COMPILED
*compiled
);
68 F_COMPILED
*add_compiled_block(
75 CELL
compiled_code_format(void);
76 bool stack_traces_p(void);
78 void primitive_modify_code_heap(void);