diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-01 18:25:52 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-01 18:25:52 +0000 |
commit | 160b67d66154f2cc8bc2689cdd5035ab70b08bb9 (patch) | |
tree | f6faa57ef214ad762ee63a5f9c6aef09e40f020f /gnu/egcs | |
parent | 84efb8a0b304fe0a702ae15231886051a8e3b232 (diff) |
Introduce a new target switch, -mmemcpy (and -mno-memcpy).
This switch forces block copy operations to always fallback to memcpy()
when it is not done by inline load and stores, rather than using the
m88k movstr* functions found in libgcc.
The name of this option has been choosen after the mips back end, which
has a similar option.
Right now, this is a no-op since these functions are disabled due to (yet)
another gcc bug; but this will help building standalone code, such as the
kernel and boot blocks, without having to link against libgcc.
Diffstat (limited to 'gnu/egcs')
-rw-r--r-- | gnu/egcs/gcc/config/m88k/m88k.c | 4 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/m88k/m88k.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/config/m88k/m88k.c b/gnu/egcs/gcc/config/m88k/m88k.c index 3545329a2b8..2c06349c40b 100644 --- a/gnu/egcs/gcc/config/m88k/m88k.c +++ b/gnu/egcs/gcc/config/m88k/m88k.c @@ -516,11 +516,11 @@ expand_block_move (dest_mem, src_mem, operands) bytes, align, 0); #if 0 /* XXX */ - else if (constp && bytes <= best_from_align[target][align]) + else if (constp && bytes <= best_from_align[target][align] && !TARGET_MEMCPY) block_move_no_loop (operands[0], dest_mem, operands[1], src_mem, bytes, align); - else if (constp && align == 4 && TARGET_88100) + else if (constp && align == 4 && TARGET_88100 && !TARGET_MEMCPY) block_move_loop (operands[0], dest_mem, operands[1], src_mem, bytes, align); diff --git a/gnu/egcs/gcc/config/m88k/m88k.h b/gnu/egcs/gcc/config/m88k/m88k.h index 11735b20bdc..a8a8a740743 100644 --- a/gnu/egcs/gcc/config/m88k/m88k.h +++ b/gnu/egcs/gcc/config/m88k/m88k.h @@ -224,6 +224,7 @@ extern char * reg_names[]; #define MASK_WARN_PASS_STRUCT 0x00002000 /* Warn about passed structs */ #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */ #define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ +#define MASK_MEMCPY 0x00010000 /* Always use memcpy for movstr */ #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) #define MASK_OMIT_LEAF_FRAME_POINTER 0x00020000 /* omit leaf frame pointers */ @@ -248,6 +249,7 @@ extern char * reg_names[]; #define TARGET_OPTIMIZE_ARG_AREA (target_flags & MASK_OPTIMIZE_ARG_AREA) #define TARGET_SERIALIZE_VOLATILE (!(target_flags & MASK_NO_SERIALIZE_VOLATILE)) +#define TARGET_MEMCPY (target_flags & MASK_MEMCPY) #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT) #define TARGET_OMIT_LEAF_FRAME_POINTER (target_flags & MASK_OMIT_LEAF_FRAME_POINTER) @@ -281,6 +283,8 @@ extern char * reg_names[]; { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \ { "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \ { "no-omit-leaf-frame-pointer", -MASK_OMIT_LEAF_FRAME_POINTER }, \ + { "memcpy", MASK_MEMCPY }, \ + { "no-memcpy", -MASK_MEMCPY }, \ SUBTARGET_SWITCHES \ /* Default switches */ \ { "", TARGET_DEFAULT }, \ |