Author Archives: Harald Haugli
Ioannina page
I have made a small page about Ioannina. There is at least one particularly wonderful walk/stroll you can do in this beautiful town.
Ioannina
New pictures, this time from beautiful Ioannina.
Symi Updates
The Symi page has updates for most of the walks from last year plus two new short walks.
Symi Again
More pictures from Symi at https://www.islandwalking.com/piwigo/index.php?/category/167.
LLVM Exercise VII
So why does the code produced in the last exercise contain the labels .LBB0_2 and .LBB0_3 but no .LBB0_1? Well that is because I have added a code generation pass that deletes useless jumps like: JNC .LBB0_1 .LBB0_1: Code snippets: void HP41MCODEPassConfig::addPreEmitPass() { addPass(new RemoveUselessJMP()); } … bool RemoveUselessJMP::runOnMachineBasicBlock( MachineBasicBlock &MBB, MachineBasicBlock &MBBN) { bool … Continue reading
LLVM Exercise VI
It is time to bring in some conditionals. Adding an “if” to our friend foo(): int foo() { int retval1 = 0x0AB; int retval2 = 0; if (retval2) return retval2; return retval1; } We need to implement instructions for both conditional and unconditional branches (i.e jumps). An unconditional branch is just like this (assuming no … Continue reading
LLVM Exercise V
Let us add some local variables: int foo() { int retval = 0x0AB; int dummy = 0; return retval; } This requires adding some information about accessing memory. I will just postulate that I have memory available from address 1 growing upwards. As anyone that really knows the HP-41 understands, this is a very bad … Continue reading