diff options
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 28b241075ab..f7c1d8c4103 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1352,12 +1352,16 @@ asm_noperands (rtx body) int i; int n_sets; - /* Count backwards through CLOBBERs to determine number of SETs. */ + /* APPLE LOCAL CW asm blocks. */ + /* Count backwards through CLOBBERs/USEs to determine number of SETs. */ for (i = XVECLEN (body, 0); i > 0; i--) { if (GET_CODE (XVECEXP (body, 0, i - 1)) == SET) break; - if (GET_CODE (XVECEXP (body, 0, i - 1)) != CLOBBER) + /* APPLE LOCAL begin CW asm blocks. */ + if (GET_CODE (XVECEXP (body, 0, i - 1)) != CLOBBER + && GET_CODE (XVECEXP (body, 0, i - 1)) != USE) + /* APPLE LOCAL end CW asm blocks. */ return -1; } @@ -1389,9 +1393,13 @@ asm_noperands (rtx body) body is [(asm_operands ...) (clobber (reg ...))...]. */ int i; - /* Make sure all the other parallel things really are clobbers. */ + /* APPLE LOCAL CW asm blocks. */ + /* Make sure all the other parallel things really are clobbers or uses. */ for (i = XVECLEN (body, 0) - 1; i > 0; i--) - if (GET_CODE (XVECEXP (body, 0, i)) != CLOBBER) + /* APPLE LOCAL begin CW asm blocks. */ + if (GET_CODE (XVECEXP (body, 0, i)) != CLOBBER + && GET_CODE (XVECEXP (body, 0, i)) != USE) + /* APPLE LOCAL end CW asm blocks. */ return -1; return ASM_OPERANDS_INPUT_LENGTH (XVECEXP (body, 0, 0)); @@ -1479,9 +1487,11 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs, && GET_CODE (SET_SRC (XVECEXP (body, 0, 0))) == ASM_OPERANDS) { rtx asmop = SET_SRC (XVECEXP (body, 0, 0)); - int nparallel = XVECLEN (body, 0); /* Includes CLOBBERs. */ + /* APPLE LOCAL begin CW asm blocks. */ + int nparallel = XVECLEN (body, 0); /* Includes CLOBBERs/USEs. */ int nin = ASM_OPERANDS_INPUT_LENGTH (asmop); - int nout = 0; /* Does not include CLOBBERs. */ + int nout = 0; /* Does not include CLOBBERs/USEs. */ + /* APPLE LOCAL end CW asm blocks. */ /* At least one output, plus some CLOBBERs. */ @@ -1489,7 +1499,10 @@ decode_asm_operands (rtx body, rtx *operands, rtx **operand_locs, Their constraints are in the ASM_OPERANDS itself. */ for (i = 0; i < nparallel; i++) { - if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER) + /* APPLE LOCAL begin CW asm blocks. */ + if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER + || GET_CODE (XVECEXP (body, 0, i)) == USE) + /* APPLE LOCAL end CW asm blocks. */ break; /* Past last SET */ if (operands) |