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

Match against multi instruction patterns in arm.md #13

Open
DontBelieveMe opened this issue Jan 1, 2022 · 1 comment
Open

Match against multi instruction patterns in arm.md #13

DontBelieveMe opened this issue Jan 1, 2022 · 1 comment
Assignees
Labels
codegen Machine/Assembly Code Generation enhancement New feature or request

Comments

@DontBelieveMe
Copy link
Owner

e.g.

(define-insn "load_sgptr"
	[(kInsn_Load
		(match_operand:ptr 0 "global")
		(match_operand:i32 1 "register"))
         (kInsn_SignExtend
		(match_operand:i8 0 "register")
		(match_operand:i32 1 "register"))]
	"movw {1}, :lower16:{0}"
	"movt {1}, :upper16:{0}"
	"ldrsb {1}, [{1}]")

Required for #10 - so that the correct load instruction (e.g. ldrsb, ldrb, ldrsh, ldrh etc...) can be generated when loading from globals that are smaller than 32 bits in size)

@DontBelieveMe DontBelieveMe added enhancement New feature or request codegen Machine/Assembly Code Generation labels Jan 1, 2022
@DontBelieveMe DontBelieveMe self-assigned this Jan 7, 2022
@DontBelieveMe
Copy link
Owner Author

Moving down from critical -> medium now that it is possible to write code to account for these situations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen Machine/Assembly Code Generation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant