diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-13 09:37:59 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-13 09:37:59 -0800 |
commit | d1fb15c154b99f9ca8d2356fa9057827b0ab89af (patch) | |
tree | e6e95a1979107466eadfad29577e278ee1273890 /output/outdbg.c | |
parent | a5fb90834aa2e849e67bf45b478d498a6cb72062 (diff) | |
download | nasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.tar.gz nasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.tar.bz2 nasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.zip |
Address data is int64_t; simplify writing an address object
Address data is always int64_t even if the size itself is smaller;
this was broken on bigendian hosts (still need testing!)
Create simple "write sized object" macros.
Diffstat (limited to 'output/outdbg.c')
-rw-r--r-- | output/outdbg.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/output/outdbg.c b/output/outdbg.c index 07e1b08..a139699 100644 --- a/output/outdbg.c +++ b/output/outdbg.c @@ -125,13 +125,7 @@ static void dbg_out(int32_t segto, const void *data, fprintf(dbgf, "\n"); break; case OUT_ADDRESS: - ldata = 0; /* placate gcc */ - if (size == 1) - ldata = *((char *)data); - else if (size == 2) - ldata = *((int16_t *)data); - else if (size == 4) - ldata = *((int32_t *)data); + ldata = *(int64_t *)data; fprintf(dbgf, "addr %08lx (seg %08lx, wrt %08lx)\n", ldata, segment, wrt); break; |