Commit graph

165 commits

Author SHA1 Message Date
Eric Fischer
035b427c70 am 722a5c04: Add support for "standalone months" to tztime\'s strftime().
Merge commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4'

* commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4':
  Add support for "standalone months" to tztime's strftime().
2009-05-15 10:15:18 -07:00
Android (Google) Code Review
9ded6bb1e1 Merge change 1741
* changes:
  ACC: Arm code gen improvements ++/--, &, odds and ends
2009-05-14 19:42:45 -07:00
Android (Google) Code Review
243fb9ff0f Merge change 1740
* changes:
  Implement <, >, ==, !=, >= <=, &&, and ||.
2009-05-14 19:42:17 -07:00
Jack Palevich
bd894904f7 ACC: Arm code gen improvements ++/--, &, odds and ends
Added C++-style "//..end-of-line" comments, since I kept trying to use them when writing
test programs.

The biggest known missing piece is global variables.
2009-05-14 19:35:31 -07:00
Eric Fischer
722a5c0462 Add support for "standalone months" to tztime's strftime().
The idea here is that some languages need a different form of the month
name in constructions like "January 2" than in "January 2009", since the
one in the "January 2" case really means "of January."  So with this change,
a format string of "%-B" will use the standalone month, while "%B" will
continue to use the format month.
2009-05-14 17:22:20 -07:00
Jack Palevich
8de461dc9e Implement <, >, ==, !=, >= <=, &&, and ||. 2009-05-14 17:21:45 -07:00
Android (Google) Code Review
60e300f6f3 Merge change 1714
* changes:
  ACC ARM code gen: Implement local variables, function args
2009-05-14 16:45:04 -07:00
Jack Palevich
69796b6c84 ACC ARM code gen: Implement local variables, function args
+ Fix prolog and epilog code.
2009-05-14 16:43:18 -07:00
San Mehat
a47c2fdd4a am c83cd879: init: Fix heap corruption for services with arguments
Merge commit 'c83cd879d45e667fbb4763f18c908928ee9d67d8'

* commit 'c83cd879d45e667fbb4763f18c908928ee9d67d8':
  init: Fix heap corruption for services with arguments
  toolbox: ifconfig: Implement mtu setting, plus setting interface addr should
  toolbox: route: Reflow some of the mess, fix route add parameter names to
2009-05-14 15:12:43 -07:00
San Mehat
c83cd879d4 init: Fix heap corruption for services with arguments
The 'args' array *must* be the last entry in the structure.

This fixes a longstanding issue (apparently since tc3) where
a service with an argument would corrupt the heap. The more
arguments, the more corruption :|. This will probably also end up
making key-code bound services more reliable (ie: bugreports triggered
via the keyboard)

Signed-off-by: San Mehat <san@google.com>
2009-05-14 15:08:04 -07:00
Jack Palevich
cb1c9ef38c ACC ARM code gen improvements. printf("Hello, world\n"); works!
+ Improved li to handle all 32-bit values.
+ Implemented push/pop of temp registers during evaluation
+ Implemented the unary and binary easy math operators (+,-,*,<<,>>,|,&,^,~)
+ Implemented global function calling.
2009-05-14 14:27:06 -07:00
San Mehat
54a1eb7677 toolbox: ifconfig: Implement mtu setting, plus setting interface addr should
implicitly 'up' the iface just like normal ifconfig does.

Also convert tabs -> spaces
2009-05-14 07:28:52 -07:00
San Mehat
83ec181dc7 toolbox: route: Reflow some of the mess, fix route add parameter names to
match standard route

Signed-off-by: San Mehat <san@google.com>
2009-05-14 07:28:45 -07:00
Android (Google) Code Review
11f6b92818 Merge change 1629
* changes:
  ARM codegen: Add disassembler, implement return
2009-05-13 19:53:49 -07:00
Android (Google) Code Review
2ae648f012 Merge change 1628
* changes:
  Begin filling in ARM code generator.
2009-05-13 19:53:32 -07:00
Android (Google) Code Review
a6986aa8e8 Merge change 1627
* changes:
  Add stub Arm code generator.
2009-05-13 19:53:13 -07:00
Jack Palevich
a653561097 ARM codegen: Add disassembler, implement return
This program works:

    main() { return 42; }

The disassembler was borrowed from codeflinger, and just modified enough to compile
under C++ without warnings.

