Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4734)

Issue 6710043: code review 6710043: cmd/5g: introduce componentgen for better registerization. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by remyoudompheng
Modified:
11 years, 4 months ago
Reviewers:
minux1
CC:
dave_cheney.net, rsc, golang-dev
Visibility:
Public.

Description

cmd/5g: introduce componentgen for better registerization. It is essentially identical to the version in 6g.

Patch Set 1 #

Patch Set 2 : diff -r 6b67a925abcc https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 11f0ba3b7006 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 8df088298a0c https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -77 lines) Patch
M src/cmd/5g/cgen.c View 1 8 chunks +184 lines, -70 lines 0 comments Download
M src/cmd/5g/gg.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/5g/ggen.c View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/cmd/5g/gsubr.c View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/cmd/5g/reg.c View 1 2 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 21
remyoudompheng
Please test.
11 years, 6 months ago (2012-10-16 06:12:27 UTC) #1
dave_cheney.net
On 2012/10/16 06:12:27, remyoudompheng wrote: > Please test. cmd/go panic: runtime error: invalid memory address ...
11 years, 6 months ago (2012-10-16 06:49:20 UTC) #2
dave_cheney.net
On 2012/10/16 06:49:20, dfc wrote: > On 2012/10/16 06:12:27, remyoudompheng wrote: > > Please test. ...
11 years, 6 months ago (2012-10-16 07:18:16 UTC) #3
remyoudompheng
It seems to give different results when compiling with -N (tried running the produced go ...
11 years, 6 months ago (2012-10-17 20:23:34 UTC) #4
remyoudompheng
Hello dave@cheney.net, minux.ma@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 6 months ago (2012-10-17 21:07:57 UTC) #5
remyoudompheng
The bug was that mkvar was ignoring strings and slices (unlike 6g/8g) so it wasn't ...
11 years, 6 months ago (2012-10-17 21:09:01 UTC) #6
dave_cheney.net
Will do. Thank you On 18 Oct 2012 08:09, <remyoudompheng@gmail.com> wrote: > The bug was ...
11 years, 6 months ago (2012-10-17 21:14:43 UTC) #7
dave_cheney.net
LGTM. Please note, the following benchmark has CL 6717043 (fast _div) applied in both old ...
11 years, 6 months ago (2012-10-18 00:47:07 UTC) #8
remyoudompheng
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 6 months ago (2012-10-18 06:59:16 UTC) #9
dave_cheney.net
http://codereview.appspot.com/6710043/diff/9001/src/cmd/5g/reg.c File src/cmd/5g/reg.c (right): http://codereview.appspot.com/6710043/diff/9001/src/cmd/5g/reg.c#newcode989 src/cmd/5g/reg.c:989: case TFUNC: comparing to 6g, this looks correct.
11 years, 6 months ago (2012-10-18 09:31:00 UTC) #10
remyoudompheng
ping any opinion on where there is going?
11 years, 6 months ago (2012-10-26 06:41:33 UTC) #11
dave_cheney.net
Still LGTM. On Fri, Oct 26, 2012 at 5:41 PM, <remyoudompheng@gmail.com> wrote: > ping > ...
11 years, 6 months ago (2012-10-26 13:55:04 UTC) #12
remyoudompheng
I'll submit this tomorrow unless there are remarks.
11 years, 6 months ago (2012-10-27 10:03:34 UTC) #13
remyoudompheng
*** Submitted as http://code.google.com/p/go/source/detail?r=8e87cb8dca7d *** cmd/5g: introduce componentgen for better registerization. It is essentially identical ...
11 years, 6 months ago (2012-10-28 19:11:28 UTC) #14
minux1
Though strange, I just determined that this change is responsible for a test failure of ...
11 years, 4 months ago (2012-12-18 23:32:52 UTC) #15
rsc
Are you sync'ed past http://code.google.com/p/go/source/detail?r=0f491e663a44?
11 years, 4 months ago (2012-12-18 23:53:39 UTC) #16
minux1
On Wednesday, December 19, 2012, Russ Cox wrote: > Are you sync'ed past > http://code.google.com/p/go/source/detail?r=0f491e663a44? ...
11 years, 4 months ago (2012-12-19 00:04:25 UTC) #17
rsc
Can you post the 5g -S output? I don't have a working 5g here.
11 years, 4 months ago (2012-12-19 00:16:50 UTC) #18
minux1
On Wednesday, December 19, 2012, minux wrote: > > On Wednesday, December 19, 2012, Russ ...
11 years, 4 months ago (2012-12-19 00:24:52 UTC) #19
rsc
Normally the return PC for a call leads to the instruction after the call, so ...
11 years, 4 months ago (2012-12-19 00:40:14 UTC) #20
minux1
11 years, 4 months ago (2012-12-19 01:18:54 UTC) #21
thank you for your detailed explanation.

On Wednesday, December 19, 2012, Russ Cox wrote:

> Normally the return PC for a call leads to the instruction after the
> call, so the traceback code moves backward one instruction, in order
> to print the line of the call instead of the line of the code that
> follows the call. A signal like this is made to look like a call
> returning to the signaling instruction, so that if it did get handled
> and the signal handler returned, the instruction would be given a
> second chance to execute. If the traceback code shows the line of the
> previous instruction instead of the line of the actual instruction,
> that would explain the behavior you are seeing.
>
> runtime/traceback_arm.c says
>
>                         if(runtime·showframe(f)) {
>                                 // Print during crash.
>                                 //      main(0x1, 0x2, 0x3)
>                                 //
> /home/rsc/go/src/runtime/x.go:23 +0xf
>                                 tracepc = pc;   // back up to CALL
> instruction for funcline.
>                                 if(n > 0 && pc > f->entry && !waspanic)
>                                         tracepc -= sizeof(uintptr);
>
> It sounds like maybe in your case waspanic is 0 here but should be 1.
>
> waspanic is set during the previous frame, as waspanic = f->entry ==
> (uintptr)runtime·sigpanic. That's the thread_darwin.c:431 frame have
> on your stack, but it is strange that there is a bug348.go:47 frame
> between thread_darwin.c:431 and bug348.go:15/17. Why does the panic
> appear to have happened in main.main called from main.f, instead of
> the other way around?
>
> That is:
> 8488 /var/mobile/go/src/bug348.go 28
> 59468 /var/mobile/go/src/pkg/runtime/panic.c 134
> 61048 /var/mobile/go/src/pkg/runtime/panic.c 384
> 87056 /var/mobile/go/src/pkg/runtime/thread_darwin.c 431
> 8428 /var/mobile/go/src/bug348.go 47 <<<
> 8232 /var/mobile/go/src/bug348.go 17 <<<
>
> The two <<< lines seem backward to me. If you can arrange for them to
> end up in the right order then I think everything will start working.
> I expect the bug is in runtime.sighandler in your signal_darwin_arm.c.

i figure out the stupid error i made in the signal handler.
thank you russ for pointing me directly to the error.
thank you remy for exposing the error.

i will make a test to catch this kind of error in the future.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b