Commit Graph

40 Commits

Author SHA1 Message Date
Jeremy Rand 3def47d32f Make a step towards getting memory reads working. 2016-07-17 22:46:47 -04:00
Jeremy Rand f8d884f5f9 Get my first test source file compiling into valid ORCA/M assembly source. 2016-05-13 22:56:40 -04:00
Jeremy Rand 4cc95195f4 Get rid of the .globl directive in the assembly output. 2016-05-12 20:39:27 -04:00
Jeremy Rand acc21bea81 Get rid of the .text directive in the assembly output by creating a target object file class specific for the 65816. 2016-05-12 20:13:51 -04:00
Jeremy Rand 30e52d00c8 Get rid of the .size stuff in the assembly output and format the instructions better. 2016-04-22 00:05:07 -04:00
Jeremy Rand 48276b8f1f Add code to emit the case, keep and segment start/end directives in the output assembly file. Indent the instructions as ORCA/M expects. 2016-04-20 23:48:48 -04:00
Jeremy Rand f0e0e4ec4a Start creating the infrastructure for producing valid assembly for ORCA/M or Merlin. 2016-04-19 23:39:53 -04:00
Jeremy Rand 2253ae62fc Get the answerToTheUltimateQuestion() function to compile to something approximating 65816 assembly. With this commit, I can compile the simplest of functions but it is a start. 2016-04-07 23:15:53 -04:00
Jeremy Rand e013351e03 Clean up some problems in the register specification in the instruction format. 2016-02-27 23:31:12 -05:00
Jeremy Rand b95686b032 Add some more debug around which node is being visited. 2016-02-10 23:30:20 -05:00
Jeremy Rand 52705f393a More infrastructure required for the basic function which returns a constant integer. 2016-02-09 22:30:11 -05:00
Jeremy Rand 4fb15c1a07 Disable the fake direct page registers which are wider than 16-bits for now to workaround a problem. LLVM seems to promote everything to 32-bit if you say the machine has 32-bit or better registers even if I have indicated that the native bit width is 16. Disabling these gets me one step closer to my first successful compile. 2015-09-03 23:41:00 -04:00
Jeremy Rand 74cb03d2f6 Fix the calling convention for return values. I believe the way this works is that you specify the width of the single register and a list of registers to return values in for anything bigger. By having a return convention for [i32], I seem to have been telling LLVM that it can return a 32-bit value in X which it cannot do. 2015-08-31 23:30:50 -04:00
Jeremy Rand c09c887891 Adopt the standard LLVM debug infrastructure for WDC_LOG(). This way, debugging can be turned on/off at the command line using the "clang -mllvm -debug ..." option. 2015-08-28 23:11:18 -04:00
Jeremy Rand e7deb74a84 Adjust the target and ABI info for WDC65816 in clang. 2015-08-06 23:01:00 -04:00
Jeremy Rand 5d8601e987 Some more implementation towards my first successful compile of a simple function. 2015-08-06 00:20:12 -04:00
Jeremy Rand 2e2ecfb186 More implementation of LowerFormalArguments() and LowerReturn() 2015-08-05 00:22:22 -04:00
Jeremy Rand 4849b050ce Start adding an implementation for LowerFormalArguments(). 2015-08-03 23:42:37 -04:00
Jeremy Rand 4862a6612b Add placeholder implementations of a couple more methods. At this point, I can "compile":
int theAnswer(void)
{
return 42;
}

It compiles in the sense that clang executes to the end without crashing but the .s file it produces is useless.  But another small step forward.
2015-07-30 23:29:36 -04:00
Jeremy Rand 9d6408d419 Add register classes. 2015-07-30 23:12:12 -04:00
Jeremy Rand e3aaebf907 Fix crash which was caused by not attempting to compute register properties. Now, the register properties fail to be computed because "No integer registers defined!" 2015-07-30 01:48:59 -04:00
Jeremy Rand b11140166b Add some logs to help trace what i happening when executing. 2015-07-28 23:15:15 -04:00
Jeremy Rand 6bfb66385d Add a logging mechanism to make it easier to debug the 65816 code. 2015-07-28 00:18:06 -04:00
Jeremy Rand 39070eb1d0 Model the direct page as a series of 16-bit, 32-bit and 64-bit integer registers and also a series of 32-bit and 64-bit float registers. Reserve the 0th 32-bit integer register in the direct page for use as a frame pointer. 2015-07-23 23:45:42 -04:00
Jeremy Rand ecc8e5e9df Add a project specific readme file 2015-07-18 09:52:27 -05:00
Jeremy Rand ed4e0f234c Add a project specific readme file 2015-07-18 09:47:29 -05:00
Jeremy Rand cd009861d4 Adding project sources to the repository 2015-07-18 00:13:38 -05:00
Jeremy Rand 0726f818a2 Do not ignore project code either 2015-07-18 00:13:14 -05:00
Jeremy Rand 99ce1197a6 Add clang 2015-07-18 00:10:17 -05:00
Jeremy Rand 79f01ca4a8 Do not ignore clang for my 65816 work 2015-07-18 00:09:54 -05:00
Jeremy Rand 26846cab41 I have no idea why I thought I did't need a subtarget. I do need one so I have added it. 2015-07-17 23:57:48 -05:00
Jeremy Rand 9bb9bf24c8 More work towards getting the compiler to not crash. 2015-07-17 22:22:50 -05:00
Jeremy Rand 6900b043ed Remove some debug that I didn't intend to commit. 2015-07-17 20:16:29 -05:00
Jeremy Rand 8c1a0d70be Lots of basic infrastructure. And get it compiling. 2015-07-17 20:05:36 -05:00
Jeremy Rand 51e5e090e2 More fixes to the instruction definitions to try to get the build working. 2014-07-22 16:27:11 -04:00
Jeremy Rand 727ae91f80 More fixes to the instruction set definition to try to get things building again. 2014-07-19 23:17:18 -04:00
Jeremy Rand 91e7016b1f More work to get a basic WDC65816 infrastructure in and compiling. 2014-07-11 23:47:17 -04:00
Jeremy Rand 036df005af Add some more boilerplate for the 65816. 2014-07-06 23:24:07 -04:00
Jeremy Rand 4b9fc0c5ac Add a basic configuration for the 65816 target - build fails now… 2014-07-04 23:41:51 -04:00
Jeremy Rand 292c2829ab Initial commit with LLVM 3.4.1, cfe 3.4.1 and compiler-rt 3.4 2014-07-04 22:48:00 -04:00