forked from Mirrors/tinycc
inline-asm: Accept "flags" clobber
parent
b7ca74577b
commit
8765826465
|
@ -347,7 +347,7 @@ static void parse_operand(TCCState *s1, Operand *op)
|
||||||
goto no_skip;
|
goto no_skip;
|
||||||
} else {
|
} else {
|
||||||
reg_error:
|
reg_error:
|
||||||
tcc_error("unknown register");
|
tcc_error("unknown register %%%s", get_tok_str(tok, &tokc));
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
no_skip: ;
|
no_skip: ;
|
||||||
|
@ -1487,7 +1487,8 @@ ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
|
||||||
TokenSym *ts;
|
TokenSym *ts;
|
||||||
|
|
||||||
if (!strcmp(str, "memory") ||
|
if (!strcmp(str, "memory") ||
|
||||||
!strcmp(str, "cc"))
|
!strcmp(str, "cc") ||
|
||||||
|
!strcmp(str, "flags"))
|
||||||
return;
|
return;
|
||||||
ts = tok_alloc(str, strlen(str));
|
ts = tok_alloc(str, strlen(str));
|
||||||
reg = ts->tok;
|
reg = ts->tok;
|
||||||
|
|
|
@ -2566,7 +2566,7 @@ static __inline__ void sigaddset1(unsigned int *set, int _sig)
|
||||||
|
|
||||||
static __inline__ void sigdelset1(unsigned int *set, int _sig)
|
static __inline__ void sigdelset1(unsigned int *set, int _sig)
|
||||||
{
|
{
|
||||||
asm("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc");
|
asm("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc", "flags");
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline__ __const__ unsigned int swab32(unsigned int x)
|
static __inline__ __const__ unsigned int swab32(unsigned int x)
|
||||||
|
|
Loading…
Reference in New Issue