Re: [Sdcc-user] [sdcc-devel] Restricting support for __using __interrupt __at arguments

2022-06-18 Thread Sergey Belyashov
Agree, first it should be deprecated. сб, 18 июн. 2022 г. в 15:12, Philipp Klaus Krause : > > Am 17.06.22 um 20:55 schrieb Sergey Belyashov: > > Imho, it is better to break the use of __at in favor of __at(). > > > > While that might be a clenaer solution, and was my fi

Re: [Sdcc-user] [sdcc-devel] Restricting support for __using __interrupt __at arguments

2022-06-17 Thread Sergey Belyashov
Imho, it is better to break the use of __at in favor of __at(). пт, 17 июн. 2022 г. в 20:13, Philipp Klaus Krause : > > While working on C2X support in the parser (and trying to fix some > existing bugs in the parser already affecting earlier standards), it > looks to me like SDCC painted itself

Re: [Sdcc-user] More functions for bit manipulation (Rotation, population count, endianness, etc) in the standard libary?

2021-10-03 Thread Sergey Belyashov
I think, built-ins may cover all basic algorithms which pure C implementation is very very complex (count of bits, odd/even...) but in assembler is very simple. Moreover, in most cases these functions should be inline, because call prepare+prolog+epilog of function some time took same number of res

Re: [Sdcc-user] A quick question about boost

2020-11-26 Thread Sergey Belyashov
Hi, Try use CXXFLAGS and LDFLAGS instead: CXXFLAGS=... LDFLAGS=... ./configure ... Or run configure with --help key, possible it has special option for the boost path. ___ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.ne

Re: [Sdcc-user] pic14 libc does not build

2020-09-11 Thread Sergey Belyashov
If you update from svn (not clean build) working copy, then just run config.status in build directory and than make all. Best regards, Sergey Belyashov пт, 11 сент. 2020 г., 21:25 William Henning : > I am trying to build the latest version. The compiler and pic16 libraries > build fine, b

Re: [Sdcc-user] Does anyone rely on concatenating prefixed string literals?

2020-07-09 Thread Sergey Belyashov
t solution. Best regards, Sergey Belyashov чт, 9 июля 2020 г., 20:30 Philipp Klaus Krause : > Am 09.07.20 um 19:06 schrieb Sergey Belyashov: > > Imho, permit concatenation with same prefixes (if first of strings is > > prefixed but some other not, permit too), reject if they d

Re: [Sdcc-user] Does anyone rely on concatenating prefixed string literals?

2020-07-09 Thread Sergey Belyashov
Imho, permit concatenation with same prefixes (if first of strings is prefixed but some other not, permit too), reject if they differs. чт, 9 июля 2020 г., 19:57 Philipp Klaus Krause : > In the C standard it is implementation-defined what happens if prefixed > string literals can be concatenated

[Sdcc-user] Wrong author set in commit r11694

2020-06-29 Thread Sergey Belyashov
Hi, Philipp changed author of patch #326 in commit: https://sourceforge.net/p/sdcc/code/11694/ to me, but I'm not the author of this patch. Please revert back. Best regards, Sergey Belyashov ___ Sdcc-user mailing list Sdcc-user@lists.sourceforg

Re: [Sdcc-user] Register pair peep hole rules

2020-06-04 Thread Sergey Belyashov
Please use standard names: sf, zf, hf, pf, nf, cf. Philipp, I suggest to put some small help to the header of all peephole definition files. чт, 4 июн. 2020 г. в 16:57, Sebastian Riedel : > On 04.06.20 14:20, Sergey Belyashov wrote: > > Z80 has the same flags as GBZ80, but also i

Re: [Sdcc-user] Register pair peep hole rules

2020-06-04 Thread Sergey Belyashov
Z80 has the same flags as GBZ80, but also it has p/v (parity or signed overflow) and S (sign) flags. And order is different: GBZ80: Z N H C 0 0 0 0 Z80: S Z 5 H 3 P/V N C чт, 4 июн. 2020 г. в 15:12, Sebastian Riedel : > On 04.06.20 12:44, Philipp Klaus Krause wrote: > > The barrier works the oth

