Neil Brown
91092c17ff
Added some missing static specifiers to some occam support functions
2009-04-01 18:59:10 +00:00
Neil Brown
e9730bfe1e
Got the C++ backend working again, on the cgtests at least
2009-04-01 15:25:18 +00:00
Neil Brown
f0a64cb33f
Added some Tock support functions for allocating and freeing workspaces
...
It turns out that we weren't freeing workspaces, and neither was CCSP, and hence in long-running programs we were leaking memory at a crazy rate. This fix works, but really this stuff should be in CCSP (Currently, it doesn't seem to have a ProcFree function...)
2009-03-27 17:25:09 +00:00
Neil Brown
e08197bbef
Added various bits for shared channels, which now means that cgtest86 compiles and passes
2009-03-24 00:08:02 +00:00
Neil Brown
10b4cd7cfc
Realised that allocating mobile arrays as arrays of bytes screws up the resize intrinsic, and gave it a helping hand
2009-03-23 21:28:28 +00:00
Neil Brown
fae0d6d6a2
Made intrinsic PROCs take the workspace as a parameter, and turned . to _ in their names (and implemented the RESIZE.MOBILE.ARRAY.1D intrinsic)
2009-03-23 15:46:24 +00:00
Neil Brown
a995d29c32
Moved the mobile stuff across to use the CCSP API
2009-03-19 11:33:09 +00:00
Neil Brown
4bc15aae48
Bashed the backend until it works with the new mobility passes (standard occam may be broken though)
2009-02-27 17:12:17 +00:00
Neil Brown
564f611fb3
Fixed the types on the string intrinstics to be unsigned char rather than char
2009-02-27 17:01:46 +00:00
Neil Brown
6e0b56c7f6
Added some preprocessor stuff to help stop Tock trampling over various defines
2009-01-27 17:04:18 +00:00
Neil Brown
d4f1ac2797
Added nearly all the remaining intrinsic functions (all the *TOSTRING and STRINGTO*, except for floating-point types)
2009-01-27 17:00:28 +00:00
Neil Brown
f4f08e09aa
Fixed the RAN/DRAN intrinsic
2009-01-27 13:50:42 +00:00
Neil Brown
63d558df20
Fixed some GCC warnings resulting from not passing the printf format through to all the necessary support functions
2009-01-27 13:03:26 +00:00
Neil Brown
d1e0ec07c4
Finished off the last of the floating point intrinsics (from appendices K and M)
...
cgtest19 now passes all its tests
2009-01-27 12:21:18 +00:00
Neil Brown
08f862685c
Implemented several of the remaining floating-point intrinsics
2009-01-27 12:04:30 +00:00
Neil Brown
2fc545d09d
Implemented REAL32OP and REAL64OP
2009-01-26 19:02:19 +00:00
Neil Brown
20e24b807f
Cleared up some signed/unsigned warnings in the latest intrinsics
2009-01-26 19:01:56 +00:00
Neil Brown
41946716f0
Implemented ASHIFTRIGHT (straightforward) and ASHIFTLEFT (amazingly hard) and tested them
2009-01-26 18:57:50 +00:00
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