Permalink
Browse files

Merge pull request #1774 from braddr/cleanup-got

remove dead got related code
  • Loading branch information...
2 parents ab1890a + 0fc35d8 commit fcc8c5cc810c89b2a81d58c44e6394dd84d9b0f2 @MartinNowak MartinNowak committed Mar 20, 2013
Showing with 0 additions and 39 deletions.
  1. +0 −39 src/backend/cod3.c
View
39 src/backend/cod3.c
@@ -737,25 +737,13 @@ void outblkexitcode(block *bl, code*& c, int& anyspill, const char* sflsave, sym
// Mark all registers as destroyed. This will prevent
// register assignments to variables used in catch blocks.
c = cat(c,getregs((I32 | I64) ? allregs : (ALLREGS | mES)));
-#if 0 && TARGET_LINUX
- if (config.flags3 & CFG3pic && !(allregs & mBX))
- {
- c = cat(c, cod3_load_got());
- }
-#endif
goto case_goto;
#endif
#if SCPP
case BCcatch:
// Mark all registers as destroyed. This will prevent
// register assignments to variables used in catch blocks.
c = cat(c,getregs(allregs | mES));
-#if 0 && TARGET_LINUX
- if (config.flags3 & CFG3pic && !(allregs & mBX))
- {
- c = cat(c, cod3_load_got());
- }
-#endif
goto case_goto;
case BCtry:
@@ -3602,33 +3590,6 @@ targ_size_t cod3_spoff()
return spoff + localsize;
}
-/**********************************
- * Load value of _GLOBAL_OFFSET_TABLE_ into EBX
- */
-
-code *cod3_load_got()
-{
-#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
- code *c;
- code *cgot;
-
- c = genc2(NULL,CALL,0,0); // CALL L1
- gen1(c, 0x58 + BX); // L1: POP EBX
-
- // ADD EBX,_GLOBAL_OFFSET_TABLE_+3
- symbol *gotsym = Obj::getGOTsym();
- cgot = gencs(CNIL,0x81,0xC3,FLextern,gotsym);
- cgot->Iflags = CFoff;
- cgot->IEVoffset2 = 3;
-
- makeitextern(gotsym);
- return cat(c,cgot);
-#else
- assert(0);
- return NULL;
-#endif
-}
-
code* gen_spill_reg(Symbol* s, bool toreg)
{
code *c;

0 comments on commit fcc8c5c

Please sign in to comment.