Add a regmove instruction.

This will be used to locally change the register locations of values in
order to satisfy instruction constraints.
This commit is contained in:
Jakob Stoklund Olesen
2017-05-02 11:32:12 -07:00
parent 6fe4aa2f8d
commit 8cd67f08a9
11 changed files with 114 additions and 7 deletions

View File

@@ -155,3 +155,18 @@ ebb0(v1: i32):
; nextln: store $v2, $v1
; nextln: store aligned $v3, $v1+12
; nextln: store notrap aligned $v3, $v1-12
; Register diversions.
; This test file has no ISA, so we can unly use register unit numbers.
function diversion(i32) {
ebb0(v1: i32):
regmove v1, %10 -> %20
regmove v1, %20 -> %10
return
}
; sameln: function diversion(i32) {
; nextln: ebb0($v1: i32):
; nextln: regmove $v1, %10 -> %20
; nextln: regmove $v1, %20 -> %10
; nextln: return
; nextln: }