summaryrefslogtreecommitdiff
path: root/output/outas86.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-02-05 11:34:07 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2016-02-05 11:34:07 -0800
commitae01785d872d3271d749a0866031d2d867120234 (patch)
treef8901627720ff90ff12dee50c970d0fd8892290a /output/outas86.c
parent5482a15e17cfc80379052253003e5a6b0cd46f14 (diff)
downloadnasm-ae01785d872d3271d749a0866031d2d867120234.tar.gz
LLVM portability fix for abs(size)
size is actually an uint64_t, and LLVM drops the abs() on the principle that the uint64_t should always be positive. Make it explicit that we are converting to a signed integer first, by using abs((int)size) instead. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'output/outas86.c')
-rw-r--r--output/outas86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/output/outas86.c b/output/outas86.c
index a800e90f..892362b6 100644
--- a/output/outas86.c
+++ b/output/outas86.c
@@ -347,7 +347,7 @@ static void as86_out(int32_t segto, const void *data,
as86_sect_write(s, data, size);
as86_add_piece(s, 0, 0L, 0L, size, 0);
} else if (type == OUT_ADDRESS) {
- int asize = abs(size);
+ int asize = abs((int)size);
if (segment != NO_SEG) {
if (segment % 2) {
nasm_error(ERR_NONFATAL, "as86 format does not support"