Author Topic: AESDEC with x64  (Read 3522 times)

Offline RomekAtomek

  • Jr. Member
  • *
  • Posts: 2
AESDEC with x64
« on: June 13, 2022, 03:16:38 PM »
Hi all,

How to use AESDEC? I am getting an error for the code below. For IA64 it works but I have no IA64 processor.

BITS 64
CPU x64

  1017                                              AESDEC XMM1, XMM2
  1018          ******************       error: no instruction for this cpu level


Romek

Offline fredericopissarra

  • Full Member
  • **
  • Posts: 368
  • Country: br
Re: AESDEC with x64
« Reply #1 on: June 13, 2022, 10:25:08 PM »
nasm doc section 7.11

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 221
  • Country: gb
    • GPUZoo
Re: AESDEC with x64
« Reply #2 on: June 13, 2022, 10:53:51 PM »
It was introduced with the Westmere architecture. If none of your hardware is x64 capable, it won't be supported.
My graphics card database: www.gpuzoo.com

Offline fredericopissarra

  • Full Member
  • **
  • Posts: 368
  • Country: br
Re: AESDEC with x64
« Reply #3 on: June 14, 2022, 10:25:13 AM »
It was introduced with the Westmere architecture. If none of your hardware is x64 capable, it won't be supported.
The problem, above, is the CPU directive...
Code: [Select]
$ cat test.asm
  bits 64
  ; cpu x64

  aesdec xmm1,xmm2

$ nasm -v
NASM version 2.15.05 compiled on Oct 24 2020

$ nasm -l test.lst test.asm
$
Code: [Select]
1                      bits  64
2                      ;cpu x64
3                     
4 00000000 660F38DECA  aesdec xmm1,xmm2
Code: [Select]
$ cat test2.asm
  bits 64
  cpu x64

  aesdec xmm1,xmm2

$ nasm -l test2.lst test2.asm
test2.asm:4: error: no instruction for this cpu level
From the docs:
Quote
The CPU directive restricts assembly to those instructions which are available on the specified CPU
Without CPU there are no restrictions.
« Last Edit: June 14, 2022, 12:05:45 PM by fredericopissarra »

Offline RomekAtomek

  • Jr. Member
  • *
  • Posts: 2
Re: AESDEC with x64
« Reply #4 on: June 14, 2022, 12:39:01 PM »
My mistake was that I made the assumption that IA64 only applies to itanium.


I have another question. Is AESDEC instruction available in 16b mode? NASM accept it.

  1020                                  CPU IA64
  1021                                  BITS 16           
  1022 00000CEA C4E269DFCB                       VAESDECLAST XMM1, XMM2, XMM3
  1023 00000CEF 660F38DECA                       AESDEC XMM1, XMM2


Offline fredericopissarra

  • Full Member
  • **
  • Posts: 368
  • Country: br
Re: AESDEC with x64
« Reply #5 on: June 14, 2022, 04:13:30 PM »
Probably NOT... You don't need to use CPU directive, unless you want to LIMIT the instruction set.