summaryrefslogtreecommitdiff
path: root/src/cmd/9g
Commit message (Collapse)AuthorAgeFilesLines
* all: power64 is now ppc64Russ Cox2014-12-054-12/+12
| | | | | | | | | Fixes issue 8654. LGTM=austin R=austin CC=golang-codereviews https://codereview.appspot.com/180600043
* [dev.cc] cmd/5g,cmd/6g,cmd/9g: fix warnings on Plan 9David du Colombier2014-11-251-1/+1
| | | | | | | | | | | warning: src/cmd/5g/reg.c:461 format mismatch d VLONG, arg 5 warning: src/cmd/6g/reg.c:396 format mismatch d VLONG, arg 5 warning: src/cmd/9g/reg.c:440 format mismatch d VLONG, arg 5 LGTM=minux R=rsc, minux CC=golang-codereviews https://codereview.appspot.com/179300043
* [dev.cc] 9g: peephole optimizerAustin Clements2014-11-241-4/+892
| | | | | | | | | | | This was based on the 9c peephole optimizer, modified to work with code generated by gc and use the proginfo infrastructure in gc. LGTM=rsc R=rsc, bradfitz, minux CC=golang-codereviews https://codereview.appspot.com/179190043
* [dev.cc] 9g: fill progtable for CC, V, and VCC instruction variantsAustin Clements2014-11-242-0/+172
| | | | | | | | | | | | | | | This adds some utilities for converting between the CC, V, and VCC variants of operations and uses these to derive the ProgInfo entries for these variants (which are identical to the ProgInfo for the base operations). The 9g peephole optimizer will also use these conversion utilities. LGTM=minux, rsc R=rsc, dave, minux CC=golang-codereviews https://codereview.appspot.com/180110044
* [dev.cc] 9g: correct bad proginfo for ADUFFZERO and ADUFFCOPYAustin Clements2014-11-211-4/+5
| | | | | | | LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/176130044
* [dev.power64] 5g,6g,8g,9g: debug prints for regopt pass 6 and paint2Austin Clements2014-11-141-5/+2
| | | | | | | | | | | Theses were very helpful in understanding the regions and register selection when porting regopt to 9g. Add them to the other compilers (and improve 9g's successor debug print). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/174130043
* [dev.power64] 9g: implement regoptAustin Clements2014-11-132-29/+1232
| | | | | | | | | | This adds registerization support to 9g equivalent to what the other compilers have. LGTM=rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/174980043
* [dev.power64] 9g: proginfo fixesAustin Clements2014-11-121-8/+14
| | | | | | | | | | | | For D_OREG addresses, store the used registers in regindex instead of reguse because they're really part of addressing. Add implicit register use/set for DUFFZERO/DUFFCOPY. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/174050044
* [dev.power64] 9g: fix width check and width calculation for OADDRAustin Clements2014-11-121-1/+2
| | | | | | | LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/174970043
* [dev.power64] 9g: fix addr width calculation; enable MOV* width checkAustin Clements2014-11-061-12/+13
| | | | | | | | | | | | | | 9g's naddr was missing assignments to a->width in several cases, so the optimizer was getting bogus width information. Add them. This correct width information also lets us enable the width check in gins for MOV*. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/167310043
* [dev.power64] gc: fix etype of stringsAustin Clements2014-11-061-1/+1
| | | | | | | | | | | | | | The etype of references to strings was being incorrectly set to TINT32 on all platforms. Change it to TSTRING. It seems this doesn't matter for compilation, since x86 uses LEA instructions to load string addresses and arm and power64 disassemble the string into its constituent pieces (with the correct types), but it helps when debugging. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/170100043
* [dev.power64] 9g: fix niloptAustin Clements2014-11-031-1/+3
| | | | | | | | | | | | | | | | | | | Previously, nilopt was disabled on power64x because it threw away "seemly random segments of code." Indeed, excise on power64x failed to preserve the link field, so it excised not only the requested instruction but all following instructions in the function. Fix excise to retain the link field while otherwise zeroing the instruction. This makes nilopt safe on power64x. It still fails nilptr3.go's tests for removal of repeated nil checks because those depend on also optimizing away repeated loads, which doesn't currently happen on power64x. LGTM=dave, rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/168120043
* [dev.power64] 9g: fix under-zeroing in clearfatAustin Clements2014-10-311-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | All three cases of clearfat were wrong on power64x. The cases that handle 1032 bytes and up and 32 bytes and up both use MOVDU (one directly generated in a loop and the other via duffzero), which leaves the pointer register pointing at the *last written* address. The generated code was not accounting for this, so the byte fill loop was re-zeroing the last zeroed dword, rather than the bytes following the last zeroed dword. Fix this by simply adding an additional 8 byte offset to the byte zeroing loop. The case that handled under 32 bytes was also wrong. It didn't update the pointer register at all, so the byte zeroing loop was simply re-zeroing the beginning of region. Again, the fix is to add an offset to the byte zeroing loop to account for this. LGTM=dave, bradfitz R=rsc, dave, bradfitz CC=golang-codereviews https://codereview.appspot.com/168870043
* [dev.power64] all: merge default into dev.power64Austin Clements2014-10-223-30/+0
| | | | | | | | | | | This brings dev.power64 up-to-date with the current tip of default. go_bootstrap is still panicking with a bad defer when initializing the runtime (even on amd64). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/152570049
* build: merge the great pkg/ rename into dev.power64Austin Clements2014-10-222-3/+3
| | | | | | | | | This also removes pkg/runtime/traceback_lr.c, which was ported to Go in an earlier commit and then moved to runtime/traceback.go. Reviewer: rsc@golang.org rsc: LGTM
* [dev.power64] build: merge default into dev.power64Austin Clements2014-10-223-8/+1
| | | | | | | LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/160200044
* [dev.power64] cmd/9g: correct floating point comparisonRuss Cox2014-08-141-2/+2
| | | | | | | LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/129210043
* [dev.power64] cmd/9g: fix floating-point comparison for NaNRuss Cox2014-08-131-5/+14
| | | | | | | LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/127300043
* [dev.power64] cmd/9g: add missing breakShenghou Ma2014-08-131-0/+1
| | | | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125260043 Committer: Russ Cox <rsc@golang.org>
* [dev.power64] cmd/9g: do not ignore move instructions even if from and to ↵Shenghou Ma2014-08-132-26/+0
| | | | | | | | | | | | | | | | are samaddr() Those moves might be significant (e.g. narrowing or widening): on Power64, we don't distinguish between MOVWD and MOVW. This fixes divmode.go and bug447.go. LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125200043 Committer: Russ Cox <rsc@golang.org>
* [dev.power64] cmd/9g: use loops to do memmove in sgen()Shenghou Ma2014-08-131-18/+21
| | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/128130044
* [dev.power64] cmd/9g: introduce ginscon2 for CMP/CMPU, use ginscon to ADD ↵Shenghou Ma2014-08-123-4/+37
| | | | | | | | | constants LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125170043
* [dev.power64] cmd/9g: clear p->reg for ATEXTShenghou Ma2014-08-121-0/+2
| | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/125150043
* [dev.power64] cmd/9g, cmd/gc, cmd/ld: fix build.Shenghou Ma2014-08-121-3/+15
| | | | | | | | | | | 1. disable nonsplit stack overflow check 2. disable OLROT recognition 3. emit correct instructions for adding offsets to an address LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/123310043
* [dev.power64] cmd/9g: implement zerorangeShenghou Ma2014-08-121-22/+47
| | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/121540043
* [dev.power64] cmd/9g: first check pointShenghou Ma2014-08-1110-0/+5503
| | | | | | | LGTM=rsc R=rsc, iant CC=golang-codereviews https://codereview.appspot.com/123170043
* [dev.power64] cmd/9g: add doc.go to prevent build failures.Shenghou Ma2014-08-061-0/+16
After CL 117670045, cmd/dist will expect to have a cmd/9g directory. LGTM=rsc, dave R=rsc, iant, dave CC=golang-codereviews https://codereview.appspot.com/126780043