Implemented gsym
Implemented a hack verison of li, only works for -256..255
Implemented gjmp
2009-05-13 19:51:03 -07:00
Jack Palevich
546b2249ef Begin filling in ARM code generator.
We can now call functions that have no arguments (and return from them too!)
2009-05-13 15:10:04 -07:00
San Mehat
e00d31aeb1 am 0389a12: toolbox: Make that \'pointopoint\' instead of \'pointtopoint\'
Merge commit '0389a1297d65321a882ea0dcc69f4de4e3bcb169'

* commit '0389a1297d65321a882ea0dcc69f4de4e3bcb169':
  toolbox: Make that 'pointopoint' instead of 'pointtopoint'
2009-05-13 12:52:53 -07:00
San Mehat
80c3b189d7 am 94447ca: nexus: Introduce skelaton OpenVpnController class + remove s
Merge commit '94447ca34b2abf9b0d9d9cb52a18bf8ba0f01b61'

* commit '94447ca34b2abf9b0d9d9cb52a18bf8ba0f01b61':
  nexus: Introduce skelaton OpenVpnController class + remove some debug messages
2009-05-13 12:52:53 -07:00
San Mehat
4676aacd5e am fa49e28: toolbox: Add \'pointopoint\' support to ifconfig
Merge commit 'fa49e2860bebe6bb2a26194c58992e5d5aed0b0d'

* commit 'fa49e2860bebe6bb2a26194c58992e5d5aed0b0d':
  toolbox: Add 'pointopoint' support to ifconfig
2009-05-13 12:52:53 -07:00
San Mehat
06683a0564 am 82a2116: nexus: Initial support for manipulating wifi networks + chan
Merge commit '82a2116e6b67db910bba22c4874e6ca5efd3eec0'

* commit '82a2116e6b67db910bba22c4874e6ca5efd3eec0':
  nexus: Initial support for manipulating wifi networks + change wifi scan notification msgs
2009-05-13 12:52:53 -07:00
San Mehat
c6f0a25d91 am df6c1b9: libsysutils: General clean up + disable build in simulator b
Merge commit 'df6c1b91e3813886070f35929583c30cfaead918'

* commit 'df6c1b91e3813886070f35929583c30cfaead918':
  libsysutils: General clean up + disable build in simulator builds
2009-05-13 12:52:53 -07:00
Andy McFadden
ef94ff4ddf am 6fc287b: Fix sim build (need explicit -lpthread).
Merge commit '6fc287b6f6df62c73e1057e26475fec2837296cc'

* commit '6fc287b6f6df62c73e1057e26475fec2837296cc':
  Fix sim build (need explicit -lpthread).
2009-05-13 12:52:53 -07:00
San Mehat
0389a1297d toolbox: Make that 'pointopoint' instead of 'pointtopoint'
Signed-off-by: San Mehat <san@google.com>
2009-05-13 12:01:52 -07:00
San Mehat
94447ca34b nexus: Introduce skelaton OpenVpnController class + remove some debug messages
Signed-off-by: San Mehat <san@google.com>
2009-05-13 11:54:16 -07:00
Jack Palevich
2230513fc0 Add stub Arm code generator. 2009-05-13 10:58:45 -07:00
San Mehat
fa49e2860b toolbox: Add 'pointopoint' support to ifconfig
Signed-off-by: San Mehat <san@google.com>
2009-05-13 10:05:06 -07:00
San Mehat
82a2116e6b nexus: Initial support for manipulating wifi networks + change wifi scan notification msgs
Signed-off-by: San Mehat <san@google.com>
2009-05-13 09:10:01 -07:00
San Mehat
df6c1b91e3 libsysutils: General clean up + disable build in simulator builds
Signed-off-by: San Mehat <san@google.com>
2009-05-13 09:10:01 -07:00
Andy McFadden
6fc287b6f6 Fix sim build (need explicit -lpthread). 2009-05-13 07:25:03 -07:00
San Mehat
2ac16b7e46 am e67651c: nexus: Cleanup the scanner and plug it all in so it works
Merge commit 'e67651c89d0cbb759219412d49cbc5680c17df06'

* commit 'e67651c89d0cbb759219412d49cbc5680c17df06':
  nexus: Cleanup the scanner and plug it all in so it works
2009-05-12 19:06:54 -07:00
San Mehat
8cdd90163e am dbdb0db: libsysutils: Fix bug where we\'d leak our control pipes when
Merge commit 'dbdb0db516fa4935ff7b5c05914932099237d808'

* commit 'dbdb0db516fa4935ff7b5c05914932099237d808':
  libsysutils: Fix bug where we'd leak our control pipes when closing down a listener
2009-05-12 19:06:54 -07:00
San Mehat
62b68731eb am 8d3fc3f: nexus: Use constants for errorcodes
Merge commit '8d3fc3fde308fbda1b04759b26bb4fc29d41339f'

* commit '8d3fc3fde308fbda1b04759b26bb4fc29d41339f':
  nexus: Use constants for errorcodes
2009-05-12 19:06:53 -07:00
San Mehat
9c150d82b8 am d530592: libsysutils: Send command arguments to the command, not the
Merge commit 'd530592848985ba4edeafeb413eb5ff58c138eab'

* commit 'd530592848985ba4edeafeb413eb5ff58c138eab':
  libsysutils: Send command arguments to the command, not the command again :P
2009-05-12 19:06:53 -07:00
San Mehat
e67651c89d nexus: Cleanup the scanner and plug it all in so it works
Signed-off-by: San Mehat <san@google.com>
2009-05-12 15:50:49 -07:00
San Mehat
dbdb0db516 libsysutils: Fix bug where we'd leak our control pipes when closing down a listener
Signed-off-by: San Mehat <san@google.com>
2009-05-12 15:50:26 -07:00
San Mehat
8d3fc3fde3 nexus: Use constants for errorcodes
Signed-off-by: San Mehat <san@google.com>
2009-05-12 14:36:32 -07:00
San Mehat
d530592848 libsysutils: Send command arguments to the command, not the command again :P
Signed-off-by: San Mehat <san@google.com>
2009-05-12 14:35:15 -07:00
San Mehat
55e2c9de30 am 69772dc: nexus: Move to a line based protocol (similar to FTP) + fix
Merge commit '69772dc644e1ccc12b6394267f010100470f3c95'

* commit '69772dc644e1ccc12b6394267f010100470f3c95':
  nexus: Move to a line based protocol (similar to FTP) + fix bugs
2009-05-12 14:18:53 -07:00
San Mehat
294449dd6e am d768066: libsysutils: Tweak SocketListener and friends
Merge commit 'd768066ef54270a0d3ccfccd50ae8238db5a2cdd'

* commit 'd768066ef54270a0d3ccfccd50ae8238db5a2cdd':
  libsysutils: Tweak SocketListener and friends
2009-05-12 14:15:22 -07:00
San Mehat
69772dc644 nexus: Move to a line based protocol (similar to FTP) + fix bugs
Signed-off-by: San Mehat <san@google.com>
2009-05-12 14:02:32 -07:00
San Mehat
d768066ef5 libsysutils: Tweak SocketListener and friends
Signed-off-by: San Mehat <san@google.com>
2009-05-12 14:02:32 -07:00
Jack Palevich
bf42c9c163 Move all x86-specific knowlege into the X86CodeGenerator. 2009-05-12 13:46:16 -07:00
Jack Palevich
21a15a2416 Various C++ improvements
+ Changed indentation, causes the stats to say there's a lot of lines changed.
+ Should be able to compile multiple times with the same compiler object.
+ Create a CodeBuffer class to hold the code.
+ Create a CodeGenerator class to encapsulate knowlege of the CPU instruction set.
+ Started filling in the code generator.
2009-05-11 18:49:27 -07:00
Frabrice Bellard
a96930572c Document acc language features.
Original text from http://www.ioccc.org/2001/bellard.hint
2009-05-11 14:51:47 -07:00
Jack Palevich
bbf8ab504a Added command-line option "-t" to allow run-time switching between running and dumping.
Fixed some C++ warnings reported by g++ .
Verified that the compiler actually works when run on 32-bit Linux.
2009-05-11 11:54:30 -07:00
Android (Google) Code Review
aad2046b4d Merge change 1366
* changes:
  converted to C++
2009-05-11 10:01:13 -07:00
Android (Google) Code Review
7c2b8fb27a Merge change 1365
* changes:
  Remove all gcc warnings.
2009-05-11 10:00:49 -07:00
Android (Google) Code Review
bdb4d40e48 Merge change 1364
* changes:
  Replace acc.c with the contents of otccn.c, update tests.
2009-05-11 10:00:27 -07:00