BackupGGCode / open-source-spin-compiler

A C/C++-based port of the Parallax Propeller Spin/PASM Compiler
0 stars 0 forks source link

non-working DAT expression handling (using r29) #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With the program below all I get is 1 for the shift expressions. Adding an ^ -1 
at the end of line 1 affects all 8 expressions and it's still wrong.

CON
  XO_0 = 0
  XO_1 = 1

  XI_0 = 2
  XI_1 = 3

PUB null
DAT             org     0

                long    -1
{line 1}        long    |< XO_0
                long    |< XO_1
                long    |< XI_0
                long    |< XI_1
                long    -1
                long    |< 0
                long    |< 1
                long    |< 2
                long    |< 3
                long    -1

                fit

Original issue reported on code.google.com by marko.lu...@kyi.biglobe.ne.jp on 27 Jan 2012 at 10:51

GoogleCodeExporter commented 9 years ago
ExpressionResolver.cpp, line 821

        case op_dcd:
            result = 1;
            result <<= (value2 & 0xFF);
            break;

This should use value1 instead.

Original comment by marko.lu...@kyi.biglobe.ne.jp on 28 Jan 2012 at 1:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r30.

Original comment by reltham on 28 Jan 2012 at 9:27