Commit 7509c759 by Michael Meissner

Small data support; Windows NT attributes; windows NT call indrect fix

From-SVN: r11093
parent 8b4f9969
...@@ -77,13 +77,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -77,13 +77,7 @@ Boston, MA 02111-1307, USA. */
} }
#undef LINK_SPEC #undef LINK_SPEC
#ifndef CROSS_COMPILE
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\ #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso -bI:/lib/syscalls.exp} %{!shared: %{g*:-bexport:/usr/lib/libg.exp}}\ %{static:-bnso %(link_syscalls) } %{!shared: %{g*: %(link_libg) }}\
%{shared:-bM:SRE}" %{shared:-bM:SRE}"
#else
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso} \
%{shared:-bM:SRE}"
#endif
...@@ -68,6 +68,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -68,6 +68,10 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES \ #define CPP_PREDEFINES \
"-DPPC -D__embedded__ -Asystem(embedded) -Acpu(powerpc) -Amachine(powerpc)" "-DPPC -D__embedded__ -Asystem(embedded) -Acpu(powerpc) -Amachine(powerpc)"
/* Clue the simulator in to use netbsd */
#undef LINK_START_SPEC
#define LINK_START_SPEC "%{msim: %{!Ttext*: -Ttext 0x10000000}}"
/* Use the simulator crt0 or mvme and libgloss/newlib libraries if desired */ /* Use the simulator crt0 or mvme and libgloss/newlib libraries if desired */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s \ #define STARTFILE_SPEC "crti.o%s \
......
...@@ -37,4 +37,4 @@ Boston, MA 02111-1307, USA. */ ...@@ -37,4 +37,4 @@ Boston, MA 02111-1307, USA. */
`MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
#undef MULTILIB_DEFAULTS #undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mbig", "mbig-endian", "mcall-aix" } #define MULTILIB_DEFAULTS { "mbig", "mbig-endian", "mcall-aix", "mno-sdata" }
...@@ -41,4 +41,4 @@ Boston, MA 02111-1307, USA. */ ...@@ -41,4 +41,4 @@ Boston, MA 02111-1307, USA. */
`MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
#undef MULTILIB_DEFAULTS #undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mlittle", "mlittle-endian", "mcall-sysv" } #define MULTILIB_DEFAULTS { "mlittle", "mlittle-endian", "mcall-sysv", "mno-sdata" }
...@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */
#define CPP_PREDEFINES \ #define CPP_PREDEFINES \
"-DPPC -D__embedded__ -D__simulator__ -Asystem(embedded) -Asystem(simulator) -Acpu(powerpc) -Amachine(powerpc)" "-DPPC -D__embedded__ -D__simulator__ -Asystem(embedded) -Asystem(simulator) -Acpu(powerpc) -Amachine(powerpc)"
/* Clue the simulator in to use netbsd */
#undef LINK_START_SPEC
#define LINK_START_SPEC "%{!mmvme: %{!Ttext*: -Ttext 0x10000000}}"
/* Use the simulator crt0 or mvme and libgloss/newlib libraries if desired */ /* Use the simulator crt0 or mvme and libgloss/newlib libraries if desired */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s \ #define STARTFILE_SPEC "crti.o%s \
......
...@@ -140,6 +140,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -140,6 +140,10 @@ Boston, MA 02111-1307, USA. */
Do not define this macro if it does not need to do anything. */ Do not define this macro if it does not need to do anything. */
#ifndef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS
#endif
#define EXTRA_SPECS \ #define EXTRA_SPECS \
{ "cpp_cpu", CPP_CPU_SPEC }, \ { "cpp_cpu", CPP_CPU_SPEC }, \
{ "cpp_default", CPP_DEFAULT_SPEC }, \ { "cpp_default", CPP_DEFAULT_SPEC }, \
...@@ -147,7 +151,36 @@ Boston, MA 02111-1307, USA. */ ...@@ -147,7 +151,36 @@ Boston, MA 02111-1307, USA. */
{ "cpp_sysv_default", CPP_SYSV_DEFAULT_SPEC }, \ { "cpp_sysv_default", CPP_SYSV_DEFAULT_SPEC }, \
{ "cpp_endian", CPP_ENDIAN_SPEC }, \ { "cpp_endian", CPP_ENDIAN_SPEC }, \
{ "asm_cpu", ASM_CPU_SPEC }, \ { "asm_cpu", ASM_CPU_SPEC }, \
{ "asm_default", ASM_DEFAULT_SPEC } { "asm_default", ASM_DEFAULT_SPEC }, \
{ "link_syscalls", LINK_SYSCALLS_SPEC }, \
{ "link_libg", LINK_LIBG_SPEC }, \
{ "link_path", LINK_PATH_SPEC }, \
{ "link_start", LINK_START_SPEC }, \
SUBTARGET_EXTRA_SPECS
/* Default paths to give linker under V.4 */
#ifndef LINK_PATH_SPEC
#define LINK_PATH_SPEC ""
#endif
/* Default location of syscalls.exp under AIX */
#ifndef CROSS_COMPILE
#define LINK_SYSCALLS_SPEC "-bI:/lib/syscalls.exp"
#else
#define LINK_SYSCALLS_SPEC ""
#endif
/* Default location of libg.exp under AIX */
#ifndef CROSS_COMPILE
#define LINK_LIBG_SPEC "-bexport:/usr/lib/libg.exp"
#else
#define LINK_LIBG_SPEC ""
#endif
/* Default starting address if specified */
#ifndef LINK_START_SPEC
#define LINK_START_SPEC ""
#endif
/* Define the options for the binder: Start text at 512, align all segments /* Define the options for the binder: Start text at 512, align all segments
to 512 bytes, and warn if there is text relocation. to 512 bytes, and warn if there is text relocation.
...@@ -163,15 +196,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -163,15 +196,9 @@ Boston, MA 02111-1307, USA. */
that to actually build a shared library you will also need to specify an that to actually build a shared library you will also need to specify an
export list with the -Wl,-bE option. */ export list with the -Wl,-bE option. */
#ifndef CROSS_COMPILE
#define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
%{static:-bnso} \
%{shared:-bM:SRE}"
#else
#define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\ #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
%{static:-bnso -bI:/lib/syscalls.exp} \ %{static:-bnso %(link_syscalls) } \
%{!shared:%{g*:-bexport:/usr/lib/libg.exp}} %{shared:-bM:SRE}" %{!shared:%{g*: %(link_libg) }} %{shared:-bM:SRE}"
#endif
/* Profiled library versions are used by linking with special directories. */ /* Profiled library versions are used by linking with special directories. */
#define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\ #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
...@@ -1206,13 +1233,24 @@ extern int rs6000_sysv_varargs_p; ...@@ -1206,13 +1233,24 @@ extern int rs6000_sysv_varargs_p;
/* Minimum and maximum floating point registers used to hold arguments. */ /* Minimum and maximum floating point registers used to hold arguments. */
#define FP_ARG_MIN_REG 33 #define FP_ARG_MIN_REG 33
#define FP_ARG_MAX_REG 45 #define FP_ARG_AIX_MAX_REG 45
#define FP_ARG_V4_MAX_REG 40
#define FP_ARG_MAX_REG FP_ARG_AIX_MAX_REG
#define FP_ARG_NUM_REG (FP_ARG_MAX_REG - FP_ARG_MIN_REG + 1) #define FP_ARG_NUM_REG (FP_ARG_MAX_REG - FP_ARG_MIN_REG + 1)
/* Return registers */ /* Return registers */
#define GP_ARG_RETURN GP_ARG_MIN_REG #define GP_ARG_RETURN GP_ARG_MIN_REG
#define FP_ARG_RETURN FP_ARG_MIN_REG #define FP_ARG_RETURN FP_ARG_MIN_REG
/* Flags for the call/call_value rtl operations set up by function_arg */
enum rs6000_call_cookie
{
CALL_V4_SET_FP_ARGS = -1, /* V4, FP args passed */
CALL_NORMAL = 0, /* no special processing */
CALL_V4_CLEAR_FP_ARGS = 1, /* V4, no FP args passed */
CALL_NT_DLLIMPORT = 2 /* NT, this is a DLL import call */
};
/* Define cutoff for using external functions to save floating point */ /* Define cutoff for using external functions to save floating point */
#define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) == 62 || (FIRST_REG) == 63) #define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) == 62 || (FIRST_REG) == 63)
...@@ -1246,12 +1284,13 @@ extern int rs6000_sysv_varargs_p; ...@@ -1246,12 +1284,13 @@ extern int rs6000_sysv_varargs_p;
typedef struct rs6000_args typedef struct rs6000_args
{ {
int words; /* # words uses for passing GP registers */ int words; /* # words uses for passing GP registers */
int fregno; /* next available FP register */ int fregno; /* next available FP register */
int nargs_prototype; /* # args left in the current prototype */ int nargs_prototype; /* # args left in the current prototype */
int orig_nargs; /* Original value of nargs_prototype */ int orig_nargs; /* Original value of nargs_prototype */
int varargs_offset; /* offset of the varargs save area */ int varargs_offset; /* offset of the varargs save area */
int prototype; /* Whether a prototype was defined */ int prototype; /* Whether a prototype was defined */
enum rs6000_call_cookie call_cookie; /* Do special things for this call */
} CUMULATIVE_ARGS; } CUMULATIVE_ARGS;
/* Define intermediate macro to compute the size (in registers) of an argument /* Define intermediate macro to compute the size (in registers) of an argument
...@@ -1423,6 +1462,35 @@ typedef struct rs6000_args ...@@ -1423,6 +1462,35 @@ typedef struct rs6000_args
#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \
rs6000_initialize_trampoline (ADDR, FNADDR, CXT) rs6000_initialize_trampoline (ADDR, FNADDR, CXT)
/* If defined, a C expression whose value is nonzero if IDENTIFIER
with arguments ARGS is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */
#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \
(rs6000_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS))
/* If defined, a C expression whose value is nonzero if IDENTIFIER
with arguments ARGS is a valid machine specific attribute for TYPE.
The attributes in ATTRIBUTES have previously been assigned to TYPE. */
#define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, NAME, ARGS) \
(rs6000_valid_type_attribute_p (TYPE, ATTRIBUTES, NAME, ARGS))
/* If defined, a C expression whose value is zero if the attributes on
TYPE1 and TYPE2 are incompatible, one if they are compatible, and
two if they are nearly compatible (which causes a warning to be
generated). */
#define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
(rs6000_comp_type_attributes (TYPE1, TYPE2))
/* If defined, a C statement that assigns default attributes to newly
defined TYPE. */
#define SET_DEFAULT_TYPE_ATTRIBUTES(TYPE) \
(rs6000_set_default_type_attributes (TYPE))
/* Definitions for __builtin_return_address and __builtin_frame_address. /* Definitions for __builtin_return_address and __builtin_frame_address.
__builtin_return_address (0) should give link register (65), enable __builtin_return_address (0) should give link register (65), enable
this. */ this. */
...@@ -1618,6 +1686,9 @@ typedef struct rs6000_args ...@@ -1618,6 +1686,9 @@ typedef struct rs6000_args
&& GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \ && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT \
&& LEGITIMATE_CONSTANT_POOL_BASE_P (XEXP (XEXP (X, 0), 0)))) && LEGITIMATE_CONSTANT_POOL_BASE_P (XEXP (XEXP (X, 0), 0))))
#define LEGITIMATE_SMALL_DATA_P(MODE, X) \
(DEFAULT_ABI == ABI_V4 && small_data_operand (X, MODE))
#define LEGITIMATE_ADDRESS_INTEGER_P(X,OFFSET) \ #define LEGITIMATE_ADDRESS_INTEGER_P(X,OFFSET) \
(GET_CODE (X) == CONST_INT \ (GET_CODE (X) == CONST_INT \
&& (unsigned) (INTVAL (X) + (OFFSET) + 0x8000) < 0x10000) && (unsigned) (INTVAL (X) + (OFFSET) + 0x8000) < 0x10000)
...@@ -1658,6 +1729,8 @@ typedef struct rs6000_args ...@@ -1658,6 +1729,8 @@ typedef struct rs6000_args
if ((GET_CODE (X) == PRE_INC || GET_CODE (X) == PRE_DEC) \ if ((GET_CODE (X) == PRE_INC || GET_CODE (X) == PRE_DEC) \
&& LEGITIMATE_INDIRECT_ADDRESS_P (XEXP (X, 0))) \ && LEGITIMATE_INDIRECT_ADDRESS_P (XEXP (X, 0))) \
goto ADDR; \ goto ADDR; \
if (LEGITIMATE_SMALL_DATA_P (MODE, X)) \
goto ADDR; \
if (LEGITIMATE_CONSTANT_POOL_ADDRESS_P (X)) \ if (LEGITIMATE_CONSTANT_POOL_ADDRESS_P (X)) \
goto ADDR; \ goto ADDR; \
if (LEGITIMATE_OFFSET_ADDRESS_P (MODE, X)) \ if (LEGITIMATE_OFFSET_ADDRESS_P (MODE, X)) \
...@@ -2434,7 +2507,7 @@ toc_section () \ ...@@ -2434,7 +2507,7 @@ toc_section () \
`assemble_name' uses this. */ `assemble_name' uses this. */
#define ASM_OUTPUT_LABELREF(FILE,NAME) \ #define ASM_OUTPUT_LABELREF(FILE,NAME) \
fprintf (FILE, NAME) fputs (NAME, FILE)
/* This is how to output an internal numbered label where /* This is how to output an internal numbered label where
PREFIX is the class of label and NUM is the number within the class. */ PREFIX is the class of label and NUM is the number within the class. */
...@@ -2729,6 +2802,7 @@ extern int lwa_operand (); ...@@ -2729,6 +2802,7 @@ extern int lwa_operand ();
extern int call_operand (); extern int call_operand ();
extern int current_file_function_operand (); extern int current_file_function_operand ();
extern int input_operand (); extern int input_operand ();
extern int small_data_operand ();
extern void init_cumulative_args (); extern void init_cumulative_args ();
extern void function_arg_advance (); extern void function_arg_advance ();
extern int function_arg_boundary (); extern int function_arg_boundary ();
...@@ -2766,3 +2840,8 @@ extern int rs6000_adjust_cost (); ...@@ -2766,3 +2840,8 @@ extern int rs6000_adjust_cost ();
extern void rs6000_trampoline_template (); extern void rs6000_trampoline_template ();
extern int rs6000_trampoline_size (); extern int rs6000_trampoline_size ();
extern void rs6000_initialize_trampoline (); extern void rs6000_initialize_trampoline ();
extern int rs6000_comp_type_attributes ();
extern int rs6000_valid_decl_attribute_p ();
extern int rs6000_valid_type_attribute_p ();
extern void rs6000_set_default_type_attributes ();
extern struct rtx_def *rs6000_dll_import_ref ();
...@@ -6405,6 +6405,15 @@ ...@@ -6405,6 +6405,15 @@
abort (); abort ();
operands[0] = XEXP (operands[0], 0); operands[0] = XEXP (operands[0], 0);
/* Convert NT DLL imports into an indirect call. */
if (GET_CODE (operands[0]) == SYMBOL_REF
&& INTVAL (operands[2]) == (int)CALL_NT_DLLIMPORT)
{
operands[0] = rs6000_dll_import_ref (operands[0]);
operands[2] = GEN_INT ((int)CALL_NORMAL);
}
if (GET_CODE (operands[0]) != SYMBOL_REF) if (GET_CODE (operands[0]) != SYMBOL_REF)
{ {
if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_AIX_NODESC) if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_AIX_NODESC)
...@@ -6426,6 +6435,7 @@ ...@@ -6426,6 +6435,7 @@
else if (DEFAULT_ABI == ABI_NT) else if (DEFAULT_ABI == ABI_NT)
{ {
/* NT function pointers are really pointers to a two word area */ /* NT function pointers are really pointers to a two word area */
rs6000_save_toc_p = 1;
emit_call_insn (gen_call_indirect_nt (force_reg (Pmode, operands[0]), emit_call_insn (gen_call_indirect_nt (force_reg (Pmode, operands[0]),
operands[1], operands[2], operands[1], operands[2],
toc_addr, toc_reg)); toc_addr, toc_reg));
...@@ -6450,6 +6460,15 @@ ...@@ -6450,6 +6460,15 @@
abort (); abort ();
operands[1] = XEXP (operands[1], 0); operands[1] = XEXP (operands[1], 0);
/* Convert NT DLL imports into an indirect call. */
if (GET_CODE (operands[1]) == SYMBOL_REF
&& INTVAL (operands[3]) == (int)CALL_NT_DLLIMPORT)
{
operands[1] = rs6000_dll_import_ref (operands[1]);
operands[3] = GEN_INT ((int)CALL_NORMAL);
}
if (GET_CODE (operands[1]) != SYMBOL_REF) if (GET_CODE (operands[1]) != SYMBOL_REF)
{ {
if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_AIX_NODESC) if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_AIX_NODESC)
...@@ -6472,6 +6491,7 @@ ...@@ -6472,6 +6491,7 @@
else if (DEFAULT_ABI == ABI_NT) else if (DEFAULT_ABI == ABI_NT)
{ {
/* NT function pointers are really pointers to a two word area */ /* NT function pointers are really pointers to a two word area */
rs6000_save_toc_p = 1;
emit_call_insn (gen_call_value_indirect_nt (operands[0], emit_call_insn (gen_call_value_indirect_nt (operands[0],
force_reg (Pmode, operands[1]), force_reg (Pmode, operands[1]),
operands[2], operands[3], operands[2], operands[3],
...@@ -6498,11 +6518,11 @@ ...@@ -6498,11 +6518,11 @@
"" ""
"* "*
{ {
if (INTVAL (operands[2]) > 0) switch ((enum rs6000_call_cookie)INTVAL (operands[2]))
return \"creqv 6,6,6\;bl %z0\"; {
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
else if (INTVAL (operands[2]) < 0) case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
return \"crxor 6,6,6\;bl %z0\"; }
return \"bl %z0\"; return \"bl %z0\";
}" }"
...@@ -6523,16 +6543,16 @@ ...@@ -6523,16 +6543,16 @@
"DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT" "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT"
"* "*
{ {
if (INTVAL (operands[2]) > 0)
output_asm_insn (\"creqv 6,6,6\", operands);
else if (INTVAL (operands[2]) < 0)
output_asm_insn (\"crxor 6,6,6\", operands);
/* Indirect calls should go through call_indirect */ /* Indirect calls should go through call_indirect */
if (GET_CODE (operands[0]) == REG) if (GET_CODE (operands[0]) == REG)
abort (); abort ();
switch ((enum rs6000_call_cookie)INTVAL (operands[2]))
{
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
}
return (TARGET_WINDOWS_NT) ? \"bl %z0\;.znop %z0\" : \"bl %z0\;%.\"; return (TARGET_WINDOWS_NT) ? \"bl %z0\;.znop %z0\" : \"bl %z0\;%.\";
}" }"
[(set_attr "length" "8,12")]) [(set_attr "length" "8,12")])
...@@ -6545,16 +6565,16 @@ ...@@ -6545,16 +6565,16 @@
"DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4" "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4"
"* "*
{ {
if (INTVAL (operands[2]) > 0)
output_asm_insn (\"creqv 6,6,6\", operands);
else if (INTVAL (operands[2]) < 0)
output_asm_insn (\"crxor 6,6,6\", operands);
/* Indirect calls should go through call_indirect */ /* Indirect calls should go through call_indirect */
if (GET_CODE (operands[0]) == REG) if (GET_CODE (operands[0]) == REG)
abort (); abort ();
switch ((enum rs6000_call_cookie)INTVAL (operands[2]))
{
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
}
return \"bl %z0\"; return \"bl %z0\";
}" }"
[(set_attr "length" "4,8")]) [(set_attr "length" "4,8")])
...@@ -6568,11 +6588,11 @@ ...@@ -6568,11 +6588,11 @@
"" ""
"* "*
{ {
if (INTVAL (operands[3]) > 0) switch ((enum rs6000_call_cookie)INTVAL (operands[3]))
return \"creqv 6,6,6\;bl %z1\"; {
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
else if (INTVAL (operands[3]) < 0) case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
return \"crxor 6,6,6\;bl %z1\"; }
return \"bl %z1\"; return \"bl %z1\";
}" }"
...@@ -6587,16 +6607,16 @@ ...@@ -6587,16 +6607,16 @@
"DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT" "DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT"
"* "*
{ {
if (INTVAL (operands[3]) > 0)
output_asm_insn (\"creqv 6,6,6\", operands);
else if (INTVAL (operands[3]) < 0)
output_asm_insn (\"crxor 6,6,6\", operands);
/* This should be handled by call_value_indirect */ /* This should be handled by call_value_indirect */
if (GET_CODE (operands[1]) == REG) if (GET_CODE (operands[1]) == REG)
abort (); abort ();
switch ((enum rs6000_call_cookie)INTVAL (operands[3]))
{
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
}
return (TARGET_WINDOWS_NT) ? \"bl %z1\;.znop %z1\" : \"bl %z1\;%.\"; return (TARGET_WINDOWS_NT) ? \"bl %z1\;.znop %z1\" : \"bl %z1\;%.\";
}" }"
[(set_attr "length" "8,12")]) [(set_attr "length" "8,12")])
...@@ -6610,16 +6630,16 @@ ...@@ -6610,16 +6630,16 @@
"DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4" "DEFAULT_ABI == ABI_AIX_NODESC || DEFAULT_ABI == ABI_V4"
"* "*
{ {
if (INTVAL (operands[3]) > 0)
output_asm_insn (\"creqv 6,6,6\", operands);
else if (INTVAL (operands[3]) < 0)
output_asm_insn (\"crxor 6,6,6\", operands);
/* This should be handled by call_value_indirect */ /* This should be handled by call_value_indirect */
if (GET_CODE (operands[1]) == REG) if (GET_CODE (operands[1]) == REG)
abort (); abort ();
switch ((enum rs6000_call_cookie)INTVAL (operands[3]))
{
case CALL_V4_SET_FP_ARGS: output_asm_insn (\"crxor 6,6,6\", operands); break;
case CALL_V4_CLEAR_FP_ARGS: output_asm_insn (\"creqv 6,6,6\", operands); break;
}
return \"bl %z1\"; return \"bl %z1\";
}" }"
[(set_attr "length" "4,8")]) [(set_attr "length" "4,8")])
......
...@@ -42,4 +42,4 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,4 +42,4 @@ Boston, MA 02111-1307, USA. */
`MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */ `MULTILIB_OPTIONS' are set by default. *Note Target Fragment::. */
#undef MULTILIB_DEFAULTS #undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "mlittle", "mlittle-endian", "mcall-sysv" } #define MULTILIB_DEFAULTS { "mlittle", "mlittle-endian", "mcall-sysv", "mno-sdata" }
...@@ -19,11 +19,11 @@ fp-bit.c: $(srcdir)/config/fp-bit.c ...@@ -19,11 +19,11 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
MULTILIB_OPTIONS = msoft-float \ MULTILIB_OPTIONS = msoft-float \
mlittle/mbig \ mlittle/mbig \
mcall-sysv/mcall-aix/mcall-aixdesc mcall-sysv/mcall-aix # /mcall-aixdesc
MULTILIB_DIRNAMES = soft-float \ MULTILIB_DIRNAMES = soft-float \
little big \ little big \
sysv aix aixdesc sysv aix # aixdesc
MULTILIB_MATCHES = mlittle=mlittle-endian \ MULTILIB_MATCHES = mlittle=mlittle-endian \
mbig=mbig-endian \ mbig=mbig-endian \
...@@ -31,7 +31,7 @@ MULTILIB_MATCHES = mlittle=mlittle-endian \ ...@@ -31,7 +31,7 @@ MULTILIB_MATCHES = mlittle=mlittle-endian \
msoft-float=mcpu?821 \ msoft-float=mcpu?821 \
msoft-float=mcpu?860 msoft-float=mcpu?860
MULTILIB_EXCEPTIONS = *mlittle/*mcall-aixdesc* #MULTILIB_EXCEPTIONS = *mlittle/*mcall-aixdesc*
LIBGCC = stmp-multilib LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib INSTALL_LIBGCC = install-multilib
...@@ -45,8 +45,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -45,8 +45,8 @@ Boston, MA 02111-1307, USA. */
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \ #define LIB_SPEC "%{mwindows:-subsystem:windows -entry:WinMainCRTStartup \
USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \ USER32.LIB GDI32.LIB COMDLG32.LIB WINSPOOL.LIB} \
%{!mwindows:-subsystem:console -entry:mainCRTStartup} \ %{!mwindows:-subsystem console -e mainCRTStartup} \
%{mcrtmt:LIBCMT.LIB KERNEL32.LIB} %{!mcrtmt:LIBC.LIB KERNEL32.LIB} \ %{mcrtmt:LIBCMT.LIB KERNEL32.LIB} %{!mcrtmt:-lkernel32 -lcygwin} \
%{v}" %{v}"
#undef LINK_SPEC #undef LINK_SPEC
...@@ -249,6 +249,19 @@ toc_section () \ ...@@ -249,6 +249,19 @@ toc_section () \
fprintf (FILE, "\t.ualong .."); \ fprintf (FILE, "\t.ualong .."); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fprintf (FILE, ",.toc\n"); \ fprintf (FILE, ",.toc\n"); \
\
if (lookup_attribute ("dllexport", \
TYPE_ATTRIBUTES (TREE_TYPE (DECL)))) \
{ \
fprintf (FILE, "\t.globl __imp_"); \
assemble_name (FILE, NAME); \
fprintf (FILE, "\n__imp_"); \
assemble_name (FILE, NAME); \
fprintf (FILE, ":\n\t.ulong "); \
assemble_name (FILE, NAME); \
fprintf (FILE, "\n"); \
} \
\
fprintf (FILE, "\t.section .text\n\t.align 2\n.."); \ fprintf (FILE, "\t.section .text\n\t.align 2\n.."); \
assemble_name (FILE, NAME); \ assemble_name (FILE, NAME); \
fprintf (FILE, ":\n"); \ fprintf (FILE, ":\n"); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment