Commit Graph

89 Commits

Author SHA1 Message Date
Richard Earnshaw
c5c4723a41 (peepholes for call followed by branch): Disable.
From-SVN: r8335
1994-10-24 10:13:12 +00:00
Richard Earnshaw
43fd2cce9a (INSTALL): Invoke install.sh with -c flag
From-SVN: r8334
1994-10-23 12:54:15 +00:00
Richard Earnshaw
ca628c540b Initial revision
From-SVN: r8270
1994-10-14 14:35:17 +00:00
Richard Earnshaw
6cda9f97bc Define HAVE_GETWD
From-SVN: r8269
1994-10-14 14:33:55 +00:00
Richard Earnshaw
660f1419f4 (reload_outdf): Don't emit an add insn if the address is just a register.
From-SVN: r8244
1994-10-09 16:39:43 +00:00
Richard Earnshaw
988337ca70 (zero_extendhisi2, extendhisi2): Expand to suitable byte sequence when TARGET_SHORT_BYTES and loading a mem.
(zero_extendhisi2, extendhisi2): Expand to suitable byte sequence when
TARGET_SHORT_BYTES and loading a mem.
(movhi_bytes, extendhisi2_mem): New expands.
(movhi): Call movhi_bytes to load a short from memory if
TARGET_SHORT_BY_BYTES.
(all matchers loading a short from memory): Don't match if
TARGET_SHORT_BY_BYTES.
(matcher for movhi when TARGET_SHORT_BY_BYTES): New pattern to cover
remaining legal cases.

From-SVN: r8202
1994-10-02 15:11:02 +00:00
Richard Earnshaw
0a81f50004 (arm_reload_in_hi): New function.
From-SVN: r8201
1994-10-02 15:10:48 +00:00
Richard Earnshaw
2ce9c1b9e1 (TARGET_SHORT_BY_BYTES): New macro.
(TARGET_SWITCHES): Recognize switches -m[no-]short-load-bytes.
(TARGET_DEFAULT): Only define if not already done so.
(PROMOTE_MODE): Promote HImode unsigned if TARGET_SHORT_BY_BYTES.
(SECONDARY_INPUT_RELOAD_CLASS): Need a scratch for reloading HImode if
TARGET_SHORT_BY_BYTES.

From-SVN: r8200
1994-10-02 15:10:27 +00:00
Richard Earnshaw
0b9d35ddc1 (movsf): If reloading, create a scratch from the target for loading a constant into integer regs.
(movsf): If reloading, create a scratch from the target for loading a
constant into integer regs.
(movdf): Likewise..

From-SVN: r8199
1994-10-02 14:25:07 +00:00
Richard Earnshaw
1f8197a899 ({save,restore}_stack_nonlocal): Delete.
From-SVN: r7754
1994-07-13 01:07:30 +00:00
Richard Earnshaw
688743e794 (FRAME_POINTER_REQUIRED): Always true if the function has a nonlocal
label.

From-SVN: r7753
1994-07-13 01:06:31 +00:00
Richard Earnshaw
cce4322b7f (matcher for SFmode inequality comparison): Use cmfe, not cfm.
(matchers for {store-flag, not-store-flag, neg-store-flag}): Output
if-false instruction first before if-true instruction.
(matcher for (AND store-flag x)): Only match if reversible_cc_register.
(matcher for (IF-THEN-ELSE reg (NOT reg))): Likewise.

From-SVN: r7741
1994-07-12 13:33:12 +00:00
Richard Earnshaw
31e6408aee (PREDICATE_CODES): Add reversible_cc_register.
From-SVN: r7740
1994-07-12 13:31:10 +00:00
Richard Earnshaw
5bbe2d409c (reversible_cc_register): New function.
(final_prescan_insn): Don't try to conditionalize jumps with JUMP_CLOB
attribute.

From-SVN: r7739
1994-07-12 13:31:10 +00:00
Richard Earnshaw
bd4d60ce71 (INITIAL_ELIMINATION_OFFSET): Check frame_pointer_needed when eliminating
the arg pointer into the stack pointer.

From-SVN: r7619
1994-06-30 11:48:44 +00:00
Richard Earnshaw
dfaa6d72a3 (function_unit fpa): Add more accurate scheduling information.
(all floating point patterns): Add more accurate instruction type information.

From-SVN: r7574
1994-06-27 15:24:36 +00:00
Richard Earnshaw
bee06f3d82 include "expr.h".
(arm_fpu): New variable.
(arm_gen_movstrqi): Fix typo.

From-SVN: r7573
1994-06-27 15:24:36 +00:00
Richard Earnshaw
4a1934977f (STARTFILE_SPEC,SIZE_TYPE,PTRDIFF_TYPE): Fix typos.
(ASM_FINAL_SPEC): Only reject -mbsd and -mxopen when -pedantic.

From-SVN: r7572
1994-06-27 15:24:36 +00:00
Richard Earnshaw
24f0c1b4cc (enum floating_point_type): New enumeration type.
(arm_fpu): New declaration.

From-SVN: r7571
1994-06-27 15:24:36 +00:00
Richard Earnshaw
0bdece8adf (movstrsi): Delete.
(movstrqi): New expand.

From-SVN: r7559
1994-06-24 19:51:26 +00:00
Richard Earnshaw
880e25163f (arm_gen_movstrqi): New function.
From-SVN: r7558
1994-06-24 19:51:26 +00:00
Richard Earnshaw
e2c671bad7 include tree.h
include tree.h
(const_ok_for_arm): Add fast return for 0 or just a single non-zero bit.
(const_ok_for_op): New function.
(arm_split_constant): New function.
(arm_rtx_costs): New function.
(reg_or_int_operand): New function.
(shift_operator): Accept ROTATERT.
(multi_register_push): New function.
(shift_op): Don't abort if a constant is outside the acceptable range, but
convert the whole shift expression into something legal.  If the shift is
zero, then return NULL.
(output_return_instruction): Output a call to abort if the function is
volatile.
(arm_volatile_func): New function.
(get_prologue_size): Remove all adjustments for insns that are now output as
rtx.
(output_func_prologue): Remove all code that outputs instructions, just print
a few comments.
(output_func_epilogue): Output a call to abort if a volatile function tries
to return.
(emit_multi_reg_push): New function.
(arm_expand_prologue): New function.  Don't bother to push call-saved regs
if we will never return.
(arm_print_operand, case 'S'): If shift_op returns NULL, then no shift is
required.

From-SVN: r7537
1994-06-23 16:02:41 +00:00
Richard Earnshaw
3967692c7e (TARGET_WHEN_DEBUGGING): Delete.
(MODES_TIEABLE_P): All modes of the same class are tieable.
(CONST_OK_FOR_LETTER_P): Add 'M' for constants valid in a shift.
(FUNCTION_PROFILER): Don't call arm_increase_location.
(INITIAL_ELIMINATION_OFFSET): Call saved regs are no-longer pushed for
functions that don't return.
(LEGITIMIZE_ADDRESS): Push constants that will never be legitimate -- symbols
and labels -- into registers.  Handle DImode better.
(DEFAULT_SIGNED_CHAR): Use unsigned unless already defined.
(RTX_COSTS): Call arm_rtx_costs.
(ADDRESS_COST): Since most operations have the same rtx cost, make the
more complex addresses cheaper.
(PREDICATE_CODES): Add ROTATERT to shift_operator; and new predicates for
reg_or_int_operand and multi_register_push.
(DBX_CONTIN_LENGTH): Only define if not already done.
(PRINT_OPERAND_ADDRESS): Let arm_print operand output the ", " for shifts.

From-SVN: r7536
1994-06-23 16:02:41 +00:00
Richard Earnshaw
e8da7c0237 Delete some dead code.
(STARTFILE_SPEC): Look in the correct places for start files.
(LIB_SPEC): Define.
(LINK_SPEC): Define.
(TARGET_WHEN_DEBUGGING): Delete.
(DEFAULT_SIGNED_CHAR): Set to unsigned.
(SIZE_TYPE, PTRDIFF_TYPE, TARGET_EDOM): Define.

