[<<] [<] Page 1 of 2 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 18 Nov 2000 21:01:23 -0000 Message-Id: <Pine.LNX.4.21.0011181436470.11775-100000@tempest2.blackhat.net> About once a week I post a blurb on this: gpasm file format outputs are almost complete. Good news is that gpasm can be used to compile the code. Bad news is that gpasm doesn't do any linking. But for the time being, that's the way it's going to be. This way I can create scripts that take the output of SDCC, assemble it with gpasm and test the accuracy by simulating with gpsim (in command line mode of course). casting from smaller to larger types is now supported. There are some 8051 assumptions that during casting SDCC makes in generating the intermediate code that are inappropriate for the PIC. Or I should say it's appropriate, but can be done much more efficiently with the PIC assembly language. Unfortunately, changing this logic means diving into the guts of SDCC - something I'm going to avoid until later. bit addition is supported. I think all of the addition cases are tested. However, I'm going to get the testing infrastructure with gpsim established before I migrate to the other operators. --------- While I'm listed as an author at the SDCC Sorce Forge web page, I still don't have write access. Sandeep (the main SDCC author) is aware of this. The result is that I can't check my stuff into CVS. At this point in the game, it wouldn't be of much use too anyone. But if you're curious: http://www.dattalo.com/gnupic/sdcc.html Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 19 Nov 2000 20:36:32 -0000 Message-Id: <Pine.LNX.4.21.0011191437220.18783-100000@tempest2.blackhat.net> On Sat, 18 Nov 2000, Scott Dattalo wrote: > http://www.dattalo.com/gnupic/sdcc.html The link to the source was broken, but now it's fixed http://www.dattalo.com/gnupic/sdcc_pic14.tar.gz BTW, I've got SDCC generating code that can be compiled by gpasm... There are still 8051 instructions that get thrown in, but I fix those as I go along. Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Wojtek Zabolotny ####@####.#### Date: 21 Nov 2000 16:36:08 -0000 Message-Id: <20001121172050.A3500@ipebio15.ise.pw.edu.pl> On Sun, Nov 19, 2000 at 02:44:10PM -0600, Scott Dattalo wrote: > BTW, I've got SDCC generating code that can be compiled by gpasm... There are > still 8051 instructions that get thrown in, but I fix those as I go along. What about data & code paging for 16F87x? I know, that it is not the most important thing, but probably if gets overlooked now, it can be difficult to add later ;-). Anyway thanks Scott for your great work!!! (And sorry for my complaints). -- Regards Wojciech M. Zabolotny http://www.ise.pw.edu.pl/~wzab <--> ####@####.#### http://www.debian.org Linux - free OS for free people! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 21 Nov 2000 16:54:13 -0000 Message-Id: <Pine.LNX.4.21.0011211053130.3149-100000@tempest2.blackhat.net> On Tue, 21 Nov 2000, Wojtek Zabolotny wrote: > On Sun, Nov 19, 2000 at 02:44:10PM -0600, Scott Dattalo wrote: > > BTW, I've got SDCC generating code that can be compiled by gpasm... There are > > still 8051 instructions that get thrown in, but I fix those as I go along. > > What about data & code paging for 16F87x? I know, that it is not the most > important thing, but probably if gets overlooked now, it can be difficult > to add later ;-). For now, paging will not be supported. I've got enough to worry about without it! But I'll keep it in mind (the F87x parts make paging much easier IMO because of the shared 16 bytes at the top of the 4 banks). At the moment I'm working on for loops and conditionals. I was going to do all of the operators first, however I decided to create the infrastructure for regression analysis. I've modified gpsim to be invokable in "Command Line Only" mode - even if gpsim was built with the gui. I've added a new command `abort_gpsim_now' that will cause gpsim to exit even if it's in the middle of a script (the quit command will not exit gpsim if it's invoked from within a script). I'm going to create Makefiles and gpsim scripts that will automatically test SDCC outputs for correctness. Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 2 Dec 2000 06:01:24 -0000 Message-Id: <Pine.LNX.4.21.0012012348350.13972-100000@tempest2.blackhat.net> This past week was spent mostly tweaking gpsim to get it to work with batch files. All that wonderful work Ralf has produced goes to waste when I run gpsim as part of a big script to perform regression testing. I've got a makefile and a handful of scripts that will allow me to: -- compile a c program with SDCC -- assemble it with gpasm -- simulate it with gpsim The C programs are structured in such a way that I only need to examine one variable to see if the code simulated correctly. gpsim's output is directed to a file and then grep'd for the good (or bad) result. This works really well and allows me to make a change and then have confidence that it doesn't disrupt other areas unexpectedly. You'd be surprised at how intertwined this stuff is! The latest result is that == and != are working (when the two things being compared are the same size). If you're interested in the code output, I've attached it below. I think you'll find that it's fairly tight. Even though I know many people are anxious to get thier hands on this code, they're going to have to deal with my obsessive behavior of having it absolutely tweaked first! If anyone has access to a "real" C compiler, I'd be interested to see how this compares. Scott PS. I apologize for the size of the post. compare.c /* PIC PORT Test code */ /* compare.c test compare */ unsigned char success=0; unsigned char failures=0; unsigned char dummy=0; unsigned char achar0 = 0; unsigned char achar1 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; char schar0=0; char schar1=0; void done() { dummy++; } /* achar0 should be zero */ void compare_char_to_lits1(void) { if(achar0) failures++; if(achar0 == 1) failures++; if(achar0 == 7) failures++; if(achar0 != 0) failures++; } /* achar0 should be `5' */ void compare_char_to_lits2(void) { if(!achar0) failures++; if(achar0 == 1) failures++; if(achar0 == 7) failures++; if(achar0 != 5) failures++; } /* achar0 should equal achar1 */ void compare_char_to_char1(void) { if(achar0 != achar1) failures++; if(schar0 != schar1) failures++; } /* achar0 should be different than achar1 */ void compare_char_to_char2(void) { if(achar0 == achar1) failures++; } /* aint0 should be zero */ void compare_int_to_lits1(void) { if(aint0) failures++; if(aint0 == 1) failures++; if(aint0 == 7) failures++; if(aint0 != 0) failures++; } /* aint0 should be `5' */ void compare_int_to_lits2(void) { if(!aint0) failures++; if(aint0 == 1) failures++; if(aint0 == 7) failures++; if(aint0 != 5) failures++; } /* aint0 should be `0x1234' */ void compare_int_to_lits3(void) { if(!aint0) failures++; if(aint0 == 1) failures++; if(aint0 == 7) failures++; if(aint0 != 0x1234) failures++; } /* aint0 should equal aint1 */ void compare_int_to_int1(void) { if(aint0 != aint1) failures++; } /* aint0 should be different than aint1 */ void compare_int_to_int2(void) { if(aint0 == aint1) failures++; } void main(void) { compare_char_to_lits1(); compare_char_to_char1(); achar0 = 5; compare_char_to_lits2(); compare_char_to_char2(); compare_int_to_lits1(); aint0 = 5; compare_int_to_lits2(); aint0 = 0x1234; compare_int_to_lits3(); compare_int_to_int2(); aint0 = 0; compare_int_to_int1(); success = failures; done(); } compare.asm ;-------------------------------------------------------- ; File Created by SDCC : FreeWare ANSI-C Compiler ; Version 2.2.0 Sat Dec 2 00:45:47 2000 ;-------------------------------------------------------- ; PIC port for the 14-bit core ;-------------------------------------------------------- ; .module compare list p=16c84 __config _wdt_off include "p16c84.inc" ;-------------------------------------------------------- ; publics variables in this module ;-------------------------------------------------------- ; .globl _main ; .globl _compare_int_to_int2 ; .globl _compare_int_to_int1 ; .globl _compare_int_to_lits3 ; .globl _compare_int_to_lits2 ; .globl _compare_int_to_lits1 ; .globl _compare_char_to_char2 ; .globl _compare_char_to_char1 ; .globl _compare_char_to_lits2 ; .globl _compare_char_to_lits1 ; .globl _done ; .globl _schar1 ; .globl _schar0 ; .globl _aint1 ; .globl _aint0 ; .globl _achar1 ; .globl _achar0 ; .globl _dummy ; .globl _failures ; .globl _success ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- cblock 0x13 ;-------------------------------------------------------- ; special function bits ;-------------------------------------------------------- ;-------------------------------------------------------- ; internal ram data ;-------------------------------------------------------- ; .area DSEG (DATA) _success _failures _dummy _achar0 _achar1 _aint0 _aint0_2 _aint1 _aint1_2 _schar0 _schar1 ;-------------------------------------------------------- ; overlayable items in internal ram ;-------------------------------------------------------- ; .area OSEG (OVR,DATA) ;-------------------------------------------------------- ; bit data ;-------------------------------------------------------- ; .area BSEG (BIT) ;-------------------------------------------------------- ; Stack segment in internal ram ;-------------------------------------------------------- ; .area SSEG (DATA) ;__start__stack: ; .ds 1 ;-------------------------------------------------------- ; indirectly addressable internal ram data ;-------------------------------------------------------- ; .area ISEG (DATA) ;-------------------------------------------------------- ; external ram data ;-------------------------------------------------------- ; .area XSEG (XDATA) endc ORG 0 ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- ; .area CSEG (CODE) ;__interrupt_vect: ; ljmp __sdcc_gsinit_startup ; reti ; .ds 7 ; reti ; .ds 7 ; reti ; .ds 7 ; reti ; .ds 7 ; reti ; .ds 7 ; reti ; .ds 7 ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; .area GSINIT (CODE) ; .area GSFINAL (CODE) ; .area GSINIT (CODE) __sdcc_gsinit_startup: ; mov sp,#7 ; lcall __sdcc_external_startup ; mov a,dpl ; jz __sdcc_init_data ; ljmp __sdcc_program_startup ;__sdcc_init_data: ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _success ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _failures ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _dummy ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _achar0 ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _achar1 ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf (_aint0 + 1) clrf _aint0 ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf (_aint1 + 1) clrf _aint1 ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _schar0 ;G_DS_main_DS_0_DS_0 7940 ; compare.c 185 clrf _schar1 ; .area GSINIT (CODE) ; .area GSFINAL (CODE) ; ljmp __sdcc_program_startup ;-------------------------------------------------------- ; code ;-------------------------------------------------------- ; .area CSEG (CODE) __sdcc_program_startup: call _main ; return from main will lock up goto $ ;G_DS_done_DS_0_DS_0 7940 ; compare.c 30 ; ----------------------------------------- ; function done ; ----------------------------------------- _done: ; compare.c 33 incf _dummy,f _00121_DS_: ; C_DS_compare.c_DS_35_DS_1_DS_1 ==. ; XG_DS_done_DS_0_DS_0 ==. return ;G_DS_compare_char_to_lits1_DS_0_DS_0 7940 ; compare.c 39 ; ----------------------------------------- ; function compare_char_to_lits1 ; ----------------------------------------- _compare_char_to_lits1: ; compare.c 42 movf _achar0,w ; compare.c 43 ;peep 3 skpz incf _failures,f _00142_DS_: ; compare.c 45 movf _achar0,w xorlw 0x1 ; compare.c 46 ;peep 1 skpnz incf _failures,f _00144_DS_: ; compare.c 48 movf _achar0,w xorlw 0x7 ; compare.c 49 ;peep 1 skpnz incf _failures,f _00146_DS_: ; compare.c 51 movf _achar0,f ; compare.c 52 ;peep 3 skpz incf _failures,f _00149_DS_: ; C_DS_compare.c_DS_53_DS_1_DS_1 ==. ; XG_DS_compare_char_to_lits1_DS_0_DS_0 ==. return ;G_DS_compare_char_to_lits2_DS_0_DS_0 7940 ; compare.c 56 ; ----------------------------------------- ; function compare_char_to_lits2 ; ----------------------------------------- _compare_char_to_lits2: ; compare.c 59 movf _achar0,w ; compare.c 60 ;peep 1 skpnz incf _failures,f _00162_DS_: ; compare.c 62 movf _achar0,w xorlw 0x1 ; compare.c 63 ;peep 1 skpnz incf _failures,f _00164_DS_: ; compare.c 65 movf _achar0,w xorlw 0x7 ; compare.c 66 ;peep 1 skpnz incf _failures,f _00166_DS_: ; compare.c 68 movf _achar0,w xorlw 0x5 ; compare.c 69 ;peep 3 skpz incf _failures,f _00169_DS_: ; C_DS_compare.c_DS_70_DS_1_DS_1 ==. ; XG_DS_compare_char_to_lits2_DS_0_DS_0 ==. return ;G_DS_compare_char_to_char1_DS_0_DS_0 7940 ; compare.c 74 ; ----------------------------------------- ; function compare_char_to_char1 ; ----------------------------------------- _compare_char_to_char1: ; compare.c 77 movf _achar0,w xorwf _achar1,w ; compare.c 78 ;peep 3 skpz incf _failures,f _00182_DS_: ; compare.c 80 movf _schar0,w xorwf _schar1,w ; compare.c 81 ;peep 3 skpz incf _failures,f _00185_DS_: ; C_DS_compare.c_DS_82_DS_1_DS_1 ==. ; XG_DS_compare_char_to_char1_DS_0_DS_0 ==. return ;G_DS_compare_char_to_char2_DS_0_DS_0 7940 ; compare.c 85 ; ----------------------------------------- ; function compare_char_to_char2 ; ----------------------------------------- _compare_char_to_char2: ; compare.c 88 movf _achar0,w xorwf _achar1,w ; compare.c 89 ;peep 1 skpnz incf _failures,f _00203_DS_: ; C_DS_compare.c_DS_91_DS_1_DS_1 ==. ; XG_DS_compare_char_to_char2_DS_0_DS_0 ==. return ;G_DS_compare_int_to_lits1_DS_0_DS_0 7940 ; compare.c 95 ; ----------------------------------------- ; function compare_int_to_lits1 ; ----------------------------------------- _compare_int_to_lits1: ; compare.c 98 movf _aint0,w iorwf (_aint0 + 1),w ; compare.c 99 ;peep 3 skpz incf _failures,f _00222_DS_: ; compare.c 101 movf _aint0,w xorlw 0x1 skpz goto _00224_DS_ movf (_aint0 + 1),f ; compare.c 102 ;peep 1 skpnz incf _failures,f _00224_DS_: ; compare.c 104 movf _aint0,w xorlw 0x7 skpz goto _00226_DS_ movf (_aint0 + 1),f ; compare.c 105 ;peep 1 skpnz incf _failures,f _00226_DS_: ; compare.c 107 movf _aint0,f skpnz goto _00229_DS_ movf (_aint0 + 1),f ; compare.c 108 ;peep 3 skpz incf _failures,f _00229_DS_: ; C_DS_compare.c_DS_109_DS_1_DS_1 ==. ; XG_DS_compare_int_to_lits1_DS_0_DS_0 ==. return ;G_DS_compare_int_to_lits2_DS_0_DS_0 7940 ; compare.c 112 ; ----------------------------------------- ; function compare_int_to_lits2 ; ----------------------------------------- _compare_int_to_lits2: ; compare.c 115 movf _aint0,w iorwf (_aint0 + 1),w ; compare.c 116 ;peep 1 skpnz incf _failures,f _00242_DS_: ; compare.c 118 movf _aint0,w xorlw 0x1 skpz goto _00244_DS_ movf (_aint0 + 1),f ; compare.c 119 ;peep 1 skpnz incf _failures,f _00244_DS_: ; compare.c 121 movf _aint0,w xorlw 0x7 skpz goto _00246_DS_ movf (_aint0 + 1),f ; compare.c 122 ;peep 1 skpnz incf _failures,f _00246_DS_: ; compare.c 124 movf _aint0,w xorlw 0x5 skpnz goto _00249_DS_ movf (_aint0 + 1),f ; compare.c 125 ;peep 3 skpz incf _failures,f _00249_DS_: ; C_DS_compare.c_DS_126_DS_1_DS_1 ==. ; XG_DS_compare_int_to_lits2_DS_0_DS_0 ==. return ;G_DS_compare_int_to_lits3_DS_0_DS_0 7940 ; compare.c 129 ; ----------------------------------------- ; function compare_int_to_lits3 ; ----------------------------------------- _compare_int_to_lits3: ; compare.c 132 movf _aint0,w iorwf (_aint0 + 1),w ; compare.c 133 ;peep 1 skpnz incf _failures,f _00262_DS_: ; compare.c 135 movf _aint0,w xorlw 0x1 skpz goto _00264_DS_ movf (_aint0 + 1),f ; compare.c 136 ;peep 1 skpnz incf _failures,f _00264_DS_: ; compare.c 138 movf _aint0,w xorlw 0x7 skpz goto _00266_DS_ movf (_aint0 + 1),f ; compare.c 139 ;peep 1 skpnz incf _failures,f _00266_DS_: ; compare.c 141 movf _aint0,w xorlw 0x34 skpnz goto _00269_DS_ movf (_aint0 + 1),w xorlw 0x12 ; compare.c 142 ;peep 3 skpz incf _failures,f _00269_DS_: ; C_DS_compare.c_DS_143_DS_1_DS_1 ==. ; XG_DS_compare_int_to_lits3_DS_0_DS_0 ==. return ;G_DS_compare_int_to_int1_DS_0_DS_0 7940 ; compare.c 146 ; ----------------------------------------- ; function compare_int_to_int1 ; ----------------------------------------- _compare_int_to_int1: ; compare.c 149 movf _aint0,w xorwf _aint1,w skpz goto _00106_DS_ movf (_aint0 + 1),w xorwf (_aint1 + 1),w ; compare.c 150 ;peep 4 skpz _00106_DS_: incf _failures,f _00283_DS_: ; C_DS_compare.c_DS_152_DS_1_DS_1 ==. ; XG_DS_compare_int_to_int1_DS_0_DS_0 ==. return ;G_DS_compare_int_to_int2_DS_0_DS_0 7940 ; compare.c 155 ; ----------------------------------------- ; function compare_int_to_int2 ; ----------------------------------------- _compare_int_to_int2: ; compare.c 158 movf _aint0,w xorwf _aint1,w skpz goto _00303_DS_ movf (_aint0 + 1),w xorwf (_aint1 + 1),w ; compare.c 159 ;peep 1 skpnz incf _failures,f _00303_DS_: ; C_DS_compare.c_DS_161_DS_1_DS_1 ==. ; XG_DS_compare_int_to_int2_DS_0_DS_0 ==. return ;G_DS_main_DS_0_DS_0 7940 ; compare.c 163 ; ----------------------------------------- ; function main ; ----------------------------------------- _main: ; compare.c 166 call _compare_char_to_lits1 ; compare.c 167 call _compare_char_to_char1 ; compare.c 168 movlw 0x05 movwf _achar0 ; compare.c 169 call _compare_char_to_lits2 ; compare.c 170 call _compare_char_to_char2 ; compare.c 173 call _compare_int_to_lits1 ; compare.c 174 clrf (_aint0 + 1) movlw 0x05 movwf _aint0 ; compare.c 175 call _compare_int_to_lits2 ; compare.c 176 movlw 0x34 movwf _aint0 movlw 0x12 movwf (_aint0 + 1) ; compare.c 177 call _compare_int_to_lits3 ; compare.c 178 call _compare_int_to_int2 ; compare.c 179 clrf (_aint0 + 1) clrf _aint0 ; compare.c 180 call _compare_int_to_int1 ; compare.c 182 movf _failures,w movwf _success ; compare.c 183 call _done _00321_DS_: ; C_DS_compare.c_DS_184_DS_1_DS_1 ==. ; XG_DS_main_DS_0_DS_0 ==. return ; .area CSEG (CODE) end | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 2 Dec 2000 06:32:39 -0000 Message-Id: <Pine.LNX.4.21.0012020034370.13972-100000@tempest2.blackhat.net> On Sat, 2 Dec 2000, Scott Dattalo wrote: > If anyone has access to a "real" C compiler, I'd be interested to see how this > compares. I guess you can call C2C a real compiler. It costs money right? The SDCC port generates 179 instructions for the example I previously posted while C2C generates 241. That's 35% more! Maybe there's an optimization setting I'm missing in c2c? Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Matt ####@####.#### Date: 3 Dec 2000 22:43:21 -0000 Message-Id: <3A2ACD41.163FDE30@dsp.com.au> Scott Dattalo wrote: > > On Sat, 2 Dec 2000, Scott Dattalo wrote: > > > If anyone has access to a "real" C compiler, I'd be interested to see how this > > compares. > Hitech PICC produces 247 bytes without optimisations, and 173 with -O -Zg9 options.. (actually surprisingly I found it was 172 without the -Zg9 optimising option) the asm has been sent to Scott. Matt mail from: dsp systems | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 4 Dec 2000 03:04:41 -0000 Message-Id: <Pine.LNX.4.21.0012032104040.555-100000@tempest2.blackhat.net> On Mon, 4 Dec 2000, Matt wrote: > Scott Dattalo wrote: > > > > On Sat, 2 Dec 2000, Scott Dattalo wrote: > > > > > If anyone has access to a "real" C compiler, I'd be interested to see how this > > > compares. > > > Hitech PICC produces 247 bytes without optimisations, and 173 with -O > -Zg9 options.. > (actually surprisingly I found it was 172 without the -Zg9 optimising > option) > > the asm has been sent to Scott. I got it. I also got it from a few others. I also decreased the size of SDCC's output from 0xb3 to 0x9d (or 179 to 157) instructions. Byte Craft's compiler produces a 151 instruction version. That's 6 instructions that I can't account for. Perhaps if I rewrote the startup code... Thanks Matt (and others) Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
SDCC pic port status
From: Scott Dattalo ####@####.#### Date: 26 Dec 2000 20:38:46 -0000 Message-Id: <Pine.LNX.4.21.0012261412240.11932-100000@tempest2.blackhat.net> I've moved back to California and have resumed development. The last few weeks, as you can imagine, have been slow. I still don't have an ISP(*) so am unable to commit my changes to CVS, but here's what's working so far: for loops, while loops, addition between bit/char/ints, pointers, case statements, and arrays. I still have all of the operators to work out. However, I've concentrated on addition with the idea that other operators should be similar. The efficiency is still relatively good. However, since SDCC was originally targetted to an 8051, there are few 8051-isms that have crept into its design. Some of these are proving to be a real challenge to implement efficiently on a pic (but if you're satisfied with inefficient 8051-like code, then it's just fine). For example, the whole concept of indirect addressing with INDF/FSR is totally different than the @r0 or @r1 addressing. As a consequence, this generates horrible code: for(i=0; i<5; i++) some_array[i]=0; (this should take no more than 6 pic instructions [don't forget that i should equal 5 after the loop executes]. The version I've got working is about 10 instructions and loops 4 times. Yuck.) There are now about 7 files part of the regression test. This is proving to be invaluable in catching errors. Often times a "fix" in one area breaks something in another area. Hopefully I'll have an ISP real soon so that the changes can be submitted. In a month, SDCC should be generating usable PIC code. However, there still is a substantial amount work still left. Some of the major issues are banking and linking. The latter may involve modifying gpasm and gpsim too. Scott (*) PS. Anyone have any good recommendations for an ISP in the SF bay area? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
SDCC PIC port status
From: Scott Dattalo ####@####.#### Date: 22 Jan 2001 04:53:49 -0000 Message-Id: <Pine.LNX.4.21.0101212245540.13090-100000@tempest2.blackhat.net> The infrastructure of the pCode optimizer (post code optimizer) I discussed a couple of weeks ago has been implemented. There's nothing useful to show at the moment since all it does now is treat the instructions like comments and passes them to the peep hole optimizer unscathed. But the optimization potentials are enormous! Over the next week(s) I'll be converting the code that is being generated from ASCII strings to pCode. Then the next (difficult) step will be to develop the optimization algorithms. You can see the latest entry in the log: http://www.dattalo.com/gnupic/sdcc.html Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 2 [>] [>>] |