From 46dc90f366fd8746a10c93c3335ffa2bec2ae68d Mon Sep 17 00:00:00 2001 From: bal Date: Mon, 8 Oct 1984 12:45:38 +0000 Subject: [PATCH] bug fixed: generate "add.l #65536,a1" rather than "lea 65536(a1),a1". The latter form is only generated for constants that fit in a word. --- mach/m68k2/cg/table | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mach/m68k2/cg/table b/mach/m68k2/cg/table index 47da138d8..ba019c79d 100644 --- a/mach/m68k2/cg/table +++ b/mach/m68k2/cg/table @@ -1048,7 +1048,8 @@ adp $1 >= 1 && $1 <= 8 ... | ADDSCR | "add.l #$1,%[1]" erase(%[1]) setcc(%[1]) | %[1] | | -adp | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" +adp $1 >= 0-32767 && $1 <= 32767 + | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" + tostring($1)} | | ... | nocoercions: LOCAL_ADDR | | {LOCAL_ADDR,%[1.off]+$1} | | ... | nocoercions: REGOFF_ADDR | | {REGOFF_ADDR,%[1.reg],%[1.off]+$1} | | @@ -1056,6 +1057,11 @@ adp | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" ... | ADDSCR | "lea $1(%[1]),%[1]" erase(%[1]) setcc(%[1]) | %[1] | | +adp | nocoercions: EXTERNAL_ADDR | | {EXTERNAL_ADDR,%[1.off] + "+" + + tostring($1)} | | +... | ADDSCR | "add.l #$1,%[1]" + erase(%[1]) + setcc(%[1]) | %[1] | | /* The next patterns are for efficient translation of "*p++" in C */ ldl ldl adp sdl $1 == $2 && $2 == $4 | | -- 2.34.1