mirror of
https://github.com/golang/go
synced 2024-11-20 05:14:41 -07:00
cmd/6c, cmd/8c: use signed char explicitly in mul.c
On ARM, char is unsigned, and the code generation for multiplication gets totally broken. Fixes #4354. R=golang-dev, dave, minux.ma, rsc CC=golang-dev https://golang.org/cl/6826079
This commit is contained in:
parent
4ef91fc854
commit
cc224c004d
@ -35,17 +35,17 @@ typedef struct Mparam Mparam;
|
||||
|
||||
struct Malg
|
||||
{
|
||||
char vals[10];
|
||||
schar vals[10];
|
||||
};
|
||||
|
||||
struct Mparam
|
||||
{
|
||||
uint32 value;
|
||||
char alg;
|
||||
schar alg;
|
||||
char neg;
|
||||
char shift;
|
||||
char arg;
|
||||
char off;
|
||||
schar off;
|
||||
};
|
||||
|
||||
static Mparam multab[32];
|
||||
@ -101,7 +101,7 @@ mulparam(uint32 m, Mparam *mp)
|
||||
{
|
||||
int c, i, j, n, o, q, s;
|
||||
int bc, bi, bn, bo, bq, bs, bt;
|
||||
char *p;
|
||||
schar *p;
|
||||
int32 u;
|
||||
uint32 t;
|
||||
|
||||
|
@ -35,17 +35,17 @@ typedef struct Mparam Mparam;
|
||||
|
||||
struct Malg
|
||||
{
|
||||
char vals[10];
|
||||
schar vals[10];
|
||||
};
|
||||
|
||||
struct Mparam
|
||||
{
|
||||
uint32 value;
|
||||
char alg;
|
||||
schar alg;
|
||||
char neg;
|
||||
char shift;
|
||||
char arg;
|
||||
char off;
|
||||
schar off;
|
||||
};
|
||||
|
||||
static Mparam multab[32];
|
||||
@ -101,7 +101,7 @@ mulparam(uint32 m, Mparam *mp)
|
||||
{
|
||||
int c, i, j, n, o, q, s;
|
||||
int bc, bi, bn, bo, bq, bs, bt;
|
||||
char *p;
|
||||
schar *p;
|
||||
int32 u;
|
||||
uint32 t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user