Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal/obj/arm: BX is assembled incorrectly by ARM assembler #19530

Closed
benshi001 opened this issue Mar 13, 2017 · 4 comments
Closed

cmd/internal/obj/arm: BX is assembled incorrectly by ARM assembler #19530

benshi001 opened this issue Mar 13, 2017 · 4 comments

Comments

@benshi001
Copy link
Member

As ARM architecture reference manual described,

BX.EQ (R0) should be assembled to 0x012fff10
BX.CS (R2) should be assembled to 0x212fff12

but they are assembled to quite strange values.

This issue is due to line 2153 - 2171 of cmd/internal/obj/arm/asm5.go

I will commit a patch to fix it later.

@benshi001 benshi001 changed the title cmd/internal/obj/arm/asm5.go: BX is assembled incorrectly cmd/internal/obj/arm/asm5.go: BX is assembled incorrectly by ARM assembler Mar 13, 2017
@gopherbot
Copy link

CL https://golang.org/cl/37662 mentions this issue.

@benshi001
Copy link
Member Author

benshi001 commented Mar 13, 2017

Fixed in patch set 4 of CL 37662, along with issue 19357.

@cherrymui
Copy link
Member

If I recall correctly BX is used specifically for NaCl. It shouldn't be used in general. I am not sure this can be changed. I'd have to take a another look.

@josharian josharian changed the title cmd/internal/obj/arm/asm5.go: BX is assembled incorrectly by ARM assembler cmd/internal/obj/arm: BX is assembled incorrectly by ARM assembler Mar 13, 2017
@benshi001
Copy link
Member Author

I do not know the special use of BX. Maybe we need not it become general, since thumb is not supported currently.

@golang golang locked and limited conversation to collaborators Mar 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants