Philipp Klaus Krause | 22 May 23:58 2016
Picon

Comparing compilers for STM8

Hello,

I have started to write a short comparison of compilers targeting the
STM8. The current draft is at
http://www.colecovision.eu/stm8/compilers.shtml
However, I wonder what options should I use for the benchmarks?
Release defaults?
Strong optimization with a balanced optimization goal?
Optimization for code size?
Speed?

The current graphics in the draft are for strong optimization with a
balanced optimization goal, except for Raisonance, which doesn't have
balanced optimization, and thus optimizes for code size.

Anything else that should be included in the comparison?

Philipp

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Sdcc-user mailing list
(Continue reading)

Philipp Klaus Krause | 15 May 14:09 2016
Picon

HC08/S08 with ELF output

In revision #9599, support for outputting the symbol table for ELF was
added.
To the S08/HC08 ELF users: Is this change useful for you? Does it break
anything for you?

Philipp

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
php mania | 14 May 16:33 2016
Picon

Using registers in C functions which are unused

Hi,

I am using the 8051 and am compiling using the SDCC. I have a C function which calls an assembly function. This assembly function needs to do a lot of tasks and I need to be able to use the registers as well as RAM to complete the task. However, I am not really sure how to find if these registers I am using is being used by some other function in the same C program. Is there anyway to access some registers and create some local variables and use them in my assembly program for a given function(I am inlining assembly) ?
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Maarten Brock | 8 May 14:10 2016
Picon

Re: [sdcc-devel] How do I pass data from a c file into an assembly file

Hello,

> Hi,
>
> Thanks a lot for the reply. It is mcs51. I guess I will take a look at
> that. What if I need to exchange more than a byte of data? Should I just
> increment the location pointed to by dpl? Is that how this works?

No, but again look at the generated assembly for something similar.

> Also another question and I find it rather strange. I am trying to
> pass pointers through functions in sdcc
>
> void a()
> {
>
> unsigned char a;
> a=some value
> b(&a);
> }
>
> void b(unsigned char *a )
> {
> *a='s';
> }
>
> I keep getting this error
>
>  warning 127: non-pointer type cast to generic pointer
> from type 'unsigned-char fixed'
>
> I have tried specifying __xdata, but it still throws the same error. Any
> ideas?

If you don't show the code that produces this error, we can't help. We
will not try to guess it.

And since you're not developing SDCC itself, could you please reply on the
user mailing list?

Maarten

> On Sun, May 8, 2016 at 11:06 AM, Erik Petrich <
> epetrich@...> wrote:
>
>>
>>
>> On Sun, 8 May 2016, Sab V wrote:
>>
>> > Hi,
>> >
>> > I have a C function which calls a function in c but written in
>> assembly
>> >
>> > void a()
>> > {
>> >
>> > callassembly(a);
>> >
>> > }
>> >
>> > void callassembly(char a)
>> > {
>> >
>> > //assembly level
>> >
>> > }
>> >
>> > How do I access the char a data in assembly. Also if I need to return
>> data back, how do I do this?
>>
>> You'll get a better answer if you could at least specify which
>> architecture you are compiling for. For hc08 and s08, a single parameter
>> of type char would be passed in the A register and a char return value
>> would also be passed in the A register. For mcs51 and ds390, it would be
>> the same except the DPL register would be used instead of A. For the Z80
>> family, the parameter is passed on the stack and the return value is
>> passed in the L register.
>>
>> You could also compile a simple function such as
>>
>>   char foo(char x)
>>   {
>>     return x+1;
>>   }
>>
>> to see how the parameter and return value are passed.
>>
>>    Erik

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Jose Cáceres | 28 Apr 18:31 2016

Re: Sdcc-user Digest, Vol 116, Issue 9

Don Wooton to disable wactdog timer, add to your code pragmas #pragma config WDT = OFF

El 28 de abril de 2016 11:06:03 GMT-05:00, sdcc-user-request-5NWGOfrQmnd4wTydcyPnfg@public.gmane.orgceforge.net escribió:
Send Sdcc-user mailing list submissions to
sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/sdcc-user
or, via email, send a message with subject or body 'help' to
sdcc-user-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

You can reach the person managing the list at
sdcc-user-owner-5NWGOfrQmneRv+LV9MX5ug@public.gmane.orge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Sdcc-user digest..."


Today's Topics:

1. Re: disable watchdog (Don Wooton)
2. Re: [MASSMAIL]Re: disable watchdog (Yordan)
3. Interrupts on Z80 and Z180 (Philipp Klaus Krause)
4. Re: Interrupts on Z80 and Z180 (Philipp Klaus Krause)
5. Re: Interrupts on Z80 and Z180 (Alan Cox)
6. Re: Interrupts on Z80 and Z180 (Philipp Klaus Krause)