Re: [Sdcc-user] Register pair peep hole rules

2020-06-03 Thread Sergey Belyashov
Hi, I think it is historical. Rewrite rules, recompile, run regression tests and publish the patch. ср, 3 июня 2020 г., 22:26 Sebastian Riedel : > Is there a reason why one wouldn't use: (z80/gbz80) > > replace restart { > ld %2, %4 > ld %1, %3 > } by { > ; broug

Re: [Sdcc-user] Peep hole optimizer and asm aliases

2020-05-27 Thread Sergey Belyashov
Hi, Imho, it is better to add two pair rules which converts (hl+/-) to ldi/ldd. And others use ldd/ldi only. ср, 27 мая 2020 г., 10:24 Sebastian Riedel : > Hi, another question regarding the peep hole optimizer. > > How does it handle aliases? > > Need there be doubled rules for ldd a,(hl)/ld a,(

Re: [Sdcc-user] trouble installing sdcc (boost)

2020-05-17 Thread Sergey Belyashov
Hi, Do $ apt-cache search texinfo Select proper package and do $ apt-get install вс, 17 мая 2020 г., 15:46 Saurabh Bansode : > Hello, > I am using Ubuntu 16.04, Installed boost via apt-get install > libboost-system-dev, and then ran ./configure --disable-pic14-port > --disable-pic16-port as I

Re: [Sdcc-user] Question regarding peephole optimizer

2020-05-16 Thread Sergey Belyashov
Hi, notUsed isn't implemented for gdbz80 port. сб, 16 мая 2020 г., 14:58 Sebastian Riedel : > Hi, > > I’m trying to write peep hole rules for the case that A can be trashed. > I thought `notUsed('a')` is for that use case, at least it looked like > that in the peeph-gbz80.def. > But when I compil

Re: [Sdcc-user] How to control segment placement from C?

2020-04-26 Thread Sergey Belyashov
Hi, C have not tool to control output section order. Strictly speaking, high level languages does not known anything about sections/segments. It is a linker job. So, you should prepare special data for each linker type. Best regards, Sergey Belyashov вс, 26 апр. 2020 г. в 22:02, Philipp Klaus

Re: [Sdcc-user] How to move string literals to const area (Z80)

2020-04-13 Thread Sergey Belyashov
Hi, Z80 port has --constseg support, but it looks incomplete. int f1() { static const char text[] = "some text"; //text will be placed in _CODE segment puts(text); } int f2() { puts("some text"); //text will be placed in constseg segment } Sergey Belyashov пн, 13

Re: [Sdcc-user] Data area immediately following code

2020-04-02 Thread Sergey Belyashov
Hi, SDCC uses very simple scheme for storing initialization data. It generates two copies of variables, one copy is initialization data which is stored after code section, and copied to variables area on startup. I think, it is caused by very simple linkers supported. More complex linkers can do th

Re: [Sdcc-user] banked functions for z80, z180, gbz80, etc?

2020-03-09 Thread Sergey Belyashov
hl ld -2(ix),l ld -1(ix),h ld hl,100$ ex (sp),hl push bc ret 100$: ld a,-4(ix) out (BANK_PORT),a ld c,-2(ix) ld b,-1(ix) push bc ret Best regards, Sergey Belyashov сб, 7 марта 2020 г., 22:15 Sergey Belyashov : > Hi, > My project is used about 200 ROM pages and 33 R

Re: [Sdcc-user] banked functions for z80, z180, gbz80, etc?

2020-03-07 Thread Sergey Belyashov
are expected. Most of callers will have their own local variables. These four bytes are required to make banked call cheaper: do not use tranpoline in caller or move frame in banked_call implementation. Best regards, Sergey Belyashov вс, 8 марта 2020 г., 6:26 Alan Cox : > > 5. Add optimizat

Re: [Sdcc-user] banked functions for z80, z180, gbz80, etc?

2020-03-07 Thread Sergey Belyashov
(BANK_PORT),a ld c,-2(ix) ld b,-1(ix) push bc ret Best regards, Sergey Belyashov ___ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user