From-SVN: r7535
1994-06-23 16:02:41 +00:00
Richard Earnshaw
7ea544d4ce (DBX_CONTIN_LENGTH): Set to 80.
(DEFAULT_GDB_EXTENSIONS, DBX_NO_XREFS): Don't try to pander to dbx, it is just
to broken to use.

From-SVN: r7534
1994-06-23 16:02:41 +00:00
Richard Earnshaw
091426d3f9 (addsi3, subsi3, andsi3, iorsi3, ashlsi3, ashrsi3, lshrsi3, rotrsi3):
Rewrite as expand patterns.
(rotlsi3): New expand.
(matchers, and split patterns for above): New.
(all patterns with shifts): Let arm_print_operand output the ", " before a
shift if it is needed.
(zero_extendqihi2): Delete.
(zero_extendqisi2): Expand to (and ...) if not memory.
(movsi): Call arm_split_constant to generate a constant.
(movqi): Only force a MEM into a register if not reloading.
(movsf, movdf): If loading a non-immediate floating point value, or loading
and floating point immediate into integer regs, push the constant straight
into the pool.
(movdf): Get rid of the scratch register.
(reload_outdf): Rewrite to expand to the two required insns.
(matcher for movdf): Remove alternative that used scratch register for
storing.
(movxf): rewrite as expand.
(matcher for movxf): Recognize even when XFmode code is disabled, so that
prologue insns can be generated.
(Matcher for reversed conditional jump): Don't match if the mode of the
CC register is not reversible.
(prologue): New expand.
(matcher for multi_register_push insn): New.

From-SVN: r7533
1994-06-23 16:02:41 +00:00
Richard Earnshaw
b5cc037f4b (arm_reload_out_hi): Rewrite.
(arm_reload_out_hi): Rewrite.  Add support for processors running in
big-endian mode.
(fp_immediate_constant): Fix typo in argument declaration.

From-SVN: r7449
1994-06-06 13:14:03 +00:00
Richard Earnshaw
fe241a29e3 (storehi_bigend): New expansion pattern.
(storeinthi): Rework to generate better code, add big-endian support.
(movhi): Add support for processors running in big-endian mode.
(movhi_bigend): New expansion pattern.
(matcher for movhi): Remove incorrect alternative for storing HImode to
memory.  Only match when little endian.
(matcher for big-endian movhi): New pattern.
(matchers/peepholes for extended pre/post increment HImode loads): Only
match when little-endian.
(matcher for operating on adjacent memory locations): Load operation into
arith operands.
(peepholes for extended pre-increment byte loads): New patterns.

From-SVN: r7448
1994-06-06 13:14:03 +00:00
Richard Earnshaw
9c8728721e (PROMOTE_MODE): Promote HImode integers as signed.
(BYTES_BIG_ENDIAN): Allow target description to override default.
(LOAD_EXTEND_OP): When big-endian, HImode loads are sign extended.

From-SVN: r7447
1994-06-06 13:14:03 +00:00
Richard Earnshaw
4eda77ec3e (FUNCTION_PROFILER): Delete duplicate definition.
(FUNCTION_PROFILER, TRAMPOLINE_TEMPLATE, ASM_FILE_START,
 ASM_OUTPUT_REG_{PUSH,POP}, PRINT_OPERAND_ADDRESS):  Output register
 prefix before any explicit register name.
(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
 ASM_OUTPUT_COMMON): Output the target dependent comment char.
(ASM_FILE_START): Output register alias for r10.
(REGISTER_NAMES): Output "r9" now for r9, not "rfp".
(ADDITIONAL_REGISTER_NAMES): New macro.

From-SVN: r7444
1994-06-04 11:17:23 +00:00
Richard Earnshaw
916cc8c5aa (all patterns explicitly mentioning regs): Output the target dependent prefix before the register name.
(all patterns explicitly mentioning regs): Output the target dependent
prefix before the register name.
(all patterns with asm comments): Output the target dependent comment
character.

