| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Free up space in build.
Change-Id: Ic5cc48bacca47b45809b9bc649ae5b629b7427ed
|
| |
|
| |
|
|
|
|
|
| |
OS X can't load stderr/stdin/stdout through the DLL symbol lookup
interface, so it can't compile the otcc-ansi.c test.
|
|
|
|
|
| |
OS X does not allow relative shared library path names in compiled apps,
so we have to create and link with a static library version of libacc.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
assignment expression.
Merge commit '556c60f4f27e2a3bfde6a47acf876716ea8d5795'
* commit '556c60f4f27e2a3bfde6a47acf876716ea8d5795':
Correctly compute the type of an assignment expression.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change enables following types of statements to work correctly:
a = b = 3;
if ((a = getchar()) < 0) { ... }
This fixes 2232082 acc: assignment in comparison segfaults
|
| |
| |
| |
| |
| | |
Add error check for a break statement that's not inside a loop. (We just
generated bad code before. Oops!)
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now you can say:
#define A B
#define B C
#define C 4
int x = A;
And it will work as expected.
Print an error message rather than assert when we're expecting a
function value, but don't find one.
|
| | |
|
|/
|
|
|
|
| |
to function defined in libdl.so but the library is missing the linker commands.
Currently, the library is linked via dependency of another library. While this
works, it is not the right thing to do.
|
|
|
|
|
|
| |
Remove extra '\n' characters from error messages.
Dynamically allocate error message buffer.
|
|
|
|
|
|
|
| |
This script copies the test file over to the ARM, runs the acc compiler
on ARM, and then prints out the results.
It also syncs the acc compiler binary over to the ARM.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now the address operator only worked with simple variables.
Now it works with arbitrary expressions (that are lvalues or function
names). So for example this now works:
struct S { int a[10]};
int f(struct S* p) {
return &p->a[3];
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Working features:
- struct
- union
- nested structs
- anonymous structs
- forward declarations
- '.' and '->'
- copying structs using '='
Missing features:
- passing structs by value
- returning structs by value
- typedef
- sizeof
Example:
struct v {float x, y, z, w; };
void add(struct v* result, struct v* a, struct v* b) {
result->x = a->x + b->x;
result->y = a->y + b->y;
result->z = a->z + b->z;
result->w = a->w + b->w;
}
Reworked size-of and alignment logic to support structs.
Improved encoding of ARM immediate constants.
|
| |
|
|
|
|
| |
This means we don't have to manually specify the --norunotcc flag.
|
|
|
|
| |
The x86 tests don't work on non-Linux systems.
|
|
|
|
|
|
|
|
| |
Example:
int f(int a, int, int c) {
return a + c;
}
|
|
|
|
|
|
|
|
|
| |
Example:
#define A 3
#define A 4
This used to do strange things, but now works as it should.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, this now works:
#define A (1 + 2)
Note that we still don't support defines with argument lists, so this is
still illegal:
#define A(X) (X + 2)
Also in this change: The compiler test script allows command-line
arguments to disable testing on ARM and to disable testing the output
of the old OTCC compiler.
Disabling testing on ARM is handy for developing front-end code when no
device or emulator is available.
Disabling testing OTCC output is handy for some 64-bit Linux environments,
because the original OTCC needs some tweaking to be fully compatible, and
I don't have time to investigate this problem right now.
|
| |
|
|
|
|
|
| |
Added check to see that pointer types are compatible when passing function
arguments.
|
| |
|
|
|
|
| |
Check that <op>= only evaluates the left-hand-side once.
|
|
|
|
| |
Don't yet support allocating arrays.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add tests of '&', '&&', '|' and '||' operators.
|
|
|
|
| |
Use a common code path for ordinary, forward, and indirect calls.
|
| |
|
|
|
|
| |
Add a test for ++ and -- so this bug won't happen again.
|
| |
|
| |
|
|
|
|
|
|
| |
Until now dlsym was used to lookup external symbols. Now you can
register your own function to be called when an undefined symbol is
used.
|
| |
|
|
|
|
|
| |
Until now we had always been treating external variables as "int",
and external functions as int (...);
|
| |
|
| |
|
|
|
|
| |
Prior to this casts and pointer dereferencing were special-cased.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Support floating-point if/while statements: if(1.0) { ... }
Support reading values from float and double pointers.
And some additional error checking.
Detect malformed "return" statements
Detect passing the results of "void" functions as arguments.
|
|
|
|
|
|
|
| |
+ unary floating point operation -
+ unary floating point compare: !
+ binary floating point operations +-*/
+ binary floating point comparisons: < <= == != >= >
|