]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/6g, cmd/8g: proginfo carry fixes
authorRuss Cox <rsc@golang.org>
Tue, 13 Aug 2013 01:02:55 +0000 (21:02 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 13 Aug 2013 01:02:55 +0000 (21:02 -0400)
Bugs pointed out by cshapiro in CL 12637051.

R=cshapiro
CC=golang-dev
https://golang.org/cl/12815043

src/cmd/6g/prog.c
src/cmd/8g/prog.c

index f3c48126543c9868249e22003149ce28e6ed5f7f..b62dc63fe6e54e2768abdbe8fb8df63c0686e334 100644 (file)
@@ -99,18 +99,18 @@ static ProgInfo progtable[ALAST] = {
        [ADECQ]=        {SizeQ | RightRdwr},
        [ADECW]=        {SizeW | RightRdwr},
 
-       [ADIVB]=        {SizeB | LeftRead, AX, AX},
-       [ADIVL]=        {SizeL | LeftRead, AX|DX, AX|DX},
-       [ADIVQ]=        {SizeQ | LeftRead, AX|DX, AX|DX},
-       [ADIVW]=        {SizeW | LeftRead, AX|DX, AX|DX},
+       [ADIVB]=        {SizeB | LeftRead | SetCarry, AX, AX},
+       [ADIVL]=        {SizeL | LeftRead | SetCarry, AX|DX, AX|DX},
+       [ADIVQ]=        {SizeQ | LeftRead | SetCarry, AX|DX, AX|DX},
+       [ADIVW]=        {SizeW | LeftRead | SetCarry, AX|DX, AX|DX},
 
        [ADIVSD]=       {SizeD | LeftRead | RightRdwr},
        [ADIVSS]=       {SizeF | LeftRead | RightRdwr},
 
-       [AIDIVB]=       {SizeB | LeftRead, AX, AX},
-       [AIDIVL]=       {SizeL | LeftRead, AX|DX, AX|DX},
-       [AIDIVQ]=       {SizeQ | LeftRead, AX|DX, AX|DX},
-       [AIDIVW]=       {SizeW | LeftRead, AX|DX, AX|DX},
+       [AIDIVB]=       {SizeB | LeftRead | SetCarry, AX, AX},
+       [AIDIVL]=       {SizeL | LeftRead | SetCarry, AX|DX, AX|DX},
+       [AIDIVQ]=       {SizeQ | LeftRead | SetCarry, AX|DX, AX|DX},
+       [AIDIVW]=       {SizeW | LeftRead | SetCarry, AX|DX, AX|DX},
 
        [AIMULB]=       {SizeB | LeftRead | SetCarry, AX, AX},
        [AIMULL]=       {SizeL | LeftRead | ImulAXDX | SetCarry},
@@ -262,10 +262,10 @@ static ProgInfo progtable[ALAST] = {
        [ASUBSD]=       {SizeD | LeftRead | RightRdwr},
        [ASUBSS]=       {SizeF | LeftRead | RightRdwr},
 
-       [ATESTB]=       {SizeB | LeftRead | RightRead},
-       [ATESTL]=       {SizeL | LeftRead | RightRead},
-       [ATESTQ]=       {SizeQ | LeftRead | RightRead},
-       [ATESTW]=       {SizeW | LeftRead | RightRead},
+       [ATESTB]=       {SizeB | LeftRead | RightRead | SetCarry},
+       [ATESTL]=       {SizeL | LeftRead | RightRead | SetCarry},
+       [ATESTQ]=       {SizeQ | LeftRead | RightRead | SetCarry},
+       [ATESTW]=       {SizeW | LeftRead | RightRead | SetCarry},
 
        [AUCOMISD]=     {SizeD | LeftRead | RightRead},
        [AUCOMISS]=     {SizeF | LeftRead | RightRead},
index ca877ad128e2beb307e42c3fbcd17f3f2cc26515..05d69853b28107319a4fba2dfd2c139d5f207b7e 100644 (file)
@@ -87,9 +87,9 @@ static ProgInfo progtable[ALAST] = {
        [ADECL]=        {SizeL | RightRdwr},
        [ADECW]=        {SizeW | RightRdwr},
 
-       [ADIVB]=        {SizeB | LeftRead, AX, AX},
-       [ADIVL]=        {SizeL | LeftRead, AX|DX, AX|DX},
-       [ADIVW]=        {SizeW | LeftRead, AX|DX, AX|DX},
+       [ADIVB]=        {SizeB | LeftRead | SetCarry, AX, AX},
+       [ADIVL]=        {SizeL | LeftRead | SetCarry, AX|DX, AX|DX},
+       [ADIVW]=        {SizeW | LeftRead | SetCarry, AX|DX, AX|DX},
 
        [ADIVSD]=       {SizeD | LeftRead | RightRdwr},
        [ADIVSS]=       {SizeF | LeftRead | RightRdwr},
@@ -137,9 +137,9 @@ static ProgInfo progtable[ALAST] = {
        [AFMULDP]=      {SizeD | LeftAddr | RightRdwr},
        [AFMULF]=       {SizeF | LeftAddr | RightRdwr},
 
-       [AIDIVB]=       {SizeB | LeftRead, AX, AX},
-       [AIDIVL]=       {SizeL | LeftRead, AX|DX, AX|DX},
-       [AIDIVW]=       {SizeW | LeftRead, AX|DX, AX|DX},
+       [AIDIVB]=       {SizeB | LeftRead | SetCarry, AX, AX},
+       [AIDIVL]=       {SizeL | LeftRead | SetCarry, AX|DX, AX|DX},
+       [AIDIVW]=       {SizeW | LeftRead | SetCarry, AX|DX, AX|DX},
 
        [AIMULB]=       {SizeB | LeftRead | SetCarry, AX, AX},
        [AIMULL]=       {SizeL | LeftRead | ImulAXDX | SetCarry},
@@ -282,9 +282,9 @@ static ProgInfo progtable[ALAST] = {
        [ASUBSD]=       {SizeD | LeftRead | RightRdwr},
        [ASUBSS]=       {SizeF | LeftRead | RightRdwr},
 
-       [ATESTB]=       {SizeB | LeftRead | RightRead},
-       [ATESTL]=       {SizeL | LeftRead | RightRead},
-       [ATESTW]=       {SizeW | LeftRead | RightRead},
+       [ATESTB]=       {SizeB | LeftRead | RightRead | SetCarry},
+       [ATESTL]=       {SizeL | LeftRead | RightRead | SetCarry},
+       [ATESTW]=       {SizeW | LeftRead | RightRead | SetCarry},
 
        [AUCOMISD]=     {SizeD | LeftRead | RightRead},
        [AUCOMISS]=     {SizeF | LeftRead | RightRead},