| | Re: NQC v. LegOS / size
|
|
(...) Actually, I ran into another - you can divide by numbers that aren't powers of two. At least, I can't. There seems to be a missing assembler routine. Cheers, Ben. -- (URL) grandfather once told me that there are two kinds of people: those who (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) Oops. "...can't divide..."! (...) Cheers, Ben. -- (URL) grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
=>From: Ben Laurie <ben@algroup.co.uk> =>... =>Markus L. Noga wrote: =>> Apart from the limitations imposed by H8 architecture (an 8/16 bit =>> platform with the usual constraints on integer length, available memory =>> and library functions), (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) I knew that! In my youth I got one up on a Z80 assembler guru by doing a divide by 80 with shifts and adds faster than his best optimized version... (...) It didn't matter much to me either - I was trying to do a rolling average, but I didn't (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) Actually, I have the wrappers for GCC. I have been busy with other stuff, but I have been meaning to release my RCX code for a while now. I spent the morning packaging up my development environment, which now lives at: (URL) particular, I (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) Are you linking libgcc.a? I believe it has all the math helper functions that are required. John A. Tamplin Traveller Information Services jat@Traveller.COM 2104 West Ferry Way 256/705-7007 - FAX 256/705-7100 Huntsville, AL 35801 -- Did you (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
=>From: "John A. Tamplin" <jat@Traveller.COM> =>... =>On Tue, 9 Feb 1999, dave madden wrote: => =>> Yes, the H8 divide instruction can only do (16 bits)/(8 bits), so GCC =>> calls a helper routine [...] => =>Are you linking libgcc.a? I believe it (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) In most cross-compilers, there is assembly code for those helper functions. In EGCS, those are in config/h8300/lib1funcs.asm. (...) It calls __divhi3, which is defined in config/h8300/lib1funcs.asm. I built egcs-1.1.1 without any changes (that (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) There are two problems with lib1funcs.asm. First, all the functions are in one .asm file. That means you have the code for all math functions even if you use only one of them. Second, most of the routines are already in ROM, so if you can take (...) (26 years ago, 9-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
=>From: "John A. Tamplin" <jat@Traveller.COM> =>... =>It calls __divhi3, which is defined in config/h8300/lib1funcs.asm. I =>built egcs-1.1.1 without any changes (that I remember :), and it put =>those in libgcc1.a, which then gets merged into (...) (26 years ago, 10-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) It doesn't have to be complex math. I had the same problem using the modulo operator. I did a little digging to figure out why libgcc.a wasn't compiling properly. It turns out that if you add the -Dinhibit_libc to the CFLAGS in the top level (...) (26 years ago, 10-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
The maths routines are somewhere in libgcc.a, though I think there's a single file with all the routines instead of several small ones, so you may end up wasting memory. In addition, you probably need to access libc.a too since some of the libgcc.a (...) (26 years ago, 10-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
Hi John, (...) I'm currently working on compiler details with Chris. He sent me some patches to produce cleaner code for ROM calls (register allocation issues), and after we have consolidated these, there'll be both patches and binary releases for (...) (26 years ago, 10-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) I had started to do that, but then I decided that was way too much work for what I have time for, with little benefit. I assume you are changing the target name to something like h8300-hitachi-rcx and setting it up properly for configure? If (...) (26 years ago, 10-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) This mainly involves small, but crucial changes to h8300.h. Register constraints, preserved and clobbered registers and allocation issues are all taken care of in that file. I didn't think about submitting this, but it should be easily (...) (26 years ago, 11-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) BEAUTIFUL. I spent all of last night trying to figure out a) why make was calling (and not finding) stdio.h and b) how I could make make realize that I didn't care about libc. That did the trick... Thanks. Luis ###...### "They call the (...) (26 years ago, 12-Feb-99, to lugnet.robotics)
|
|
| | Re: NQC v. LegOS / size
|
|
(...) No, they are not in one object file. They are in a single source file, but if you look at the build process it defines a symbol like L_cmpsi3 and compiles/assembles it separately for each function. John A. Tamplin Traveller Information (...) (26 years ago, 12-Feb-99, to lugnet.robotics)
|