diff --git a/vm/cpu-x86.32.hpp b/vm/cpu-x86.32.hpp index 6b6328aa4f..902b33b0b4 100755 --- a/vm/cpu-x86.32.hpp +++ b/vm/cpu-x86.32.hpp @@ -6,6 +6,6 @@ namespace factor register cell ds asm("esi"); register cell rs asm("edi"); -#define VM_ASM_API extern "C" __attribute__ ((regparm (2))) +#define VM_ASM_API VM_C_API __attribute__ ((regparm (2))) } diff --git a/vm/cpu-x86.64.hpp b/vm/cpu-x86.64.hpp old mode 100644 new mode 100755 index be71a78aa8..679c301548 --- a/vm/cpu-x86.64.hpp +++ b/vm/cpu-x86.64.hpp @@ -6,6 +6,6 @@ namespace factor register cell ds asm("r14"); register cell rs asm("r15"); -#define VM_ASM_API extern "C" +#define VM_ASM_API VM_C_API } diff --git a/vm/write_barrier.hpp b/vm/write_barrier.hpp old mode 100644 new mode 100755 index ae7fbb25dd..e656b66a56 --- a/vm/write_barrier.hpp +++ b/vm/write_barrier.hpp @@ -6,6 +6,9 @@ card has a slot written to. the offset of the first object is set by the allocator. */ +VM_C_API factor::cell cards_offset; +VM_C_API factor::cell decks_offset; + namespace factor { @@ -19,8 +22,6 @@ typedef u8 card; #define CARD_SIZE (1<> CARD_BITS) + cards_offset); @@ -42,8 +43,6 @@ typedef u8 card_deck; #define DECK_SIZE (1<> DECK_BITS) + decks_offset); @@ -61,7 +60,7 @@ inline static card *deck_to_card(card_deck *d) #define INVALID_ALLOT_MARKER 0xff -VM_C_API cell allot_markers_offset; +cell allot_markers_offset; inline static card *addr_to_allot_marker(object *a) {