Changeset 3820 in CLRX


Ignore:
Timestamp:
Feb 18, 2018, 6:13:28 AM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmExpr?: Update error messages for binary/logical operators.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmExpression.cpp

    r3817 r3820  
    644644                        { } // keep old value
    645645                        else if (!norel1 || !norel2)
    646                             ASMX_FAILED_BY_ERROR(sourcePos,
    647                                  "Binary AND is not allowed for any relative value")
     646                            ASMX_FAILED_BY_ERROR(sourcePos, "Binary AND is not allowed "
     647                                    "for any relative value except special cases")
    648648                        else
    649649                            value = value2 & value;
     
    667667                        { } // keep old value
    668668                        else if (!norel1 || !norel2)
    669                             ASMX_FAILED_BY_ERROR(sourcePos,
    670                                  "Binary OR is not allowed for any relative value")
     669                            ASMX_FAILED_BY_ERROR(sourcePos, "Binary OR is not allowed "
     670                                    "for any relative value except special cases")
    671671                        else
    672672                            value = value2 | value;
     
    685685                        { } // keep old value
    686686                        else if (!norel1 || !norel2)
    687                             ASMX_FAILED_BY_ERROR(sourcePos,
    688                                  "Binary XOR is not allowed for any relative value")
     687                            ASMX_FAILED_BY_ERROR(sourcePos, "Binary XOR is not allowed "
     688                                    "for any relative value except special cases")
    689689                        else
    690690                            value = value2 ^ value;
     
    713713                        }
    714714                        else if (!norel1 || !norel2)
    715                             ASMX_FAILED_BY_ERROR(sourcePos,
    716                                  "Binary ORNOT is not allowed for any relative value")
     715                            ASMX_FAILED_BY_ERROR(sourcePos, "Binary ORNOT is not allowed "
     716                                    "for any relative value except special cases")
    717717                        else
    718718                            value = value2 | ~value;
     
    776776                        }
    777777                        else if (!norel1 || !norel2)
    778                             ASMX_FAILED_BY_ERROR(sourcePos,
    779                                  "Logical AND is not allowed for any relative value")
     778                            ASMX_FAILED_BY_ERROR(sourcePos, "Logical AND is not allowed "
     779                                    "for any relative value except special cases")
    780780                        else
    781781                            value = value2 && value;
     
    792792                        }
    793793                        else if (!CHKSREL(relatives) || !CHKSREL(relatives2))
    794                             ASMX_FAILED_BY_ERROR(sourcePos,
    795                                  "Logical OR is not allowed for any relative value")
     794                            ASMX_FAILED_BY_ERROR(sourcePos, "Logical OR is not allowed "
     795                                    "for any relative value except special cases")
    796796                        else
    797797                            value = value2 || value;
  • CLRadeonExtender/trunk/tests/amdasm/AsmBasicsCases2.cpp

    r3818 r3820  
    590590test.s:22:18: Error: Division is not allowed for any relative value
    591591test.s:23:18: Error: Modulo is not allowed for any relative value
    592 test.s:24:18: Error: Binary OR is not allowed for any relative value
    593 test.s:25:18: Error: Binary AND is not allowed for any relative value
    594 test.s:26:18: Error: Binary XOR is not allowed for any relative value
    595 test.s:27:18: Error: Logical AND is not allowed for any relative value
    596 test.s:28:18: Error: Logical OR is not allowed for any relative value
    597 test.s:29:18: Error: Binary ORNOT is not allowed for any relative value
     592test.s:24:18: Error: Binary OR is not allowed for any relative value except special cases
     593test.s:25:18: Error: Binary AND is not allowed for any relative value except special cases
     594test.s:26:18: Error: Binary XOR is not allowed for any relative value except special cases
     595test.s:27:18: Error: Logical AND is not allowed for any relative value except special cases
     596test.s:28:18: Error: Logical OR is not allowed for any relative value except special cases
     597test.s:29:18: Error: Binary ORNOT is not allowed for any relative value except special cases
    598598test.s:30:18: Error: For comparisons two values must have this same relatives!
    599599test.s:31:18: Error: For comparisons two values must have this same relatives!
     
    606606test.s:38:18: Error: For comparisons two values must have this same relatives!
    607607test.s:39:18: Error: For comparisons two values must have this same relatives!
    608 test.s:40:18: Error: Binary ORNOT is not allowed for any relative value
    609 test.s:41:18: Error: Binary OR is not allowed for any relative value
    610 test.s:42:18: Error: Binary AND is not allowed for any relative value
    611 test.s:43:18: Error: Binary XOR is not allowed for any relative value
    612 test.s:44:18: Error: Logical AND is not allowed for any relative value
    613 test.s:45:18: Error: Logical OR is not allowed for any relative value
     608test.s:40:18: Error: Binary ORNOT is not allowed for any relative value except special cases
     609test.s:41:18: Error: Binary OR is not allowed for any relative value except special cases
     610test.s:42:18: Error: Binary AND is not allowed for any relative value except special cases
     611test.s:43:18: Error: Binary XOR is not allowed for any relative value except special cases
     612test.s:44:18: Error: Logical AND is not allowed for any relative value except special cases
     613test.s:45:18: Error: Logical OR is not allowed for any relative value except special cases
    614614test.s:46:18: Error: Choice is not allowed for first relative value
    615615)ffDXD", ""
Note: See TracChangeset for help on using the changeset viewer.