diff options
author | Steve Chamberlain <sac@cygnus> | 1993-07-13 19:12:10 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1993-07-13 19:12:10 +0000 |
commit | 489a93f3c3510823e2b33da6e2ec9c5c27696565 (patch) | |
tree | 63fa79ed82a0606a7aabc344bef3bdb5dc19db28 | |
parent | 46dd06224bedb1b95700732114263ea4d4b01937 (diff) | |
download | gdb-489a93f3c3510823e2b33da6e2ec9c5c27696565.zip gdb-489a93f3c3510823e2b33da6e2ec9c5c27696565.tar.gz gdb-489a93f3c3510823e2b33da6e2ec9c5c27696565.tar.bz2 |
* config/tc-h8500.c (line_comment_chars): Add hash.
(parse_exp, skip_colonthing, build_bytes): Add support for
R_H8500_HIGH16 relocation type.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-h8500.c | 42 |
2 files changed, 41 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ee66ea0..e48f484 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Tue Jul 13 12:09:44 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + * config/tc-h8500.c (line_comment_chars): Add hash. + (parse_exp, skip_colonthing, build_bytes): Add support for + R_H8500_HIGH16 relocation type. + Mon Jul 12 11:15:34 1993 Ken Raeburn (raeburn@deneb.cygnus.com) * config/obj-elf.c (obj_elf_section): Allow `@' to introduce an diff --git a/gas/config/tc-h8500.c b/gas/config/tc-h8500.c index baf4cb3..4ad462e 100644 --- a/gas/config/tc-h8500.c +++ b/gas/config/tc-h8500.c @@ -33,7 +33,7 @@ const char comment_chars[] = "!"; const char line_separator_chars[] = ";"; -const char line_comment_chars[] = "!"; +const char line_comment_chars[] = "!#"; /* This table describes all the machine specific pseudo-ops the assembler has to support. The fields are: @@ -268,9 +268,13 @@ parse_exp (s, op, page) if (s[1] == 'p' && s[2] == 'a' && s[3] == 'g' && s[4] == 'e') { s += 5; - *page = 'p'; } + if (s[1] == 'h' && s[2] == 'i' && s[3] == '1' && s[4] == '6') + { + s += 5; + *page = 'h'; + } else if (s[1] == 'o' && s[2] == 'f' && s[3] == 'f') { s += 4; @@ -353,6 +357,10 @@ skip_colonthing (sign, ptr, exp, def, size8, size16, size24) { exp->type = IMM8; } + else if (exp->page == 'h') + { + exp->type = IMM16; + } else { /* Let's work out the size from the context */ @@ -982,9 +990,25 @@ build_bytes (opcode, operand) case FPIND_D8: insert (output, index, &displacement, R_H8500_IMM8, 0); break; + case IMM16: - insert (output, index, &immediate, immediate_inpage ? - R_H8500_LOW16 : R_H8500_IMM16, 0); + { + int p; + switch (immediate_inpage) { + case 'p': + p = R_H8500_LOW16; + break; + case 'h': + p = R_H8500_HIGH16; + break; + default: + p = R_H8500_IMM16; + break; + } + + insert (output, index, &immediate,p, 0); + } + index++; break; case RLIST: @@ -1403,9 +1427,9 @@ md_convert_frag (headers, fragP) } valueT -DEFUN (md_section_align, (seg, size), - segT seg AND - valueT size) +md_section_align (seg, size) + segT seg ; + valueT size; { return ((size + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg])); @@ -1440,6 +1464,10 @@ md_apply_fix (fixP, val) case R_H8500_HIGH8: *buf++ = val >> 16; break; + case R_H8500_HIGH16: + *buf++ = val >> 24; + *buf++ = val >> 16; + break; case R_H8500_IMM24: *buf++ = (val >> 16); *buf++ = (val >> 8); |