Message: 1
Date: Fri, 22 Apr 2016 17:12:17 -0400
From: Don Wooton <dtwooton-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Sdcc-user] disable watchdog
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <20160422211217.GC20627-bRbefgWypkJAfugRpC6u6w@public.gmane.org>
Content-Type: text/plain; charset=us-ascii

Notice /usr/local/share/sdcc/non-free/include/pic14/pic16f818.h

#include <pic16f818.h>


sdcc -mpic14 -p16f818 --use-non-free foo.c

- Don

On Apr 22, Yordan propounded certain bytes, to wit:
Subject: [Sdcc-user] disable watchdog

hi, im new in microcontroller programming, so i need help to disable watchdog timer, can anybody tell me how to do it using sdcc?
i found this snippet
__code uint16_t __at (_CONFIG1) __configword = _INTRC_OSC_NOCLKOUT & _WDTE_OFF & _LVP_OFF;
but it results in this error
error 20: Undefined identifier '_WDTE_OFF'
im working for a pic16f818 mcu and im using
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.2 # (Apr 19 2016) (Linux)
thanks


Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

Sdcc-user mailing list
Sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sdcc-user
-- End of excerpt from Yordan'





Message: 2
Date: Mon, 25 Apr 2016 19:02:06 -0400
From: Yordan <yattanasov-NigQoAqfJP0@public.gmane.org>
Subject: Re: [Sdcc-user] [MASSMAIL]Re: disable watchdog
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <571EA1EE.7090009-NigQoAqfJP0@public.gmane.org>
Content-Type: text/plain; charset=windows-1252; format=flowed

thanks!! i solve the problem, the other part of the solution was in sdcc
man in section 4.5.4 configuration bits

On 04/22/2016 05:12 PM, Don Wooton wrote:
Notice /usr/local/share/sdcc/non-free/include/pic14/pic16f818.h

#include <pic16f818.h>


sdcc -mpic14 -p16f818 --use-non-free foo.c

- Don

On Apr 22, Yordan propounded certain bytes, to wit:
Subject: [Sdcc-user] disable watchdog

hi, im new in microcontroller programming, so i need help to disable watchdog timer, can anybody tell me how to do it using sdcc?
i found this snippet
__code uint16_t __at (_CONFIG1) __configword = _INTRC_OSC_NOCLKOUT & _WDTE_OFF & _LVP_OFF;
but it results in this error
error 20: Undefined identifier '_WDTE_OFF'
im working for a pic16f818 mcu and im using
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.2 # (Apr 19 2016) (Linux)
thanks


Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

Sdcc-user mailing list
Sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sdcc-user
-- End of excerpt from Yordan'

Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

Sdcc-user mailing list
Sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sdcc-user

La UCI presente este 1ro. de Mayo en la Plaza de la Revoluci??n
junto a todo el pueblo.??Por Cuba: Unidad y Compromiso!





Message: 3
Date: Thu, 28 Apr 2016 14:31:47 +0200
From: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Subject: [Sdcc-user] Interrupts on Z80 and Z180
To: Sdcc-User <sdcc-user <at> lists.sourceforge.net>
Message-ID: <572202B3.7050906-dH2bkuHepfc@public.gmane.org>
Content-Type: text/plain; charset="utf-8"

I had a look at bug reports https://sourceforge.net/p/sdcc/bugs/2131/
and https://sourceforge.net/p/sdcc/bugs/2339/ and section "3.8.4 Z80
Interrupt Service Routines" in the manual.

According to the manual, we have:
1) non-interruptible isr (can be interrupted by nmi only):
void i1(void) __interrupt
2) interruptible isr (can be interrupted by any interupt)
void i2(void) __critical __interrupt(0)
3) nmi handler (can be interrupted by nmi only)
void i3(void) __critical __interrupt

We generate code:
1)
save regs
...
restore regs
reti
2)
di
save regs
...
restore regs
ei
reti
3)
save regs
...
restore regs
retn

Out of these, 3) looks correct to me. But 1) fails to reenable
interrupts at the end (I think there should be an ei before the reti).
And 2) is completly wrong, I think it should be:
ei
save regs
...
restore regs
reti

Did I miss something?

Philipp
(who so far always wrote his interrupt handlers in asm instead of using
the SDCC-provided facilities)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature



Message: 4
Date: Thu, 28 Apr 2016 14:55:45 +0200
From: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <57220851.7050906-dH2bkuHepfc@public.gmane.org>
Content-Type: text/plain; charset="windows-1252"

On 28.04.2016 14:31, Philipp Klaus Krause wrote:
I had a look at bug reports https://sourceforge.net/p/sdcc/bugs/2131/
and https://sourceforge.net/p/sdcc/bugs/2339/ and section "3.8.4 Z80
Interrupt Service Routines" in the manual.

