question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect AMD XOP definitions

See original GitHub issue

Some of the AMD XOP instructions seem to have incorrect operand definitions. BLCFILL for example uses the GPRy_N() register-class, which is declared as:

xed_reg_enum_t GPRy_N()::
EASZ=3 | OUTREG=VGPR64_N() 
EASZ=2 | OUTREG=VGPR32_N()
EASZ=1 | OUTREG=VGPR32_N()

The register-width should scale by the effective operand-size instead of the address-size, like it is described in the documentation:

In 64-bit mode, the operand size is determined by the value of XOP.W. If XOP.W is 1, the operand size is 64-bit; if XOP.W is 0, the operand size is 32-bit. In 32-bit mode, XOP.W is ignored. 16-bit operands are not supported.

Besides that, XOP.W = 0 (W0) should be removed from the pattern.

It seems like (at least) all definitions defined in ‘amd-xop-isa.txt’ below BEXTR (including this one) are affected, but there might be more instructions with an incorrect W0 pattern.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
markcharneycommented, May 16, 2017

I have a small local patch for the first issue (EOSZ vs EASZ). The 2nd issue is a bit more invasive & I’m weighing approaches.

0reactions
markcharneycommented, Jun 2, 2017

rebased & merged. Let me know if you see further problems. Thanks for the bug report.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XOP instruction set - Wikipedia
The XOP (eXtended Operations) instruction set, announced by AMD on May 1, 2009, is an extension to the 128-bit SSE core instructions in...
Read more >
AMD64 Architecture Programmer's Manual, Volume 3
the parties or in AMD's Standard Terms and Conditions of Sale. ... 1.2.8 VEX and XOP Prefixes . ... Invalid and Reassigned Instructions...
Read more >
What is the XOP prefix in an instruction? - Stack Overflow
XOP is an AMD-only prefix for AMD-specific SIMD instructions available in Bulldozer/Piledriver/Steamroller/Excavator chips. The first byte is 8F ...
Read more >
FMA4 on Zen: Forgotten Instruction set, but not yet gone - Reddit
The problem is that FMA4 can give wrong results on Zen it's filled with erratas that will not be fixed due to the...
Read more >
Broken by design: MTOM processing in Spring-WS
Apache Axiom has a well defined XOP processing model (at least since ... The problem with Spring-WS is that in contrast to SAAJ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found