0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

labels: make the prefix/suffix options and pragmas consistent

Make the spellings for the label-mangling options and pragmas
consistent, and implement the directive forms which were documented
but never implemented.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel)
2025-10-07 18:46:39 -07:00
parent c08b4edca1
commit ae9335a0b9
11 changed files with 116 additions and 50 deletions

View File

@@ -287,17 +287,14 @@ static enum directive_result output_pragma_common(const struct pragma *pragma)
switch (pragma->opcode) {
case D_PREFIX:
case D_GPREFIX:
set_label_mangle(LM_GPREFIX, pragma->tail);
return DIRR_OK;
case D_SUFFIX:
case D_GSUFFIX:
set_label_mangle(LM_GSUFFIX, pragma->tail);
return DIRR_OK;
case D_POSTFIX:
case D_GPOSTFIX:
case D_LPREFIX:
set_label_mangle(LM_LPREFIX, pragma->tail);
return DIRR_OK;
case D_LSUFFIX:
set_label_mangle(LM_LSUFFIX, pragma->tail);
case D_LPOSTFIX:
set_label_mangle(pragma->opcode, pragma->tail);
return DIRR_OK;
default:
return DIRR_UNKNOWN;