Skip to content

Warn/err on {nf} decorator for RCL/RCR #314

Description

@LinuxCoder13

So basically Intel APX says that NF=0 for RCL/RCR.
However Nasm 3.02 skips this check and compiles code which lead #UD for SDE64 -future

~$: nasm -felf64 input.asm -o a.o
~$: ld a.o -o a.out
~$: ../intel/sde/sde64 -future -- ./a.out
Illegal instruction at address = 401000: 62 f4 fc 0c c1 d1 0a 62 f4 fc 0c c1 d9 0a b8 
Image name: ~$/a.out
Offset in image: 0x1000
If you believe your application should attempt to execute
this illegal instruction (and others that may be present),
Then use this knob: -emit-illegal-insts 0
and this error message will be avoided.
Use -print-exception-details to get more details.

SDE ERROR: Illegal instruction at address = 401000: 62 f4 fc 0c c1 d1 0a 62 f4 fc 0c c1 d9 0a b8 
Image name: ~$/a.out
Offset in image: 0x1000
If you believe your application should attempt to execute
this illegal instruction (and others that may be present),
Then use this knob: -emit-illegal-insts 0
and this error message will be avoided.
Use -print-exception-details to get more details.

exception info: thread index = 0,context change reason = 0,exception code = 0x4
Backtrace:
==========
.text+0x000000000 at ~$/a.out+0x000401000 

~$:

Code:

section .text
global _start

_start:

    {nf} rcl rcx, 10
    {nf} rcr rcx, 10
    mov rax, 60 
    syscall

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions