I tried #6623 with a simpler code configuration, which uses IAX2 protocol 
instead of SIP. And found the "jp to jr" problem back again:

C:\SDCC\BIN\sdcc menu.c -mz80 -c --max-allocs-per-node 
423 --std-c99 --codeseg C
ODE4
menu.asm:3065: Error: <a> machine specific addressing or addressing mode 
error
removing menu.rel
..\bin\make: *** [menu.rel] Error 1

;menu.c:1115: void DisplayOptionsItem()
; ---------------------------------
; Function DisplayOptionsItem
; ---------------------------------
_DisplayOptionsItem_start::
_DisplayOptionsItem:
;menu.c:1130: sIndex = SettingsGetIndex();
 call _SettingsGetIndex
 ld c,l
 ld b,h
;menu.c:1131: if (!sIndex) return;
 ld a,c
 or a,b
 ret Z
;menu.c:1133: switch(_iSub1MenuItem)
 ld a,#0x04
 ld iy,#__iSub1MenuItem
 sub a, 0 (iy)
 jp C,00108$
 push de
 ld e,0 (iy)
 ld d,#0x00
 ld hl,#00113$
 add hl,de
 add hl,de
;menu.c:1135: case SETTINGS_MENU_NETWORK:
 pop de
 jp (hl)
00113$:
 jr 00103$
 jr 00104$
 jr 00105$
 jr 00106$
 jr 00107$   ******************** this is line 3065, jp should be used here 
instead of jr 
*****************************************************************
00103$:
;menu.c:1140: LcdDisplay(_cNetworkMenu[_iSub2MenuItem], 0);
 ld a,(#__iSub2MenuItem + 0)
 ld e, a
 add a,a
 add a,a
 add a,a
 add a,a
 add a,e
 add a,#<(__cNetworkMenu)
 ld e,a
 ld a,#>(__cNetworkMenu)
 adc a, #0x00
 ld d,a
 push bc
 ld a,#0x00
 push af
 inc sp
 push de
 call _LcdDisplay
 pop af
 inc sp
 pop bc
;menu.c:1142: break;
 jp 00108$
;menu.c:1144: case SETTINGS_MENU_VOICE:
00104$:


Woody

http://palmmicro.com/woody/

----- Original Message ----- 
From: "Lin Rongrong" <wo...@palmmicro.com>
To: <sdcc-user@lists.sourceforge.net>; <supp...@palmmicro.com>
Sent: Friday, July 15, 2011 12:42 AM
Subject: Re: [Sdcc-user] Z80 code size reduction


> Just tested #6623 with "--max-allocs-per-node 423", still a mess.
> Will wait for another 24 hours for compiled #6624 with --oldralloc option 
> problem fixed.
>
> Woody
>
> http://palmmicro.com/woody/
>
> ----- Original Message ----- 
> From: "Philipp Klaus Krause" <p...@spth.de>
> To: <sdcc-user@lists.sourceforge.net>
> Sent: Thursday, July 14, 2011 4:08 AM
> Subject: Re: [Sdcc-user] Z80 code size reduction
>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Am 13.07.2011 04:24, schrieb Lin Rongrong:
>>> --max-allocs-per-node 100 reduced compile time to 5 minutes. But it
>>> generated larger code size than 3.0.1, caused a bank overflow in my case 
>>> and
>>> thus can not generate a binary file to test whether the result is 
>>> correct or
>>> wrong.
>>>
>>> Woody
>>
>> Is all of your application in one .c file? If not you should be able to
>> do what I did today to track down and fix a bug in memcpy() parameter
>> passing:
>>
>> Compile everything normally (takes some time).
>> recompile individual files with --oldralloc
>> (e.g. by adding --oldralloc in your Makefile, then doing
>> touch a.c && make
>> touch b.c && make
>> touch c.c && make
>>
>> and testing after each make. That way you only have to rebuild one file
>> at a time which should be faster. The moment a bug disappears, you have
>> found the problematic file. Now recompile everything normally again to
>> reduce binary size.
>> The try values of --max-allocs-per-node on the identified problematic
>> file. You should be able to use much lower --max-allocs-per-node values
>> this time, since all other files will be rather small, and only the one
>> you're investigating will be compiled with the lower value.
>>
>> Philipp
>>
>> P.S.: Maybe your problem was the bug I fixed today, so use current sdcc
>> for testing.
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk4d+0YACgkQbtUV+xsoLpphkgCeMsJG5a35Fyp1obawxoUQHL3u
>> Ek4AnA3/ONhTkJtGWwmTCvVFA6setPwj
>> =EujJ
>> -----END PGP SIGNATURE-----
>>
>> ------------------------------------------------------------------------------
>> AppSumo Presents a FREE Video for the SourceForge Community by Eric
>> Ries, the creator of the Lean Startup Methodology on "Lean Startup
>> Secrets Revealed." This video shows you how to validate your ideas,
>> optimize your ideas and identify your business strategy.
>> http://p.sf.net/sfu/appsumosfdev2dev
>> _______________________________________________
>> Sdcc-user mailing list
>> Sdcc-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
> 


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to