diff options
author | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-09 01:07:14 +0000 |
---|---|---|
committer | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-09 01:07:14 +0000 |
commit | 609a120c9008c1fc9b318ca11e0b6dd46ea38076 (patch) | |
tree | 783c74a2aca8089d71f147be56b67141a4da6e81 /gcc/config/pdp11/pdp11.c | |
parent | 0e8576ca3916beefce9d48d681c11739213bf318 (diff) | |
download | gcc-609a120c9008c1fc9b318ca11e0b6dd46ea38076.tar.gz |
* config/pdp11/pdp11.c (pdp11_assemble_integer): Mask byte values
to 8 bits.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pdp11/pdp11.c')
-rw-r--r-- | gcc/config/pdp11/pdp11.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 31e85c7e6f8..a9c758b4548 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -1002,7 +1002,10 @@ pdp11_assemble_integer (rtx x, unsigned int size, int aligned_p) { case 1: fprintf (asm_out_file, "\t.byte\t"); - output_addr_const_pdp11 (asm_out_file, x); + output_addr_const_pdp11 (asm_out_file, + GEN_INT (trunc_int_for_mode (INTVAL (x), + QImode) & 0xff)); +; fprintf (asm_out_file, " /* char */\n"); return true; @@ -1739,9 +1742,7 @@ output_addr_const_pdp11 (FILE *file, rtx x) break; case CONST_INT: - /* Should we check for constants which are too big? Maybe cutting - them off to 16 bits is OK? */ - fprintf (file, "%#ho", (unsigned short) INTVAL (x)); + fprintf (file, "%#o", (int) trunc_int_for_mode (INTVAL (x), HImode) & 0xffff); break; case CONST: |