Changeset 1304:b995c146366e
- Timestamp:
- 05/06/09 13:56:33
(3 years ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- Children:
1308:316e9ecfeb7d 1310:85b80c4fe48a
- branch:
- default
- Message:
Ignore short/long prefix of labels instead of ignoring the whole branch
instruction!
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1303 |
r1304 |
|
| 1420 | 1420 | nextToken(); |
|---|
| 1421 | 1421 | } |
|---|
| 1422 | | else if ( token->value == TOKint16 || token->value == TOKint32 ) |
|---|
| 1423 | | { |
|---|
| 1424 | | //throw away the 'short' in "jle short label;". Works for 'long' also. |
|---|
| 1425 | | operands[0] = operands[1]; |
|---|
| 1426 | | return; |
|---|
| 1427 | | } |
|---|
| 1428 | 1422 | else if ( token->value != TOKeof ) |
|---|
| 1429 | 1423 | { |
|---|
| … | … | |
| 2741 | 2735 | Expression * e; |
|---|
| 2742 | 2736 | Identifier * ident = NULL; |
|---|
| | 2737 | |
|---|
| | 2738 | // get rid of short/long prefixes for branches |
|---|
| | 2739 | if (opTakesLabel() && (token->value == TOKint16 || token->value == TOKint64)) |
|---|
| | 2740 | nextToken(); |
|---|
| 2743 | 2741 | |
|---|
| 2744 | 2742 | switch ( token->value ) |
|---|
| … | … | |
| 2888 | 2886 | goto do_dollar; |
|---|
| 2889 | 2887 | break; |
|---|
| 2890 | | case TOKint16: |
|---|
| 2891 | | case TOKint32: |
|---|
| 2892 | | //This if for the 'short' in "jle short Label;" |
|---|
| 2893 | | return Handled; |
|---|
| 2894 | 2888 | default: |
|---|
| 2895 | 2889 | if ( op == Op_FMath0 || op == Op_FdST0ST1 || op == Op_FMath ) |
|---|
| r1303 |
r1304 |
|
| 1542 | 1542 | nextToken(); |
|---|
| 1543 | 1543 | } |
|---|
| 1544 | | else if ( token->value == TOKint16 || token->value == TOKint32 || token->value == TOKint64 ) |
|---|
| 1545 | | { |
|---|
| 1546 | | //throw away the 'short' in "jle short Label;". Works for long also. |
|---|
| 1547 | | operands[0] = operands[1]; |
|---|
| 1548 | | return; |
|---|
| 1549 | | } |
|---|
| 1550 | 1544 | else if ( token->value != TOKeof ) |
|---|
| 1551 | 1545 | { |
|---|
| … | … | |
| 2864 | 2858 | Expression * e; |
|---|
| 2865 | 2859 | Identifier * ident = NULL; |
|---|
| | 2860 | |
|---|
| | 2861 | // get rid of short/long prefixes for branches |
|---|
| | 2862 | if (opTakesLabel() && (token->value == TOKint16 || token->value == TOKint64)) |
|---|
| | 2863 | nextToken(); |
|---|
| 2866 | 2864 | |
|---|
| 2867 | 2865 | switch ( token->value ) |
|---|
| … | … | |
| 3011 | 3009 | goto do_dollar; |
|---|
| 3012 | 3010 | break; |
|---|
| 3013 | | case TOKint16: |
|---|
| 3014 | | case TOKint32: |
|---|
| 3015 | | case TOKint64: |
|---|
| 3016 | | //This is for the 'short' in "jle short Label;" |
|---|
| 3017 | | return Handled; |
|---|
| 3018 | | break; |
|---|
| 3019 | 3011 | default: |
|---|
| 3020 | 3012 | if ( op == Op_FMath0 || op == Op_FdST0ST1 || op == Op_FMath ) |
|---|