Commit cc224c00 authored by Rémy Oudompheng's avatar Rémy Oudompheng

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
parent 4ef91fc8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment