(flag_want_pic): New variable, mostly ignored.

(md_parse_option) [TE_SUN3]: Set it for "-k".
(m68k_ip): Generate proper fixup for mode 7.3.
This commit is contained in:
Ken Raeburn
1993-09-27 03:55:33 +00:00
parent eafdb69561
commit b80d39a01c

View File

@ -81,6 +81,11 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
const int md_reloc_size = 8; /* Size of relocation record */ const int md_reloc_size = 8; /* Size of relocation record */
/* Are we trying to generate PIC code? If so, absolute references
ought to be made PC-relative. They aren't yet, but we can parse
the option now so the user doesn't get an error... */
int flag_want_pic;
/* Its an arbitrary name: This means I don't approve of it */ /* Its an arbitrary name: This means I don't approve of it */
/* See flames below */ /* See flames below */
static struct obstack robyn; static struct obstack robyn;
@ -2273,9 +2278,15 @@ m68k_ip (instring)
{ {
if (opP->reg == PC) if (opP->reg == PC)
{ {
#if 0
add_frag (adds (opP->con1), add_frag (adds (opP->con1),
offs (opP->con1) + 2, offs (opP->con1) + 2,
TAB (PCLEA, SZ_UNDEF)); TAB (PCLEA, SZ_UNDEF));
#else
addword (0x0170);
add_fix ('l', opP->con1, 0);
addword (0), addword (0);
#endif
break; break;
} }
else else
@ -4863,6 +4874,8 @@ s_proc (ignore)
* so don't use or document it, but that's the way the parsing * so don't use or document it, but that's the way the parsing
* works). * works).
* *
* -k Ignored for now. (Sun 3 only. Indicates PIC.)
*
* MAYBE_FLOAT_TOO is defined below so that specifying a processor type * MAYBE_FLOAT_TOO is defined below so that specifying a processor type
* (e.g. m68020) also requests that float instructions be included. This * (e.g. m68020) also requests that float instructions be included. This
* is the default setup, mostly to avoid hassling users. A better * is the default setup, mostly to avoid hassling users. A better
@ -4890,6 +4903,12 @@ md_parse_option (argP, cntP, vecP)
jsr's. */ jsr's. */
break; break;
#ifdef TE_SUN3
case 'k':
flag_want_pic = 1;
break;
#endif
case 'A': case 'A':
(*argP)++; (*argP)++;
/* intentional fall-through */ /* intentional fall-through */