From-SVN: r7443
1994-06-04 11:17:23 +00:00
Richard Earnshaw
1d5473cbe4 (print_multi_reg, output_call, output_call_mem,
output_mov_long_double_fpu_from_arm,
 output_mov_long_double_arm_from_fpu,
 output_mov_double_fpu_from_arm, output_mov_double_arm_from_fpu,
 output_return_instruction, output_func_{prologue,epilogue},
 arm_print_operand, output_load_symbol):  Print the register prefix
before each register name.
(output_func_prologue, output_lcomm_directive):  Output the target
dependent comment char for asm comments.

From-SVN: r7442
1994-06-04 11:17:23 +00:00
Richard Earnshaw
68df59d392 (all patterns): Update instruction generation to reflect new meanings of constraints 'K' and 'L'.
(all patterns): Update instruction generation to reflect new meanings of
constraints 'K' and 'L'.  Use output type 'B' to generate an inverted
constant.  Use output type 'N' to generate a negated floating point
constant.

From-SVN: r7436
1994-06-03 13:18:24 +00:00
Richard Earnshaw
aef1764cb3 (CONST_OK_FOR_LETTER_P): Only allow constants valid when inverted for 'K'.
Only allow constants valid when negated for 'L'.

From-SVN: r7435
1994-06-03 13:17:55 +00:00
Richard Earnshaw
7bc7696cba output_func_{prologue,epilogue}): Change declarations from output_{prologue,epilogue}.
output_func_{prologue,epilogue}): Change declarations from
output_{prologue,epilogue}.
(arm_output_llc, arithmetic_instr, output_arithmetic_with_immediate_mulitply,
 output_arithmetic_with_shift, shift_instr): Delete function definition.
(ASM_OUTPUT_OPCODE): Delete.
(PRINT_OPERAND): Call arm_print_operand, instead of doing it directly.
(ARM_COMMENT_CHAR): New macro.
(ARM_REG_PREFIX): New macro.
(ARM_SIGN_EXTEND): New macro.
(PRINT_OPERAND_ADDRESS): Delete variable 'shift'.  Change type of
variable 'offset' to HOST_WIDE_INT.  Use arm_print_operand to handle
shifts in addresses.

From-SVN: r7426
1994-06-02 18:41:52 +00:00
Richard Earnshaw
c63165beb4 (all output patterns): Use new capabilities of arm_print_operand to simplify output sequences.
(all output patterns): Use new capabilities of arm_print_operand to
simplify output sequences.  Mark position of condition code with '%?'.

From-SVN: r7425
1994-06-02 18:41:52 +00:00
Richard Earnshaw
ef65c0dcdf (ASM_FINAL_SPEC [CROSS_COMPILE]): Correct typo.
Update copyright message.

From-SVN: r7424
1994-06-02 18:41:52 +00:00
Richard Earnshaw
9997d19d6d (arm_condition_code): Move to start of file.
(const_pool_offset): Correct typo.
(fp_const_from_val): New function.
(all instruction generators): mark position where conditionalization
should be with '%?'.
(output_move_double): Use new '%m' output type to simplify load/store
multiple generation.
(shift_instr): Delete.
(shift_op): New function.
(output_arithmetic): Delete.
(output_arithmetic_with_shift): Delete.
(output_arithmetic_with_immediate_multiply): Delete.
(output_shifted_move): Delete.
(output_shift_compare): Delete.
(arm_print_operand): New function.

From-SVN: r7423
1994-06-02 18:41:52 +00:00
Richard Earnshaw
0f447ef2fc (all insn and peephole patterns): Rewrite without using arm_output_asm_insn.
(matcher for movsi): New alternative to load symbol directly into a register.
Add new parameter in call to output_load_symbol.

From-SVN: r7418
1994-06-01 17:11:23 +00:00
Richard Earnshaw
008cf58a2b Delete some dead code.
(FUNCTION_{PROLOGUE,EPILOGUE}): Call output_func_{prologue,epilogue}.
(INITIAL_ELIMINATION_OFFSET): Inspect all registers, but only add those that
are not in call_used_regs.
(GO_IF_LEGITIMATE_INDEX): Change type of variable 'range' to HOST_WIDE_INT;
change type of variable 'code' to enum rtx_code.