According to the manual, we have:
1) non-interruptible isr (can be interrupted by nmi only):
void i1(void) __interrupt
2) interruptible isr (can be interrupted by any interupt)
void i2(void) __critical __interrupt(0)
3) nmi handler (can be interrupted by nmi only)
void i3(void) __critical __interrupt

Also, I think that the syntax for 1) and 2) should be swapped. It seems
vcounter-intuitive that the one with __critical can be interrupted, but
not the one without.

Philipp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature



Message: 5
Date: Thu, 28 Apr 2016 15:04:56 +0100
From: Alan Cox <alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
To: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Cc: Sdcc-User <sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Message-ID: <20160428150456.6d288f6f-+KEw/ACL1GZE/aiTQr5FLb0Ud+EcFu5g@public.gmane.org>
Content-Type: text/plain; charset=US-ASCII

We generate code:
1)
save regs
...
restore regs
reti
2)
di
save regs
...
restore regs
ei
reti
3)
save regs
...
restore regs
retn

Out of these, 3) looks correct to me. But 1) fails to reenable
interrupts at the end (I think there should be an ei before the reti).
And 2) is completly wrong, I think it should be:
ei
save regs
...
restore regs
reti

Did I miss something?

When I looked at this ages ago I came to the same conclusion but never
worried about it as I couldn't use those methods anyway because I needed
to be able to save/restore interrupt state.

Of the others

Your changes to #1 are IMHO correct
You can't implement #2 on a Z80 this way
#3 appears to be correct (as far as it goes for Z80)

For the #2 case you can't do the ei because on many platforms (eg MSX)
you'll immediately take another interrupt and execute nothing but

ei
push af
irq entry
ei
push af
irq entry

until you crash.

The #1 case is only safe because the ei takes effect the instruction
after (ie after the reti), a detail quite a few emulators get wrong

The general case of a Z80 interrupt handler that can be re-entered is


irq_entry:
push stuff
save state from interrupting device
ack interrupt source on priority aware controller
ei
process state from device
pop stuff
ret

In some situations you even end up having to do stuff like

irq_entry:
push stuff
save state from interrupting device
push dummy_ret
ei
reti ; acks the IRQ returns to the next instr
dummy_ret:
process state from device
pop stuff
ret

Neither of those can be expressed in a function entry annotation


Z180 is different again because you've got multiple IRQ sources and
something resembling onboard interrupt controllers.

Alan





Message: 6
Date: Thu, 28 Apr 2016 18:05:43 +0200
From: Philipp Klaus Krause <pkk-dH2bkuHepfc@public.gmane.org>
Subject: Re: [Sdcc-user] Interrupts on Z80 and Z180
To: sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <572234D7.2070009-dH2bkuHepfc@public.gmane.org>
Content-Type: text/plain; charset="windows-1252"

On 28.04.2016 16:04, Alan Cox wrote:

For the #2 case you can't do the ei because on many platforms (eg MSX)
you'll immediately take another interrupt and execute nothing but

ei
push af
irq entry
ei
push af
irq entry

until you crash.

Ah, yes. Level-triggered interrupts. So I guess I'll just drop support
for 2) for the z80 and z180 backends.
We can keep it for the tlcs90, r2k and r3ka, which use edge-triggered
interrupts. Anyone know about gbz80?

Philipp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature




Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z




Sdcc-user mailing list
Sdcc-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sdcc-user


End of Sdcc-user Digest, Vol 116, Issue 9
*****************************************

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Philipp Klaus Krause | 28 Apr 14:31 2016
Picon

Interrupts on Z80 and Z180

I had a look at bug reports https://sourceforge.net/p/sdcc/bugs/2131/
and https://sourceforge.net/p/sdcc/bugs/2339/ and section "3.8.4 Z80
Interrupt Service Routines" in the manual.

According to the manual, we have:
1) non-interruptible isr (can be interrupted by nmi only):
void i1(void) __interrupt
2) interruptible isr (can be interrupted by any interupt)
void i2(void) __critical __interrupt(0)
3) nmi handler (can be interrupted by nmi only)
void i3(void) __critical __interrupt

We generate code:
1)
save regs
...
restore regs
reti
2)
di
save regs
...
restore regs
ei
reti
3)
save regs
...
restore regs
retn

Out of these, 3) looks correct to me. But 1) fails to reenable
interrupts at the end (I think there should be an ei before the reti).
And 2) is completly wrong, I think it should be:
ei
save regs
...
restore regs
reti

Did I miss something?

Philipp
(who so far always wrote his interrupt handlers in asm instead of using
the SDCC-provided facilities)

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Yordan | 22 Apr 21:57 2016
Picon

