Neil Brown
ec9efd378f
Corrected some warnings about unsigned constants in the C++ support headers
2009-01-26 18:55:07 +00:00
Neil Brown
e0e0b46052
Implemented SHIFTLEFT and SHIFTRIGHT
2009-01-26 18:11:15 +00:00
Neil Brown
8df1bc80f9
Implemented LONGDIV (passes the cgtests, but I'm not 100% confident in it)
2009-01-26 18:03:27 +00:00
Neil Brown
4a12999989
Implemented LONGPROD, in a slightly long-winded way
2009-01-26 17:57:45 +00:00
Neil Brown
df66042a99
Corrected a problem with LONGADD and implemented both LONGSUB and LONGDIFF
2009-01-26 15:46:37 +00:00
Neil Brown
0802d79d6c
Fixed a few more of the intrinsic functions
2009-01-25 22:30:07 +00:00
Neil Brown
062b47bad9
Made some intrinsics stop when they are supposed to (and tested it from rangetest) and implemented a couple more
2009-01-25 22:06:30 +00:00
Neil Brown
588d24bfea
Fixed a mistake with a missing type in a header
2009-01-25 22:06:01 +00:00
Neil Brown
ff61ebfa2b
Implemented several of the floating point intrinsics (using cgtest19 and the occam 2.1 manual)
2009-01-25 21:31:58 +00:00
Neil Brown
65171e4492
Implemented the ROTATELEFT and ROTATERIGHT intrinsics
2009-01-25 21:31:41 +00:00
Neil Brown
c30db7b11e
Added in C headers (dummy bodies) for all the intrinsic functions that I have so far defined in the Intrinsics module
2009-01-25 20:42:57 +00:00
Neil Brown
0189ba3793
Began implementing the occam intrinsics (some of them, at least) in the C support header
2009-01-23 19:20:26 +00:00
Neil Brown
c8a8370636
Remove the comment about needing to add overflow checking
...
Fixes #24
In that, it is the last patch in a series that fixed the lack of overflow checking in all the integer operations.
2009-01-23 14:28:44 +00:00
Neil Brown
084fcad1fe
Changed multiply back to the very simplest implementation
2009-01-23 13:36:09 +00:00
Neil Brown
ecf840fe9f
Had a go at implementing checked-multiply differently, but the results worked out slower
2009-01-23 12:44:37 +00:00
Neil Brown
72a8824940
Had a go at implementing multiply overflow checking (with a single division, and pre-checks)
...
I also added an occam testcase to help time the different between * and TIMES. But gcc optimises out the loop with TIMES under -O2, and with -O0 there is a factor of four difference.
2009-01-22 16:51:54 +00:00
Neil Brown
b08d48bd43
Added more remainder tests, and fixed our implementation of remainder to pass the tests
2009-01-22 12:58:53 +00:00
Neil Brown
fdeab43b3c
Added range checking for addition, subtraction, negation and division in the occam support headers
2009-01-22 11:26:06 +00:00
Neil Brown
8487af3b4c
Added some functions to the C++ support header to aid turning an array of channels into an array of channel-ends
2009-01-20 17:23:10 +00:00
Neil Brown
c79a1ca94c
Added a missing header include in tock_support.h that the newer GCC complains about
2008-11-23 19:44:37 +00:00
Neil Brown
4e6b166696
Fixed implicit mobility to work in the (C++, at least) backend
2008-06-01 19:46:32 +00:00
Neil Brown
0627ff2b4f
Changed the Rain TLP interface to use lists for output streams as I'd originally intended
2008-05-21 00:20:29 +00:00
Neil Brown
0b1708c241
Added the equality operator for tockList in the C++ support code
2008-05-21 00:20:11 +00:00
Neil Brown
20a142839f
Added the beginnings of list support for CCSP (using glib)
2008-03-25 18:44:49 +00:00
Adam Sampson
8625859773
Flush output when the C backend exits.
...
This makes "someprog | cat" work -- previously the output never got written.
The C++ support code already does this.
2008-04-08 15:12:24 +00:00
Adam Sampson
f445ccbdc9
Fix C style.
...
The Tock support headers (at least the C side) follow the KRoC C standards,
which are essentially K&R with spaces before function arg lists.
2008-04-08 15:08:25 +00:00
Neil Brown
0eadbd0b11
Added support for occam's flush (sending 255) and moved some of the unreachable flush commands in the C++ support headers
2008-03-25 11:37:02 +00:00
Neil Brown
986a4acb2b
Added support for a StreamReader (to support the input channel from stdin) to the C++CSP backend
2008-03-24 23:46:05 +00:00
Neil Brown
e8adfb51fa
Moved the code for setting up the terminal into tock_support.h so that C++CSP can use it too
2008-03-24 23:45:31 +00:00
Neil Brown
fc4cac736b
Added the helper functions for adding and subtracting Times in C++CSP
2008-03-23 13:29:22 +00:00
Neil Brown
5abb775ae4
Added the time-related intrinsic functions for Rain to the C++ backend
2008-03-23 12:39:16 +00:00
Neil Brown
887a3ba98d
Added helper functions for int8_t to tock_support.h (Rain needs these)
2008-03-23 12:18:18 +00:00
Neil Brown
bc7e682119
Added a Concat operator for lists, and added support for it (and list assignment) to the backends
2008-03-21 19:20:15 +00:00
Neil Brown
839d92546b
Altered the backends to support lists and foreach loops over lists (at least in the C++ part)
2008-03-19 17:20:52 +00:00
Adam Sampson
b814e81bec
Do away with the killval hack.
...
This now uses the same approach to detect a kill as libkrocif.
2008-03-12 16:43:15 +00:00
Adam Sampson
d7333e4479
Implement FLUSH in the output handlers.
2008-03-12 14:48:27 +00:00
Adam Sampson
88af6a29d2
Abstract CCSP setup into a function, and set up terminal properly.
...
If stdin is in use, it'll now be put into non-canonical mode. This is almost
the same as libkrocif's behaviour, except I've set VTIME to 0, since I don't
think there's a good reason to have a terminal read complete if no characters
are available.
This also sets CCSP's branding to "Tock", so error messages now start "Tock: ".
2008-03-12 14:38:58 +00:00
Adam Sampson
ac532be667
Implement stdin input handler.
...
This uses a slight hack to figure out when a killable BSC has actually been
killed (which I think should probably be a CCSP feature anyway).
2008-03-12 12:01:40 +00:00
Adam Sampson
f2d3280cee
Abstract killing TLP channel handlers out into a function.
2008-03-12 10:47:19 +00:00
Adam Sampson
7eaab68f04
Implement TLP output channels using a CIF helper process.
...
Input channels will be similar, but are stubbed out for now.
2008-03-11 18:47:48 +00:00
Neil Brown
0265063250
Re-added the index checking for array slices in the backend
2008-03-09 16:19:01 +00:00
Neil Brown
5c43172e46
Added an annotation to array subscripts to indicate whether they should have a run-time check added or not
2008-03-09 14:30:19 +00:00
Neil Brown
5197435b2c
Removed a lot of old comments and support code relating to the way arrays used to be handled in the C++ backend
2008-03-08 13:52:50 +00:00
Neil Brown
9ad4552232
Moved the error message for occam_stop into the StopException for C++, rather than printing it directly
2008-03-05 17:12:01 +00:00
Adam Sampson
50967cba95
Split the common C99/C++ support code out into a separate header.
...
Or, rather, add a new CIF-specific header, so tock_support.h is now the common
code and each of the backends has its own. This means some of the conditional
stuff can go away.
2008-03-05 16:54:29 +00:00
Adam Sampson
bb419d28b7
Move the headers into their own directory, and install them.
...
This should make it possible to use Tock from outside its own source directory.
2008-03-05 16:43:15 +00:00