Branch: Tag:

2012-07-16

2012-07-16 21:09:35 by Per Hedbor <ph@opera.com>

[compiler][amd64] Use new features from peep.c

Place the code for calling check_threads_etc before the function instead of
inside it, to have one branch less in tight loops.

This saves about 4% in the nested loops test, at the cost of 12 bytes extra
code-space for functions that do not actually contain loops (for functions
that contain loops 3 bytes is saved intead)

One alternative would have to place the code after the function, if it does
contain a loop, then update the relative jumps to point to the code.

That is left for later.

29:    } \    } while(0)    +  + void amd64_start_function(int no_pc); + void amd64_end_function(int no_pc); +  + #define START_NEW_FUNCTION amd64_start_function + #define END_FUNCTION amd64_end_function +    void amd64_ins_entry(void);   #define INS_ENTRY() amd64_ins_entry()   /* Size of the prologue added by INS_ENTRY() (in PIKE_OPCODE_T's). */