disable watchdog

hi, im new in microcontroller programming, so i need help to disable watchdog timer, can anybody tell me how
to do it using sdcc?
i found this snippet 
__code uint16_t __at (_CONFIG1) __configword = _INTRC_OSC_NOCLKOUT & _WDTE_OFF & _LVP_OFF;
but it results in this error
error 20: Undefined identifier '_WDTE_OFF'
im working for a pic16f818 mcu and im using 
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.2 # (Apr 19 2016) (Linux)
thanks

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
alvin albrecht | 20 Apr 01:21 2016
Picon

Re: New user / header files / optimisations STM8

>However, just a few days ago we discussed
>various floating point formats and one of them
>was to leave the actual computations to the FP
>library, which would make it hard for the compiler
>to optimise these as it could not call those functions
>at compile time.
>This is pretty trivial to optimize at compile time
>as long as everything is IEEE FP but if the run time
>libraries are not 100% compatible we have subtle issues.
 
I don't think leaving the stored float format to the
library interferes with this sort of optimization.

The compiler can still do computations using the max
precision fp type it has; the last step for the compiler
would be communicating this result to an external
function supplied by the library authors to generate
a stream of bytes representing the number in the
proprietary format.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Georg Icking-Konert | 19 Apr 20:53 2016
Picon

Re: New user / header files / optimisations STM8 (Nick Hill)

Hi Nick,

I totally agree that the SPL headers (and functions) are not very convenient. However, "unfortunately“ there are a lot of examples on the ST homepage for the STM8 which are based on the SPL… 

Has someone already released fine grained SDCC compatible header
files for the STM8?

Due to the mentioned SPL licence issue and for convenience I developed my own header for STM8S and STM8L, which is available as part of a loose collection of templates under 


This header allows byte or bitfield access (where suitable). The templates are compatible with both STVD/Cosmic and SDCC. The latter currently uses Makefiles, since I am still looking for a suitable, lean, portable IDE to facilitate development under SDCC. Any idea/hint…?

Hope this is of use for you!?

Regards,
Georg Icking-Konert
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user
Nick Hill | 18 Apr 22:58 2016
Picon

New user / header files / optimisations STM8

Hi All.

I have recently re-entered the world of micro programming with both
STM8 and PIC.

I found the move from PC a little difficult since there seems to be a
range of proprietary headers which published code tends to be written
for. It is often not even clear which header files code is written
for, and so far, I haven't even seen headers released with the code.
For the un-initiated, this can be daunting. I suspect this high
barrier to entry feature comes courtesy of the licensing ST decided to
apply to their header files.

I notice many example programs for SDCC and the STM8 define registers
explicitly in the code instead of using pre-defined mnemonic
representations of registers which may otherwise be defined in a
header file. A freely licensed set of headers with consistent and
standardised mnemonics and register bit granularity would be seriously
useful. I have started writing my own header file for all the code I
write. Perhaps as this gets more complete and compatible across
compilers, I might release this, unless someone else has done the
same.

I have so far been getting used to the architecture with ST Visual
develop combined with a free evaluation version of the cosmic
compiler.

I don't believe the Cosmic compiler free version is supposed to lack
optimisation found on the paid for version. However, I'm not
particularly impressed with the Cosmic compiler since I have defined a
constant expression featuring a raised to the power expression. No run
time variables, no globals affected.  An inclusion of a reference to
this constant results in the code growing from about 3.6k to nearly
8k. All the floating point math functions find their way into the
final code, and doesn't even currently reference a run-time variable.
The constant expression can and I believe should be evaluated at
compile time, and superfluous math functions shouldn't find their way
into the final release binary.

Should I expect SDCC to do better, and to optimise away functions
which are not dependent on run time variables?

I have had to start re-factoring some code in my header file, and find
the ST header files broadly incompatible with SDCC. Where do I go from
here? Has someone already released fine grained SDCC compatible header
files for the STM8?

Thanks.

Nick.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Philipp Klaus Krause | 11 Apr 20:10 2016
Picon

A floating-point type cheaper than float

Dear SDCC users,

SDCC currently implements 32-bit float as its only floating-point data type.

Would you like to see a cheaper one in SDCC, that uses only 16 bits?

Would you use it?

Philipp

P.S.: Background info: There is growing hardware support for floating
types smaller than float. And today WG14 decided to continue work on
making this available in C, so it is likely to appear in the next C
standard. None of the architectures targeted by SDCC has hardware
floating-point support. But having a floating-point type cheaper than
float might still be worth it.

P.P.S.: Even if there is demand for this, I probably won't find time to
implement it soon. On the other hand, the next C standard seems to be
nearly 6 years away anyway.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
Sdcc-user mailing list
Sdcc-user@...
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Gmane