summaryrefslogtreecommitdiff
path: root/output/outas86.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-13 09:37:59 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-13 09:37:59 -0800
commitd1fb15c154b99f9ca8d2356fa9057827b0ab89af (patch)
treee6e95a1979107466eadfad29577e278ee1273890 /output/outas86.c
parenta5fb90834aa2e849e67bf45b478d498a6cb72062 (diff)
downloadnasm-d1fb15c154b99f9ca8d2356fa9057827b0ab89af.tar.gz
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/outas86.c')
-rw-r--r--output/outas86.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/output/outas86.c b/output/outas86.c
index f3423140..476e8c95 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -320,12 +320,12 @@ static void as86_out(int32_t segto, const void *data,
error(ERR_NONFATAL, "as86 format does not support"
" segment base references");
} else {
- offset = *(int32_t *)data;
+ offset = *(int64_t *)data;
as86_add_piece(s, 1, offset, segment, size, 0);
}
} else {
p = mydata;
- WRITELONG(p, *(int32_t *)data);
+ WRITELONG(p, *(int64_t *)data);
as86_sect_write(s, data, size);
as86_add_piece(s, 0, 0L, 0L, size, 0);
}
@@ -337,7 +337,7 @@ static void as86_out(int32_t segto, const void *data,
error(ERR_NONFATAL, "as86 format does not support"
" segment base references");
} else {
- offset = *(int32_t *)data;
+ offset = *(int64_t *)data;
as86_add_piece(s, 1, offset - size + 2, segment, 2L,
1);
}
@@ -350,7 +350,7 @@ static void as86_out(int32_t segto, const void *data,
error(ERR_NONFATAL, "as86 format does not support"
" segment base references");
} else {
- offset = *(int32_t *)data;
+ offset = *(int64_t *)data;
as86_add_piece(s, 1, offset - size + 4, segment, 4L,
1);
}