From 137817378548b263f0322d8240a0c503b456f696 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 20 May 2015 17:35:43 -0700 Subject: [PATCH] cmd/internal/obj: remove F3t field from Prog F3t was effectively a local variable. Remove it. This shrinks obj.Prog from 456 to 448 bytes, which places it in a smaller malloc class. This reduces the memory usage of the compiler while compiling the rotate tests by ~2.75%. Change-Id: I31cc9dd67269851a430b56bcc7d255c9349eb522 Reviewed-on: https://go-review.googlesource.com/10255 Reviewed-by: Brad Fitzpatrick --- src/cmd/internal/obj/link.go | 1 - src/cmd/internal/obj/x86/asm6.go | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go index 9f5e87b4c3..b0c7a55ca1 100644 --- a/src/cmd/internal/obj/link.go +++ b/src/cmd/internal/obj/link.go @@ -222,7 +222,6 @@ type Prog struct { Scond uint8 Back uint8 Ft uint8 - F3t uint8 Tt uint8 Isize uint8 Printed uint8 diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index 0c0cc04548..2b9c2670df 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -2974,15 +2974,12 @@ func doasm(ctxt *obj.Link, p *obj.Prog) { if p.Ft == 0 { p.Ft = uint8(oclass(ctxt, p, &p.From)) } - if p.F3t == 0 { - p.F3t = uint8(oclass(ctxt, p, &p.From3)) - } if p.Tt == 0 { p.Tt = uint8(oclass(ctxt, p, &p.To)) } ft := int(p.Ft) * Ymax - f3t := int(p.F3t) * Ymax + f3t := oclass(ctxt, p, &p.From3) * Ymax tt := int(p.Tt) * Ymax xo := obj.Bool2int(o.op[0] == 0x0f) -- 2.48.1