diff options
Diffstat (limited to 'src/cmd/internal/obj')
| -rw-r--r-- | src/cmd/internal/obj/arm64/a.out.go | 9 | ||||
| -rw-r--r-- | src/cmd/internal/obj/arm64/asm7.go | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/cmd/internal/obj/arm64/a.out.go b/src/cmd/internal/obj/arm64/a.out.go index bed129d891..f192a51b0a 100644 --- a/src/cmd/internal/obj/arm64/a.out.go +++ b/src/cmd/internal/obj/arm64/a.out.go @@ -254,6 +254,9 @@ const ( ) const ( + // optab is sorted based on the order of these constants + // and the first match is chosen. + // The more specific class needs to come earlier. C_NONE = iota C_REG // R0..R30 C_RSP // R0..R30, RSP @@ -266,13 +269,13 @@ const ( C_COND // EQ, NE, etc C_ZCON // $0 or ZR + C_ABCON0 // could be C_ADDCON0 or C_BITCON C_ADDCON0 // 12-bit unsigned, unshifted + C_ABCON // could be C_ADDCON or C_BITCON C_ADDCON // 12-bit unsigned, shifted left by 0 or 12 + C_MBCON // could be C_MOVCON or C_BITCON C_MOVCON // generated by a 16-bit constant, optionally inverted and/or shifted by multiple of 16 C_BITCON // bitfield and logical immediate masks - C_ABCON0 // could be C_ADDCON0 or C_BITCON - C_ABCON // could be C_ADDCON or C_BITCON - C_MBCON // could be C_MOVCON or C_BITCON C_LCON // 32-bit constant C_VCON // 64-bit constant C_FCON // floating-point constant diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go index 66a324943d..c0a19d2d2a 100644 --- a/src/cmd/internal/obj/arm64/asm7.go +++ b/src/cmd/internal/obj/arm64/asm7.go @@ -190,6 +190,10 @@ var optab = []Optab{ {AAND, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0}, {ABIC, C_REG, C_REG, C_REG, 1, 4, 0, 0, 0}, {ABIC, C_REG, C_NONE, C_REG, 1, 4, 0, 0, 0}, + {AAND, C_MBCON, C_REG, C_REG, 53, 4, 0, 0, 0}, + {AAND, C_MBCON, C_NONE, C_REG, 53, 4, 0, 0, 0}, + {ABIC, C_MBCON, C_REG, C_REG, 53, 4, 0, 0, 0}, + {ABIC, C_MBCON, C_NONE, C_REG, 53, 4, 0, 0, 0}, {AAND, C_BITCON, C_REG, C_REG, 53, 4, 0, 0, 0}, {AAND, C_BITCON, C_NONE, C_REG, 53, 4, 0, 0, 0}, {ABIC, C_BITCON, C_REG, C_REG, 53, 4, 0, 0, 0}, |
