Activity for alvin

  • alvin alvin posted a comment on ticket #2641

    Does that mean your example is still an error? static struct { unsigned char STK[128]; } s; void *v = (void *)(s.STK + 1); I think section 6.6 explicitly mentions this case: 7 More latitude is permitted for constant expressions in initializers. Such a constant expression shall be, or evaluate to, one of the following: ... — an address constant for a complete object type plus or minus an integer constant expression.

  • alvin alvin posted a comment on discussion Open Discussion

    Ok, maybe that was the root of the problems I've seen? The z88dk library uses preserves_regs extensively.

  • alvin alvin posted a comment on discussion Open Discussion

    The recent commit: https://sourceforge.net/p/sdcc/code/9998/tree/trunk/sdcc/src/z80/main.c?diff=513f4d42271846342871488b:9997&diformat=sidebyside would seem to indicate there were major bugs associated with preserves_regs on the z80 but I haven't seen any of that up to 9958 (I haven't updated from there yet because some bugs have been introduced since that I haven't had the time to locate yet). Was there a change after 9958 that required changing the register enumeration?

  • alvin alvin created ticket #2645

    incorrect initialization of static array of pointers

  • alvin alvin posted a comment on ticket #2637

    Also reported in #2632

  • alvin alvin posted a comment on discussion Help

    Works fine for me. Maybe try updating your install? 4,844 1.asm 80 1.c 715 1.ihx 238 1.lk 10,684 1.lst 13,367 1.map 1,192 1.mem 2,016 1.rel 10,684 1.rst 31,836 1.sym sdcc -v 3.6.8 9949 (MINGW64) >sdcc --verbose 1.c sdcc: Calling preprocessor... sdcc: sdcpp -nostdinc -Wall -std=c11 -obj-ext=.rel -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_SMALL -D__SDCC_FLOAT_REENT -D__SDCC=3_6_8 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=6 -D__SDCC_VERSION_PATCH=8 -DSDCC=368 -D__SDCC_REVISION=9949 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__=1...

  • alvin alvin created ticket #2632

    z80: array index incorrectly computed by truncating 16-bit computed value to 8-bit

  • alvin alvin posted a comment on discussion Help

    Provided it knows which symbol is requested during linking and the object has its clear boundaries in library... That's the problem.. there are no clear boundaries in the library between items in the same file. That's why it's necessary to split into files first. If you know this from the beginning, it's less a big deal. However I'm more used to making libraries out of z80 asm functions where separation into files turns out to be a good way to organize asm code. This is less natural for C code I...

  • alvin alvin posted a comment on discussion Help

    What's not being explicitly mentioned is that when you form your library you should have one function per file. The linker pulls out an entire file (proper name = module) when it forms the binary.

  • alvin alvin posted a comment on ticket #2617

    This one is now fixed too. Philip have you had a chance to run the tests yet on the current sdcc for the z80? I've moved on to testing more compiles and it seems there are more errors there.

  • alvin alvin created ticket #2617

    signed comparison implemented as unsigned comparison by compiler leading to incorrect code

  • alvin alvin created ticket #2615

    compiler wipes out register holding temp in if-else with reserve-regs-iy

  • alvin alvin modified a comment on ticket #2600

    Yes, sdcc #9883 is still available at the sdcc snapshot page and I've just verified that it does apply the full set of rules. Edit: Or rather more of them. The output still doesn't match the 9880 at the original website. I'll check if I missed something in the peep.def file. Edit: No nothing is missing. I think the discrepancy is down to there not being any interplay between the sdcc rules and peep.def in the examples we have here. In z88dk the two rulesets are together in the same file so they both...

  • alvin alvin modified a comment on ticket #2600

    Yes, sdcc #9883 is still available at the sdcc snapshot page and I've just verified that it does apply the full set of rules. Edit: Or rather more of them. The output still doesn't match the 9880 at the original website. I'll check if I missed something in the peep.def file. Edit: No nothing is missing. I think the discrepancy is down to there not being any interplay between the sdcc rules and peep.def in the examples we have here. In z88dk the two rulesets are together in the same file so they both...

  • alvin alvin modified a comment on ticket #2600

    Yes, sdcc #9883 is still available at the sdcc snapshot page and I've just verified that it does apply the full set of rules. Edit: Or rather more of them. The output still doesn't match the 9880 at the original website. I'll check if I missed something in the peep.def file.

  • alvin alvin posted a comment on ticket #2600

    Yes, sdcc #9883 is still available at the sdcc snapshot page and I've just verified that it does apply the full set of rules.

  • alvin alvin posted a comment on ticket #2600

    Yes that's how I found the rules. I think it's only going to let me attach one file. So here is test.c: #define GAME_LIN_FLOOR 152 extern unsigned char phase_left; extern unsigned char lin[8]; extern unsigned char col[8]; extern unsigned char sprite; extern void enemy_walk(void); extern void spr_destroy(unsigned char f_sprite) __z88dk_fastcall; void enemy_coin1(void){ //COINS N SLIPICE if ( phase_left > 0 ) { enemy_walk(); if ( ( lin[sprite] == GAME_LIN_FLOOR ) && ( col[sprite] == 3 || col[sprite]...

  • alvin alvin posted a comment on ticket #2600

    It was brought to my attention in this project: https://bitbucket.org/CmGonzalez/pietro_bros/overview The binary size increased from ~32700 bytes to ~34000 bytes. I could see that most peephole rules were not being applied. The enemy_coin1 function can be used as example. This is code generated by 9880: 811 0000 ; --------------------------------- 812 0000 ; Function enemy_coin1 813 0000 ; --------------------------------- 814 0000 _enemy_coin1: 815 0000 3A 00 00 ld a,(_phase_left) 816 0003 B7 or...

  • alvin alvin posted a comment on ticket #2600

    Philip, the patch applied is flawed. I found recently compiled programs were 2k+ larger because some peephole rules were not being applied. The code that is in there now in function matchLine(): static bool matchLine (char *s, const char *d, hTab ** vars) { if (!s || !(*s)) return FALSE; /* skip leading white spaces */ while (ISCHARSPACE (*s)) s++; while (ISCHARSPACE (*d)) d++; while (*s && *d) { /* if the destination is a var */ if (*d == '%' && ISCHARDIGIT (*(d + 1)) && vars) { const char *v =...

  • alvin alvin posted a comment on ticket #2599

    When I search for small-C the only target in common with SDCC I can find is the Z80. You'll find small C connected with the 8080, 8085, 8088, z80, 6502, 68xx. It had a lot of influence on compilers of that era because it was given away for free. Can I assume that there is no specification for Small-C and more specifically for its calling convention, making the original implementation the standard? Yes the original Small-C defined the convention. There might have been influence from Pascal because...

  • alvin alvin created ticket #2601

    Signed char not promoted to signed int before pointer arithmetic

  • alvin alvin created ticket #2600

    Bug in how SDCCpeeph.c matches source lines and peephole rules

  • alvin alvin posted a comment on ticket #2595

    In revision #9868, support for the Small-C calling convention in callees has been...

  • alvin alvin posted a comment on ticket #2597

    That should be "operandsNotRelated" and not "notOperandsRelated"

  • alvin alvin created ticket #2597

    z80: bug in peephole rule #15

  • alvin alvin posted a comment on discussion Help

    asz80 does not support those undocumented instructions. There's some previous discussion...

  • alvin alvin created ticket #2595

    z80: smallc and _z88dk_callee c functions not flagged as error during compile

  • alvin alvin posted a comment on ticket #2592

    I put in "Front End" but this seems to be a z80-related problem.

  • alvin alvin created ticket #2592

    compiler hangs for 32-bit left shift given int shift value

  • alvin alvin created ticket #2590

    z80: seg fault caused by application of __smallc attribute

  • alvin alvin modified a blog post

    Z88DK v1.99B Released 10-Jan-2017

  • alvin alvin modified a blog post

    Z88DK v1.99B Released 10-Jan-2017

  • alvin alvin created a blog post

    Z88DK v1.99B Released 10-Jan-2017

  • alvin alvin created ticket #523

    delayed error reporting for function prototypes with missing terminating semicolon

  • alvin alvin created ticket #2581

    z80: stack frame set up for compiler generated c fastcall functions bugged for opt-code-size

  • alvin alvin created ticket #2580

    z80: compiler generated c fastcall functions sometimes bugged for reserve-regs-iy

  • alvin alvin posted a comment on ticket #2577

    A litte further research and it turns out this is not a bug. The C standard specfies...

  • alvin alvin created ticket #2577

    Escaped hex code in char string incorrectly encoded

  • alvin alvin modified a comment on discussion Open Discussion

    If it's not the case, here's the point: isn't it the assignment in register E completely...

  • alvin alvin posted a comment on discussion Open Discussion

    [quote] If it's not the case, here's the point: isn't it the assignment in register...

  • alvin alvin posted a comment on discussion Help

    sdcc doesn't seem to properly cost use of iy; I always get much better code as a...

  • alvin alvin posted a comment on discussion Help

    z88dk can automatically create these banks but it's using a different linker than...

  • alvin alvin posted a comment on discussion Help

    You may also want to check if chars need to be signed. By default they are unsigned...

  • alvin alvin posted a comment on discussion Open Discussion

    Have a look at z88dk: http://www.z88dk.org/wiki/doku.php?id=libnew:target_embedded...

  • alvin alvin created ticket #2529

    Subtraction of Result of Two Independent Function Calls Incorrectly Eliminated

  • alvin alvin posted a comment on ticket #2519

    No, the compiler would be forced to generate poor code which would wipe out any gains....

  • alvin alvin modified a comment on discussion Open Discussion

    I figured out how to do the code size reduction from the peepholer and a little post-processing....

  • alvin alvin modified a comment on discussion Open Discussion

    I figured out how to do the code size reduction from the peepholer and a little post-processing....

  • alvin alvin posted a comment on discussion Open Discussion

    I figured out how to do the code size reduction from the peepholer and a little post-processing....

  • alvin alvin posted a comment on ticket #2399

    Small bump to indicate the bug is still present for the z80 in 3.5.6 #9605 (MINGW64)....

  • alvin alvin posted a comment on ticket #2503

    The code is definitely bugged when c is made unsigned and will produce incorrect...

  • alvin alvin posted a comment on ticket #2503

    The code is incorrect for unsigned char - the programmer should be using signed char....

  • alvin alvin posted a comment on ticket #2501

    This bug occurs in nearly all 64-bit programs I have been test compiling. The compiler...

  • alvin alvin posted a comment on discussion Open Discussion

    Ah, if you compile with "--no-peep" the single-byte-at-a-time push of a 64-bit number...

  • alvin alvin posted a comment on discussion Open Discussion

    I no longer have that original code fragment -- I thought sdcc was doing that all...

  • alvin alvin created ticket #2501

    [z80] union and 64-bit type fatal internal compiler error

  • alvin alvin posted a comment on discussion Open Discussion

    I've been adding longlong to z88dk for sdcc and found that the code sdcc is generating...

  • alvin alvin posted a comment on ticket #2498

    You can insert code that has no side effects to registers anywhere ("di" and "ei"...

  • alvin alvin posted a comment on ticket #2498

    I think it actually works Ben. We don't see an example of actually using the parameter...

  • alvin alvin posted a comment on ticket #2498

    (when not inlined) This loads the value into dehl, calls swap_words which accepts...

  • alvin alvin modified a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin modified a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin modified a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin modified a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin modified a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin posted a comment on ticket #2498

    The generated code looks correct to me? Maybe point out version, compile line and...

  • alvin alvin modified a comment on ticket #2494

    Ben I think you misunderstand -- the rule is incorrect and leads to generation of...

  • alvin alvin modified a comment on ticket #2494

    Btw. Alvin, it would really help if you can also provide a test case that exhibits...

  • alvin alvin posted a comment on ticket #2494

    This means the difference is much smaller, but the 3 rules still perform worse than...

  • alvin alvin posted a comment on ticket #2494

    Btw. Alvin, it would really help if you can also provide a test case that exhibits...

  • alvin alvin posted a comment on ticket #2494

    Ben I don't think you understand -- the rule is incorrect and leads to generation...

  • alvin alvin posted a comment on ticket #2494

    We pluck the sdcc binary out and insert into our own toolchain with front end, libraries,...

  • alvin alvin created ticket #2494

    [z80] Peephole Rule #25 Incorrect

  • alvin alvin created ticket #2479

    sdcc mangles string constants in inlined asm

  • alvin alvin modified a comment on ticket #2459

    sdcc -v 9507 MSVC The original code is generating a warning: test7.c:35: warning...

  • alvin alvin posted a comment on ticket #2459

    sdcc -v 9507 MSVC The original code is generating a warning: test7.c:35: warning...

  • alvin alvin posted a comment on ticket #2471

    Thanks Ben - everything works as expected now.

  • alvin alvin posted a comment on ticket #2471

    Yes as Peter says, I'm not saying the code should be accepted -- I'm saying that...

  • alvin alvin posted a comment on ticket #2471

    Hi Ben, the fix works on the test cases thanks. I took a hint from the error message...

  • alvin alvin posted a comment on ticket #2471

    compile line used to produce output assembly: sdcc -mz80 -S test.c

  • alvin alvin created ticket #2471

    Incorrect Initiaization of Global Array Containing Pointers

  • alvin alvin modified a comment on ticket #483

    Maybe similar to sverx and a solution I am trying with peephole rules below. This...

  • alvin alvin modified a comment on ticket #483

    Maybe similar to sverx and a solution I am trying with peephole rules below. This...

  • alvin alvin modified a comment on ticket #483

    Maybe similar to sverx and a solution I am trying with peephole rules below. This...

  • alvin alvin modified a comment on ticket #483

    Maybe similar to sverx and a solution I am trying with peephole rules below. This...

  • alvin alvin modified a comment on ticket #483

    Maybe similar to sverx and a solution I am trying with peephole rules below. This...

  • alvin alvin posted a comment on ticket #483

    Maybe similar to sverx and a similar solution I am trying with peephole rules below....

  • alvin alvin modified a comment on ticket #483

    I had some build trouble with MSVC so hopefully it isn't affecting the results here....

  • alvin alvin posted a comment on ticket #483

    I had some build trouble with MSVC so hopefully it isn't affecting the results here....

  • alvin alvin posted a comment on ticket #483

    It looks like the z88dk_fastcall decoration has to be last.

  • alvin alvin modified a comment on discussion Open Discussion

    I've got a patch that will fix "ex de,hl", "ex (sp),hl", the load issues and the...

  • alvin alvin posted a comment on ticket #2278

    I ran across the same code generation error and again only if --reserve-regs-iy is...

  • alvin alvin posted a comment on discussion Open Discussion

    ok. I updated the patch to the version I'll foist on z88dk. I found one more bug:...

  • alvin alvin modified a comment on discussion Open Discussion

    I've got a patch that will fix "ex de,hl", "ex (sp),hl", the load issues and the...

  • alvin alvin posted a comment on discussion Open Discussion

    I've got a patch that will fix "ex de,hl", "ex (sp),hl", the load issues and the...

  • alvin alvin modified a comment on ticket #2434

    Ben, here is a patch for sdcc/src/z80/peeph-z80.def I did not touch rules after the...

  • alvin alvin posted a comment on ticket #2434

    Ben, here is a patch for sdcc/src/z80/peeph-z80.def

  • alvin alvin posted a comment on discussion Open Discussion

    I found three cases in the source code I was testing: Scanning ld ((_udata + 0x000c)),...

  • alvin alvin posted a comment on ticket #2434

    sorry ben, i got a really bad flu in december and then forgot about it :/ The issues...

  • alvin alvin modified a comment on discussion Open Discussion

    Yes I realize it's all a work in progress :) I'm poking at the peepholer quite a...

1 >