aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/internal/obj/loong64/a.out.go3
-rw-r--r--src/cmd/internal/obj/loong64/asm.go10
-rw-r--r--src/cmd/internal/obj/loong64/cnames.go3
3 files changed, 6 insertions, 10 deletions
diff --git a/src/cmd/internal/obj/loong64/a.out.go b/src/cmd/internal/obj/loong64/a.out.go
index 23f71fd8ab..251c34c6ab 100644
--- a/src/cmd/internal/obj/loong64/a.out.go
+++ b/src/cmd/internal/obj/loong64/a.out.go
@@ -209,9 +209,8 @@ const (
C_LCON // other 32
C_DCON // other 64 (could subdivide further)
C_SACON // $n(REG) where n <= int12
- C_SECON
C_LACON // $n(REG) where int12 < n <= int32
- C_LECON
+ C_EXTADDR // external symbol address
C_DACON // $n(REG) where int32 < n
C_SBRA
C_LBRA
diff --git a/src/cmd/internal/obj/loong64/asm.go b/src/cmd/internal/obj/loong64/asm.go
index 99cebe3e4e..26ec30af37 100644
--- a/src/cmd/internal/obj/loong64/asm.go
+++ b/src/cmd/internal/obj/loong64/asm.go
@@ -179,12 +179,10 @@ var optab = []Optab{
{AMOVB, C_TLS_LE, C_NONE, C_NONE, C_REG, C_NONE, 54, 16, 0, 0},
{AMOVBU, C_TLS_LE, C_NONE, C_NONE, C_REG, C_NONE, 54, 16, 0, 0},
- {AMOVW, C_SECON, C_NONE, C_NONE, C_REG, C_NONE, 3, 4, 0, 0},
- {AMOVV, C_SECON, C_NONE, C_NONE, C_REG, C_NONE, 3, 4, 0, 0},
{AMOVW, C_SACON, C_NONE, C_NONE, C_REG, C_NONE, 3, 4, REGSP, 0},
{AMOVV, C_SACON, C_NONE, C_NONE, C_REG, C_NONE, 3, 4, REGSP, 0},
- {AMOVW, C_LECON, C_NONE, C_NONE, C_REG, C_NONE, 52, 8, 0, NOTUSETMP},
- {AMOVV, C_LECON, C_NONE, C_NONE, C_REG, C_NONE, 52, 8, 0, NOTUSETMP},
+ {AMOVW, C_EXTADDR, C_NONE, C_NONE, C_REG, C_NONE, 52, 8, 0, NOTUSETMP},
+ {AMOVV, C_EXTADDR, C_NONE, C_NONE, C_REG, C_NONE, 52, 8, 0, NOTUSETMP},
{AMOVW, C_LACON, C_NONE, C_NONE, C_REG, C_NONE, 26, 12, REGSP, 0},
{AMOVV, C_LACON, C_NONE, C_NONE, C_REG, C_NONE, 26, 12, REGSP, 0},
@@ -747,7 +745,7 @@ func (c *ctxt0) aclass(a *obj.Addr) int {
if s.Type == objabi.STLSBSS {
c.ctxt.Diag("taking address of TLS variable is not supported")
}
- return C_LECON
+ return C_EXTADDR
case obj.NAME_AUTO:
if a.Reg == REGSP {
@@ -1684,7 +1682,7 @@ func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32) {
rel2.Add = p.From.Offset
rel2.Type = objabi.R_LOONG64_ADDR_LO
- case 52: // mov $lext, r
+ case 52: // mov $ext, r
// NOTE: this case does not use REGTMP. If it ever does,
// remove the NOTUSETMP flag in optab.
o1 = OP_IR(c.opir(APCALAU12I), uint32(0), uint32(p.To.Reg))
diff --git a/src/cmd/internal/obj/loong64/cnames.go b/src/cmd/internal/obj/loong64/cnames.go
index 3841296f3a..955c464d2f 100644
--- a/src/cmd/internal/obj/loong64/cnames.go
+++ b/src/cmd/internal/obj/loong64/cnames.go
@@ -21,9 +21,8 @@ var cnames0 = []string{
"LCON",
"DCON",
"SACON",
- "SECON",
"LACON",
- "LECON",
+ "EXTADDR",
"DACON",
"SBRA",
"LBRA",