diff options
| author | grischka <grischka> | 2009-12-20 01:53:49 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2009-12-20 01:53:49 +0100 |
| commit | 88a3ccab9f3c877e2ffb8fecc3303006e0640907 (patch) | |
| tree | 47092d8442f4d7f1e4714643acf25787556d1e10 /i386-asm.c | |
| parent | 7fa712e00c5221d9373e8f8fa073e9e6fa064da1 (diff) | |
| download | tinycc-88a3ccab9f3c877e2ffb8fecc3303006e0640907.tar.gz tinycc-88a3ccab9f3c877e2ffb8fecc3303006e0640907.tar.bz2 | |
allow tcc be build from separate objects
If you want that, run: make NOTALLINONE=1
Diffstat (limited to 'i386-asm.c')
| -rw-r--r-- | i386-asm.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -19,7 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "tcc.h" + +// #define NB_ASM_REGS 8 #define MAX_OPERANDS 3 +#define NB_SAVED_REGS 3 #define TOK_ASM_first TOK_ASM_clc #define TOK_ASM_last TOK_ASM_emms @@ -398,7 +402,8 @@ static void parse_operand(TCCState *s1, Operand *op) op->type |= indir; } -static void gen_expr32(ExprValue *pe) +/* XXX: unify with C code output ? */ +ST_FUNC void gen_expr32(ExprValue *pe) { gen_addr32(pe->sym ? VT_SYM : 0, pe->sym, pe->v); } @@ -554,7 +559,7 @@ static inline void asm_modrm(int reg, Operand *op) } } -static void asm_opcode(TCCState *s1, int opcode) +ST_FUNC void asm_opcode(TCCState *s1, int opcode) { const ASMInstr *pa; int i, modrm_index, reg, v, op1, is_short_jmp, seg_prefix; @@ -966,9 +971,6 @@ static void asm_opcode(TCCState *s1, int opcode) #endif } -#define NB_SAVED_REGS 3 -#define NB_ASM_REGS 8 - /* return the constraint priority (we allocate first the lowest numbered constraints) */ static inline int constraint_priority(const char *str) @@ -1030,7 +1032,7 @@ static const char *skip_constraint_modifiers(const char *p) #define is_reg_allocated(reg) (regs_allocated[reg] & reg_mask) -static void asm_compute_constraints(ASMOperand *operands, +ST_FUNC void asm_compute_constraints(ASMOperand *operands, int nb_operands, int nb_outputs, const uint8_t *clobber_regs, int *pout_reg) @@ -1262,7 +1264,7 @@ static void asm_compute_constraints(ASMOperand *operands, #endif } -static void subst_asm_operand(CString *add_str, +ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier) { int r, reg, size, val; @@ -1356,7 +1358,7 @@ static void subst_asm_operand(CString *add_str, } /* generate prolog and epilog code for asm statment */ -static void asm_gen_code(ASMOperand *operands, int nb_operands, +ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands, int nb_outputs, int is_output, uint8_t *clobber_regs, int out_reg) @@ -1450,7 +1452,7 @@ static void asm_gen_code(ASMOperand *operands, int nb_operands, } } -static void asm_clobber(uint8_t *clobber_regs, const char *str) +ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str) { int reg; TokenSym *ts; |
