mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-25 09:30:58 +00:00
68K: get -mpcrel to work (for tiny programs)
This commit is contained in:
parent
45bf39e1f7
commit
21ec187812
@ -633,6 +633,8 @@ m68k_option_override (void)
|
|||||||
clear how intentional that is. */
|
clear how intentional that is. */
|
||||||
flag_no_function_cse = 1;
|
flag_no_function_cse = 1;
|
||||||
}
|
}
|
||||||
|
else if(TARGET_PCREL)
|
||||||
|
m68k_symbolic_call_var = M68K_SYMBOLIC_CALL_BSRW_C;
|
||||||
|
|
||||||
switch (m68k_symbolic_call_var)
|
switch (m68k_symbolic_call_var)
|
||||||
{
|
{
|
||||||
@ -648,6 +650,10 @@ m68k_option_override (void)
|
|||||||
m68k_symbolic_call = "bsr%.l %p0";
|
m68k_symbolic_call = "bsr%.l %p0";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case M68K_SYMBOLIC_CALL_BSRW_C:
|
||||||
|
m68k_symbolic_call = "bsr%.w %c0";
|
||||||
|
break;
|
||||||
|
|
||||||
case M68K_SYMBOLIC_CALL_NONE:
|
case M68K_SYMBOLIC_CALL_NONE:
|
||||||
gcc_assert (m68k_symbolic_call == NULL);
|
gcc_assert (m68k_symbolic_call == NULL);
|
||||||
break;
|
break;
|
||||||
|
@ -971,7 +971,8 @@ extern const char *m68k_symbolic_call;
|
|||||||
extern const char *m68k_symbolic_jump;
|
extern const char *m68k_symbolic_jump;
|
||||||
|
|
||||||
enum M68K_SYMBOLIC_CALL { M68K_SYMBOLIC_CALL_NONE, M68K_SYMBOLIC_CALL_JSR,
|
enum M68K_SYMBOLIC_CALL { M68K_SYMBOLIC_CALL_NONE, M68K_SYMBOLIC_CALL_JSR,
|
||||||
M68K_SYMBOLIC_CALL_BSR_C, M68K_SYMBOLIC_CALL_BSR_P };
|
M68K_SYMBOLIC_CALL_BSR_C, M68K_SYMBOLIC_CALL_BSR_P,
|
||||||
|
M68K_SYMBOLIC_CALL_BSRW_C };
|
||||||
|
|
||||||
extern enum M68K_SYMBOLIC_CALL m68k_symbolic_call_var;
|
extern enum M68K_SYMBOLIC_CALL m68k_symbolic_call_var;
|
||||||
|
|
||||||
|
@ -6938,7 +6938,8 @@
|
|||||||
;; Operand 2 not really used on the m68000.
|
;; Operand 2 not really used on the m68000.
|
||||||
"!SIBLING_CALL_P (insn)
|
"!SIBLING_CALL_P (insn)
|
||||||
&& (m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_C
|
&& (m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_C
|
||||||
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_P)"
|
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_P
|
||||||
|
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSRW_C)"
|
||||||
{
|
{
|
||||||
operands[0] = operands[1];
|
operands[0] = operands[1];
|
||||||
return output_call (operands[0]);
|
return output_call (operands[0]);
|
||||||
@ -6986,7 +6987,8 @@
|
|||||||
;; Operand 2 not really used on the m68000.
|
;; Operand 2 not really used on the m68000.
|
||||||
"!SIBLING_CALL_P (insn)
|
"!SIBLING_CALL_P (insn)
|
||||||
&& (m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_C
|
&& (m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_C
|
||||||
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_P)"
|
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSR_P
|
||||||
|
|| m68k_symbolic_call_var == M68K_SYMBOLIC_CALL_BSRW_C)"
|
||||||
{
|
{
|
||||||
operands[0] = operands[1];
|
operands[0] = operands[1];
|
||||||
return output_call (operands[0]);
|
return output_call (operands[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user