Comments (5)
You can use go1.22rc1 for testing that.
For sure. The problem is the test I have that validates the avo instruction database by assembling a generated file with one example of every instruction form. This test runs in CI with the installed Go version, so at the moment with Go 1.20 and 1.21. Therefore the tests fail when I add the PCALIGN instruction.
The fix would be to either install a pinned Go version for the purpose of that test. Or alternatively, implement some form of #84 and store the version required for each instruction, which would then allow me to limit which instructions appear in the assembler test file.
from avo.
Thanks for the issue. Do you think it would be sufficient to just append this to the instruction set (probably with the opcodesextra
mechanism)? Or is there some reason we'd need to handle these pseudo instructions differently?
from avo.
PCALIGN
is handled by the architecture-independent part of the Go assembler:
https://github.com/golang/go/blob/go1.21.6/src/cmd/asm/internal/asm/asm.go#L336
There are other pseudo-ops defined here, for example FUNCDATA
and PCDATA
mentioned in #144.
At the moment I can't think of a reason not to just treat this as another ISA instruction. Of course it's still a goal for avo
to support ARM #189, in which case these pseudo-ops would need to be pulled out into an architecture-independent set of instructions. But we can cross that bridge when we come to it.
from avo.
Oh. I think I was thrown off by the fact that the PCALIGN
instruction has existed in the assembler for a long time. But as you've said there wasn't backend support for it in amd64
until recently golang/go#56474.
PR #420 adds it but is failing assembler tests on Go 1.20 and 1.21 for this reason.
This is another use case for avo
tracking the Go version required for each instruction #84.
from avo.
You can use go1.22rc1 for testing that. As for the implementation, I don't have that much experience with avo to have an opinion on how to implement it.
For now I did this in my own code:
Instruction(&ir.Instruction{
Opcode: "PCALIGN",
Operands: []Op{Imm(1024)},
})
from avo.
Related Issues (20)
- How to generate stub.go files with proper imports?
- instructions: GFNI HOT 5
- build: missing move deduction for booleans HOT 2
- tests/thirdparty: add crypto/internal/bigmod
- instructions: GFNI, VAES and VPCLMULQDQ naming inconsistency with x/sys/cpu HOT 8
- TestParseSignatureErrors fail on Go1.20 HOT 3
- ci: contributor PRs fail the pr/automerge step HOT 1
- Cannot generate stubs HOT 3
- operand: printing floating point literals without decimal causes invalid interpretation HOT 1
- how to include a asm file ? HOT 1
- why the result is reversed ? HOT 1
- Allow user to use a Mem with a nil Base HOT 2
- How to have a fall-back scheme on arm machine HOT 1
- New release? HOT 2
- tests/thirdparty: add github.com/klauspost/compress/huff0
- Polyfill support
- How is `CALL` used?
- Bug in avo -- MOVL should allow XMM registers as a destination.
- Inline comments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avo.