diff options
author | Ulrich Drepper <[email protected]> | 2008-01-11 06:17:06 +0000 |
---|---|---|
committer | Ulrich Drepper <[email protected]> | 2008-01-11 06:17:06 +0000 |
commit | 96a739922f7bc651ecfacaf9c70168b015ec5e96 (patch) | |
tree | f1338dd1f2485c0f378dfc30383d6690b2f76221 /libcpu/i386_data.h | |
parent | 193d587f0155a8dc87ef0bd35ded6eb60c28fe1a (diff) |
Fix a few instructions with immediate arguments.
Diffstat (limited to 'libcpu/i386_data.h')
-rw-r--r-- | libcpu/i386_data.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h index 94bb84bf..7815dbc2 100644 --- a/libcpu/i386_data.h +++ b/libcpu/i386_data.h @@ -813,8 +813,15 @@ FCT_imms8 (struct output_data *d) if (*d->param_start >= d->end) return -1; int_fast8_t byte = *(*d->param_start)++; - int needed = snprintf (&d->bufp[*bufcntp], avail, "$0x%" PRIx32, - (int32_t) byte); + int needed; +#ifdef X86_64 + if (*d->prefixes & has_rex_w) + needed = snprintf (&d->bufp[*bufcntp], avail, "$0x%" PRIx64, + (int64_t) byte); + else +#endif + needed = snprintf (&d->bufp[*bufcntp], avail, "$0x%" PRIx32, + (int32_t) byte); if ((size_t) needed > avail) return (size_t) needed - avail; *bufcntp += needed; |