summaryrefslogtreecommitdiffstats
path: root/libacc/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove ACC which has been replaced with llvm.Jason Sams2010-09-0152-4782/+0
| | | | | | Free up space in build. Change-Id: Ic5cc48bacca47b45809b9bc649ae5b629b7427ed
* Fix static and shared library usage for acc and accRuntimeTestJack Palevich2009-11-121-0/+5
|
* Build accRuntimeTest with static library rather than shared library.Jack Palevich2009-11-121-2/+3
|
* Skip OTCCANSI test on OS XJack Palevich2009-11-121-3/+11
| | | | | OS X can't load stderr/stdin/stdout through the DLL symbol lookup interface, so it can't compile the otcc-ansi.c test.
* Build acc tool with static rather than shared library.Jack Palevich2009-11-121-2/+3
| | | | | 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.
* am 556c60f4: am 51da51a2: am 02effee6: Correctly compute the type of an ↵Jack Palevich2009-11-092-0/+14
|\ | | | | | | | | | | | | | | | | assignment expression. Merge commit '556c60f4f27e2a3bfde6a47acf876716ea8d5795' * commit '556c60f4f27e2a3bfde6a47acf876716ea8d5795': Correctly compute the type of an assignment expression.
| * Correctly compute the type of an assignment expression.Jack Palevich2009-11-092-0/+14
| | | | | | | | | | | | | | | | | | 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 support for the continue statementJack Palevich2009-10-292-0/+17
| | | | | | | | | | Add error check for a break statement that's not inside a loop. (We just generated bad code before. Oops!)
* | Implement typedef.Jack Palevich2009-10-282-0/+46
| |
* | Support nested macros. (Still don't support macro arguments.)Jack Palevich2009-10-273-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Print out error message when symbol lookup fails.Jack Palevich2009-10-271-1/+8
| |
* | Add back missing libdl in linker command. The executables here contain callDoug Kwan2009-10-021-2/+4
|/ | | | | | 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.
* Produce error rather than assert when encountering a nested function.Jack Palevich2009-09-181-4/+11
| | | | | | Remove extra '\n' characters from error messages. Dynamically allocate error message buffer.
* Add a script "accarm" for ad-hoc testing of the ARM acc compiler.Jack Palevich2009-09-101-0/+69
| | | | | | | 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.
* Move ARM disassembler out of libacc and into the acc command-line tool.Jack Palevich2009-09-095-7/+1136
|
* Improve address operator (unary &).Jack Palevich2009-09-042-0/+38
| | | | | | | | | | | | 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]; }
* Preliminary struct and union support.Jack Palevich2009-08-262-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make pointer casting work.Jack Palevich2009-08-252-0/+15
|
* Add runtime check for whether or not the OTCC-output tests can be run.Jack Palevich2009-08-251-2/+11
| | | | This means we don't have to manually specify the --norunotcc flag.
* Add a --nox86 flag to allow disabling x86 testsJack Palevich2009-08-191-1/+5
| | | | The x86 tests don't work on non-Linux systems.
* Handle functions with anonymous argumentsJack Palevich2009-08-192-0/+13
| | | | | | | | Example: int f(int a, int, int c) { return a + c; }
* Allow redefinition of macros.Jack Palevich2009-08-181-0/+1
| | | | | | | | | Example: #define A 3 #define A 4 This used to do strange things, but now works as it should.
* Allow '//'-style comments in #defines.Jack Palevich2009-08-181-2/+3
|
* Allow parenthesized expressions as the value of definesJack Palevich2009-08-183-12/+53
| | | | | | | | | | | | | | | | | | | | | | 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.
* Support 2D arrays.Jack Palevich2009-08-042-0/+42
|
* Implement arrays.Jack Palevich2009-08-042-0/+87
| | | | | Added check to see that pointer types are compatible when passing function arguments.
* Add support for "short" data type.Jack Palevich2009-08-033-0/+19
|
* Fix parsing of function declarations that return pointers.Jack Palevich2009-07-312-6/+9
| | | | Check that <op>= only evaluates the left-hand-side once.
* Support brackets for accessing array values.Jack Palevich2009-07-312-0/+68
| | | | Don't yet support allocating arrays.
* Implement pre-increment / pre-decrementJack Palevich2009-07-312-0/+8
|
* Support the comma operator.Jack Palevich2009-07-312-0/+45
|
* Implement op=.Jack Palevich2009-07-312-0/+80
|
* Test multiple levels of pointer indirection.Jack Palevich2009-07-312-1/+47
|
* Fix bad ARM code generation for '||' and '&&' operators.Jack Palevich2009-07-302-0/+58
| | | | Add tests of '&', '&&', '|' and '||' operators.
* Load function symbols using lea syntax.Jack Palevich2009-07-291-1/+1
| | | | Use a common code path for ordinary, forward, and indirect calls.
* Implement inc/dec in a more lval-friendly way.Jack Palevich2009-07-292-0/+19
|
* Fix the ARM postdecrement operator.Jack Palevich2009-07-232-7/+57
| | | | Add a test for ++ and -- so this bug won't happen again.
* Coerce R0 to destination type before storing it into a variable.Jack Palevich2009-07-162-0/+12
|
* Improve numerical constant parsing.Jack Palevich2009-07-152-1/+18
|
* Add accRegisterSymbolCallback API to control external symbol linkage.Jack Palevich2009-07-143-0/+148
| | | | | | 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.
* Add test for passing floats and doubles as ints, floats, and doubles.Jack Palevich2009-07-142-12/+25
|
* Make forward declarations of external symbols really work.Jack Palevich2009-07-142-0/+13
| | | | | Until now we had always been treating external variables as "int", and external functions as int (...);
* Implement pointer arithmetic.Jack Palevich2009-07-132-0/+23
|
* Implement support for "char" local and global variables.Jack Palevich2009-07-132-0/+19
|
* Implement general casts and pointer dereferencing.Jack Palevich2009-07-132-68/+169
| | | | Prior to this casts and pointer dereferencing were special-cased.
* Run tests on both ARM and x86Jack Palevich2009-07-131-9/+61
|
* Implement floating point for ARM.Jack Palevich2009-07-093-8/+37
|
* Add x86 floating point test.Jack Palevich2009-07-091-3/+61
|
* Finish implementing x86 floating pointJack Palevich2009-07-092-1/+16
| | | | | | | | | 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.
* Implement x86 floating point operationsJack Palevich2009-07-081-0/+115
| | | | | | | + unary floating point operation - + unary floating point compare: ! + binary floating point operations +-*/ + binary floating point comparisons: < <= == != >= >