123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- package arch
- import (
- "github.com/twitchyliquid64/golang-asm/obj/s390x"
- )
- func jumpS390x(word string) bool {
- switch word {
- case "BRC",
- "BC",
- "BCL",
- "BEQ",
- "BGE",
- "BGT",
- "BL",
- "BLE",
- "BLEU",
- "BLT",
- "BLTU",
- "BNE",
- "BR",
- "BVC",
- "BVS",
- "BRCT",
- "BRCTG",
- "CMPBEQ",
- "CMPBGE",
- "CMPBGT",
- "CMPBLE",
- "CMPBLT",
- "CMPBNE",
- "CMPUBEQ",
- "CMPUBGE",
- "CMPUBGT",
- "CMPUBLE",
- "CMPUBLT",
- "CMPUBNE",
- "CRJ",
- "CGRJ",
- "CLRJ",
- "CLGRJ",
- "CIJ",
- "CGIJ",
- "CLIJ",
- "CLGIJ",
- "CALL",
- "JMP":
- return true
- }
- return false
- }
- func s390xRegisterNumber(name string, n int16) (int16, bool) {
- switch name {
- case "AR":
- if 0 <= n && n <= 15 {
- return s390x.REG_AR0 + n, true
- }
- case "F":
- if 0 <= n && n <= 15 {
- return s390x.REG_F0 + n, true
- }
- case "R":
- if 0 <= n && n <= 15 {
- return s390x.REG_R0 + n, true
- }
- case "V":
- if 0 <= n && n <= 31 {
- return s390x.REG_V0 + n, true
- }
- }
- return 0, false
- }
|