Skip to content

x86: printing of 8-bit immediate values #803

Closed
@vbgl

Description

@vbgl

The pretty-printing to x86 asm is not compatible with recent assemblers.

Here is an example program:

export
fn test(reg u64 p) -> reg u128 {
  reg u128 r;
  r = #AESKEYGENASSIST((u128)[p], 128);
  return r;
}

It is translated to the following assembly listing (AT&T syntax):

        .att_syntax
        .text
        .p2align        5
        .globl  _test
        .globl  test
_test:
test:
        aeskeygenassist $-128, (%rdi), %xmm0
        ret

for completeness, here it is in Intel syntax:

        .intel_syntax noprefix
        .text
        .p2align        5
        .globl  _test
        .globl  test
_test:
test:
        aeskeygenassist xmm0, xmmword ptr[rdi], -128
        ret

These assembly listings are accepted by GNU binutils 2.40, but at version 2.41, the following error arises:

….s:8: Error: operand type mismatch for `aeskeygenassist'

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