| @@ -658,24 +658,20 @@ index (@code{REG_xxx} constants), but additionnal values and flags are · 657 unmodified lines |
| 658 | 658 | defined: |
| 659 | 659 | |
| 660 | 660 | @example |
| 661 | | −#define VT_CONST 0x00f0 /* constant in vc |
| 662 | | − (must be first non register value) */ |
| 663 | | −#define VT_LLOCAL 0x00f1 /* lvalue, offset on stack */ |
| 664 | | −#define VT_LOCAL 0x00f2 /* offset on stack */ |
| 665 | | −#define VT_CMP 0x00f3 /* the value is stored in processor flags (in vc) */ |
| 666 | | −#define VT_JMP 0x00f4 /* value is the consequence of jmp true (even) */ |
| 667 | | −#define VT_JMPI 0x00f5 /* value is the consequence of jmp false (odd) */ |
| 668 | | −#define VT_LVAL 0x0100 /* var is an lvalue */ |
| 669 | | −#define VT_FORWARD 0x0200 /* value is forward reference */ |
| 670 | | −#define VT_MUSTCAST 0x0400 /* value must be casted to be correct (used for |
| 671 | | − char/short stored in integer registers) */ |
| 672 | | −#define VT_MUSTBOUND 0x0800 /* bound checking must be done before |
| 673 | | − dereferencing value */ |
| 674 | | −#define VT_BOUNDED 0x8000 /* value is bounded. The address of the |
| 675 | | − bounding function call point is in vc */ |
| 676 | | −#define VT_LVAL_BYTE 0x1000 /* lvalue is a byte */ |
| 677 | | −#define VT_LVAL_SHORT 0x2000 /* lvalue is a short */ |
| 678 | | −#define VT_LVAL_UNSIGNED 0x4000 /* lvalue is unsigned */ |
| 661 | +#define VT_CONST 0x00f0 |
| 662 | +#define VT_LLOCAL 0x00f1 |
| 663 | +#define VT_LOCAL 0x00f2 |
| 664 | +#define VT_CMP 0x00f3 |
| 665 | +#define VT_JMP 0x00f4 |
| 666 | +#define VT_JMPI 0x00f5 |
| 667 | +#define VT_LVAL 0x0100 |
| 668 | +#define VT_SYM 0x0200 |
| 669 | +#define VT_MUSTCAST 0x0400 |
| 670 | +#define VT_MUSTBOUND 0x0800 |
| 671 | +#define VT_BOUNDED 0x8000 |
| 672 | +#define VT_LVAL_BYTE 0x1000 |
| 673 | +#define VT_LVAL_SHORT 0x2000 |
| 674 | +#define VT_LVAL_UNSIGNED 0x4000 |
| 679 | 675 | #define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED) |
| 680 | 676 | @end example |
| 681 | 677 | |
| @@ -692,7 +688,10 @@ stack. · 10 unmodified lines |
| 692 | 688 | @item VT_CMP |
| 693 | 689 | indicates that the value is actually stored in the CPU flags (i.e. the |
| 694 | 690 | value is the consequence of a test). The value is either 0 or 1. The |
| 695 | | −actual CPU flags used is indicated in @code{SValue.c.i}. |
| 691 | +actual CPU flags used is indicated in @code{SValue.c.i}. |
| 692 | + |
| 693 | +If any code is generated which destroys the CPU flags, this value MUST be |
| 694 | +put in a normal register. |
| 696 | 695 | |
| 697 | 696 | @item VT_JMP |
| 698 | 697 | @itemx VT_JMPI |
| @@ -702,6 +701,10 @@ indicates that the value is the consequence of a jmp. For VT_JMP, it is · 3 unmodified lines |
| 702 | 701 | These values are used to compile the @code{||} and @code{&&} logical |
| 703 | 702 | operators. |
| 704 | 703 | |
| 704 | +If any code is generated, this value MUST be put in a normal |
| 705 | +register. Otherwise, the generated code won't be executed if the jump is |
| 706 | +taken. |
| 707 | + |
| 705 | 708 | @item VT_LVAL |
| 706 | 709 | is a flag indicating that the value is actually an lvalue (left value of |
| 707 | 710 | an assignment). It means that the value stored is actually a pointer to |
| @@ -724,8 +727,8 @@ ASAP because its semantics are rather complicated. · 16 unmodified lines |
| 724 | 727 | indicates that a cast to the value type must be performed if the value |
| 725 | 728 | is used (lazy casting). |
| 726 | 729 | |
| 727 | | −@item VT_FORWARD |
| 728 | | −indicates that the value is a forward reference to a variable or a function. |
| 730 | +@item VT_SYM |
| 731 | +indicates that the symbol @code{SValue.sym} must be added to the constant. |
| 729 | 732 | |
| 730 | 733 | @item VT_MUSTBOUND |
| 731 | 734 | @itemx VT_BOUNDED |