aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-27 07:07:27 -0400
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-31 00:57:11 -0400
commitd92350111695f11809899144076c8bdfd9cd46f3 (patch)
tree3d00185500f7024f2797fcc9af495a753c20294c /gas/config
parentb60ecbc6ddeaf7af8f2515841b58035f0d4d2db7 (diff)
downloadgdb-d92350111695f11809899144076c8bdfd9cd46f3.zip
gdb-d92350111695f11809899144076c8bdfd9cd46f3.tar.gz
gdb-d92350111695f11809899144076c8bdfd9cd46f3.tar.bz2
make some variables unsigned
these places define char arrays containing values greater than 0x80 which doesn't fit in an 8 bit signed char, but does fit in an unsigned one. gas/ChangeLog: 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-aarch64.c (aarch64_handle_align): Make the type of some variables unsigned char[]. * config/tc-alpha.c (alpha_handle_align): Likewise. * config/tc-arm.c (arm_handle_align): Likewise. * config/tc-z80.c: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-aarch64.c2
-rw-r--r--gas/config/tc-alpha.c4
-rw-r--r--gas/config/tc-arm.c10
-rw-r--r--gas/config/tc-z80.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 8a6ebc8..0e00259 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -6322,7 +6322,7 @@ aarch64_handle_align (fragS * fragP)
{
/* NOP = d503201f */
/* AArch64 instructions are always little-endian. */
- static char const aarch64_noop[4] = { 0x1f, 0x20, 0x03, 0xd5 };
+ static unsigned char const aarch64_noop[4] = { 0x1f, 0x20, 0x03, 0xd5 };
int bytes, fix, noop_size;
char *p;
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 19d4bd2..5fa1403 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -5366,8 +5366,8 @@ alpha_elf_section_flags (flagword flags, bfd_vma attr, int type ATTRIBUTE_UNUSED
void
alpha_handle_align (fragS *fragp)
{
- static char const unop[4] = { 0x00, 0x00, 0xfe, 0x2f };
- static char const nopunop[8] =
+ static unsigned char const unop[4] = { 0x00, 0x00, 0xfe, 0x2f };
+ static unsigned char const nopunop[8] =
{
0x1f, 0x04, 0xff, 0x47,
0x00, 0x00, 0xfe, 0x2f
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 9c2eef5..2c42a13 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -21518,7 +21518,7 @@ md_section_align (segT segment ATTRIBUTE_UNUSED,
void
arm_handle_align (fragS * fragP)
{
- static char const arm_noop[2][2][4] =
+ static unsigned char const arm_noop[2][2][4] =
{
{ /* ARMv1 */
{0x00, 0x00, 0xa0, 0xe1}, /* LE */
@@ -21529,7 +21529,7 @@ arm_handle_align (fragS * fragP)
{0xe3, 0x20, 0xf0, 0x00}, /* BE */
},
};
- static char const thumb_noop[2][2][2] =
+ static unsigned char const thumb_noop[2][2][2] =
{
{ /* Thumb-1 */
{0xc0, 0x46}, /* LE */
@@ -21540,7 +21540,7 @@ arm_handle_align (fragS * fragP)
{0xbf, 0x00} /* BE */
}
};
- static char const wide_thumb_noop[2][4] =
+ static unsigned char const wide_thumb_noop[2][4] =
{ /* Wide Thumb-2 */
{0xaf, 0xf3, 0x00, 0x80}, /* LE */
{0xf3, 0xaf, 0x80, 0x00}, /* BE */
@@ -21548,8 +21548,8 @@ arm_handle_align (fragS * fragP)
unsigned bytes, fix, noop_size;
char * p;
- const char * noop;
- const char *narrow_noop = NULL;
+ const unsigned char * noop;
+ const unsigned char *narrow_noop = NULL;
#ifdef OBJ_ELF
enum mstate state;
#endif
diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c
index 094b8e6..2f52814 100644
--- a/gas/config/tc-z80.c
+++ b/gas/config/tc-z80.c
@@ -409,8 +409,8 @@ typedef const char * (asfunc)(char, char, const char*);
typedef struct _table_t
{
const char* name;
- char prefix;
- char opcode;
+ unsigned char prefix;
+ unsigned char opcode;
asfunc * fp;
} table_t;