Permalink
Browse files

move platform specific code out of generic code

  • Loading branch information...
1 parent 42a62af commit ee2fe6737aa136acefa87bb86df66e8799a7b796 @braddr committed Apr 16, 2012
Showing with 16 additions and 15 deletions.
  1. +0 −15 src/backend/cgcod.c
  2. +15 −0 src/backend/cod3.c
  3. +1 −0 src/backend/code.h
View
@@ -1987,21 +1987,6 @@ if (regcon.cse.mval & 1) elem_print(regcon.cse.value[i]);
* pointer to the MOV instruction
*/
-code* gen_loadcse(unsigned reg, targ_uns i)
-{
- code* c = getregs(mask[reg]);
- unsigned op = 0x8B;
- if (reg == ES)
- {
- op = 0x8E;
- reg = 0;
- }
- c = genc1(c,op,modregxrm(2,reg,BPRM),FLcs,i);
- if (I64)
- code_orrex(c, REX_W);
- return c;
-}
-
STATIC code * loadcse(elem *e,unsigned reg,regm_t regm)
{ unsigned i,op;
code *c;
View
@@ -1689,6 +1689,21 @@ bool cse_simple(code *c, elem *e)
return false;
}
+code* gen_loadcse(unsigned reg, targ_uns i)
+{
+ code* c = getregs(mask[reg]);
+ unsigned op = 0x8B;
+ if (reg == ES)
+ {
+ op = 0x8E;
+ reg = 0;
+ }
+ c = genc1(c,op,modregxrm(2,reg,BPRM),FLcs,i);
+ if (I64)
+ code_orrex(c, REX_W);
+ return c;
+}
+
/***************************************
* Gen code for OPframeptr
*/
View
@@ -692,6 +692,7 @@ code *getregs (regm_t r );
code *getregs_imm (regm_t r );
code *cse_flush(int);
bool cse_simple(code *c, elem *e);
+code* gen_loadcse(unsigned reg, targ_uns i);
void cssave (elem *e , regm_t regm , unsigned opsflag );
bool evalinregister (elem *e );
regm_t getscratch();

0 comments on commit ee2fe67

Please sign in to comment.