(arm_output_asm_insn): Delete declaration.
(EXTRA_CONSTAINT): New constraint 'R' to match a constant pool label.
Make constraint 'S' never match when not optimizing.
(CONSTANT_ADDRESS_P): Only accept symbols marked with SYMBOL_REF_FLAG when
optimizing.
(ENCODE_SECTION_INFO): Don't mark any symbols when not optimizing.
(ASM_OUTPUT_REG_{PUSH,POP}: Don't call arm_increase_location.
(ASM_OUTPUT_ADDR_VEC_ELT): Likewise.

From-SVN: r7417
1994-06-01 17:10:50 +00:00
Richard Earnshaw
f3bb6135f6 General tidy up.
#include <string.h>.
Declare some prototypes.
(output_memory_reference_mode): Change type to enum machine_mode.
(arm_const_nmoves): Delete.
(adjacent_mem_locations, {load,store}_multiple_operation): Explicitly
declare to return int.
({load,store}_multiple_operation): Change type of 'count', 'base' and 'i' to
HOST_WIDE_INT.
(output_add_immediate): Change type of 'n' to HOST_WIDE_INT.
(output_multi_immediate): Change type of Argument 'n' to HOST_WIDE_INT, if
wider than 32 bits, mask out the high bits.
(output_arithmetic_with_immediate_multiply): Change type of 'shift'
to HOST_WIDE_INT.
(output_func_{prologue,epilogue}): Renamed from output_{prologue,epilogue}.
Check all registers to see if they are live, but only push/pop them if they
are not in call_used_regs.

(const_pool_offset): New function.
(get_prologue_size): New function.
(output_func_prologue): Eliminate variable code_size.
(output_func_epilogue): Only call arm_increase_location when optimizing; also
add the size of the function just compiled, and the size of the prologue.
(arm_output_asm_insn): Delete.  All callers changed to use output_asm_insn.
(arm_output_llc): Delete.
(output_load_symbol): New first parameter 'insn'.  Rewrite so that assembler
can detect whether we made a mistake.

From-SVN: r7416
1994-06-01 17:09:29 +00:00
Richard Earnshaw
a1dc0475d6 (all patterns): length attribute now describes length in bytes.
From-SVN: r7415
1994-06-01 08:53:42 +00:00
Richard Earnshaw
5472d00b23 (short_branch): Convert length calculations to bytes
From-SVN: r7414
1994-06-01 08:52:15 +00:00
Richard Kenner
996a5f59fb Remove references to LSHIFT and lshlsi3.
From-SVN: r7016
1994-04-10 07:13:16 -04:00
Richard Kenner
2254dcd5db Delete OPTIMIZATION_OPTIONS.
From-SVN: r6346
1993-12-31 06:53:01 -05:00
Richard Kenner
f70bf59ec9 (ASM_OUTPUT_ASCII): 8-bit chars should be zero-extended.
From-SVN: r6189
1993-12-06 07:38:16 -05:00
Richard Kenner
f1b3f5151b (output_ascii_pseudo_op): 8-bit chars should be zero-extended.
From-SVN: r6188
1993-12-06 07:34:53 -05:00
Richard Kenner
d66230e738 (arm_backwards_branch): Branching to the current insn is a backwards
branch.

From-SVN: r6147
1993-11-23 17:35:16 -05:00
Richard Kenner
66b804be21 (comparison): Don't emit invalid optimization for (set (reg) (comparison)) and...
(comparison): Don't emit invalid optimization
for (set (reg) (comparison)) and (set (reg) (neg (comparison)))
when comparison is LT.

From-SVN: r6075
1993-11-12 10:24:51 -05:00
Richard Kenner
0e84b55633 (pattern_really_clobbers_lr): Setting a subreg of a mem is valid and safe.
From-SVN: r6074
1993-11-12 08:53:40 -05:00