Fix VM code to export the right symbols on Windows

db4
Slava Pestov 2009-05-05 15:55:41 -05:00
parent 8133436d6d
commit 8d5d1b8bb5
3 changed files with 6 additions and 7 deletions

View File

@ -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)))
}

2
vm/cpu-x86.64.hpp Normal file → Executable file
View File

@ -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
}

9
vm/write_barrier.hpp Normal file → Executable file
View File

@ -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)
#define ADDR_CARD_MASK (CARD_SIZE-1)
VM_C_API cell cards_offset;
inline static card *addr_to_card(cell a)
{
return (card*)(((cell)(a) >> CARD_BITS) + cards_offset);
@ -42,8 +43,6 @@ typedef u8 card_deck;
#define DECK_SIZE (1<<DECK_BITS)
#define ADDR_DECK_MASK (DECK_SIZE-1)
VM_C_API cell decks_offset;
inline static card_deck *addr_to_deck(cell a)
{
return (card_deck *)(((cell)a >> 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)
{