diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-12-02 11:41:06 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-12-02 11:41:06 +0300 |
commit | f8d9bf9d833d6ee64349259e9261cbfffbb3de53 (patch) | |
tree | ad0e89123a402eb019a0f14570a9f50321866fbf | |
parent | 1c79ece0052e058b03ceadc1b5be066d46262fe9 (diff) | |
download | nasm-f8d9bf9d833d6ee64349259e9261cbfffbb3de53.tar.gz |
output: ieee -- Use nasm_error helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | output/outieee.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/output/outieee.c b/output/outieee.c index ce4830da..30f38bc5 100644 --- a/output/outieee.c +++ b/output/outieee.c @@ -294,9 +294,8 @@ static void ieee_deflabel(char *name, int32_t segment, struct ieeeSection *seg; int i; - if (special) { - nasm_error(ERR_NONFATAL, "unrecognised symbol type `%s'", special); - } + if (special) + nasm_nonfatal("unrecognised symbol type `%s'", special); /* * First check for the double-period, signifying something * unusual. @@ -426,8 +425,8 @@ static void ieee_out(int32_t segto, const void *data, if (type == OUT_ADDRESS) size = abs((int)size); else if (segment == NO_SEG) - nasm_error(ERR_NONFATAL, "relative call to absolute address not" - " supported by IEEE format"); + nasm_nonfatal("relative call to absolute address not" + " supported by IEEE format"); ldata = *(int64_t *)data; if (type == OUT_REL2ADR) ldata += (size - 2); @@ -516,14 +515,13 @@ static void ieee_write_fixup(int32_t segment, int32_t wrt, s.addend = 0; s.id2 = eb->index[i]; } else - nasm_error(ERR_NONFATAL, - "Source of WRT must be an offset"); + nasm_nonfatal("source of WRT must be an offset"); } } else nasm_panic("unrecognised WRT value in ieee_write_fixup"); } else - nasm_error(ERR_NONFATAL, "target of WRT must be a section "); + nasm_nonfatal("target of WRT must be a section"); } s.size = size; ieee_install_fixup(segto, &s); @@ -630,8 +628,8 @@ static void ieee_write_fixup(int32_t segment, int32_t wrt, } } if (size != 2 && s.ftype == FT_SEG) - nasm_error(ERR_NONFATAL, "IEEE format can only handle 2-byte" - " segment base references"); + nasm_nonfatal("IEEE format can only handle 2-byte" + " segment base references"); s.size = size; ieee_install_fixup(segto, &s); return; @@ -708,8 +706,8 @@ static int32_t ieee_segment(char *name, int pass, int *bits) ieee_idx++; if (!strcmp(seg->name, name)) { if (attrs > 0 && pass == 1) - nasm_error(ERR_WARNING, "segment attributes specified on" - " redeclaration of segment: ignoring"); + nasm_warn("segment attributes specified on" + " redeclaration of segment: ignoring"); if (seg->use32) *bits = 32; else @@ -764,8 +762,7 @@ static int32_t ieee_segment(char *name, int pass, int *bits) seg->align = 1; if (rn_error) { seg->align = 1; - nasm_error(ERR_NONFATAL, "segment alignment should be" - " numeric"); + nasm_nonfatal("segment alignment should be numeric"); } switch (seg->align) { case 1: /* BYTE */ @@ -779,16 +776,15 @@ static int32_t ieee_segment(char *name, int pass, int *bits) case 128: break; default: - nasm_error(ERR_NONFATAL, "invalid alignment value %d", - seg->align); + nasm_nonfatal("invalid alignment value %d", seg->align); seg->align = 1; break; } } else if (!nasm_strnicmp(p, "absolute=", 9)) { seg->align = SEG_ABS + readnum(p + 9, &rn_error); if (rn_error) - nasm_error(ERR_NONFATAL, "argument to `absolute' segment" - " attribute should be numeric"); + nasm_nonfatal("argument to `absolute' segment" + " attribute should be numeric"); } } |