亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? random-notes.txt

?? This a FREE tool chain which compiles C codes into 8051 binary code, converts the binary to RTL ROM,
?? TXT
字號:
Random notes
------------
A random set of notes about sdcc and how it works.

Michael on the register allocation stage:
-----------------------------------------
Lets trace how the register allocator in the mcs51 port works.

Some concepts:
eBBlock
	A basic block.  I cant remeber the conditions, but a basic block
is one that is easy to optimise and analyse.  I guess this means that it has
a nice set of assignments and a reasonably straight flow.
iCode
	Intermediate code.  Provides the interface between the parser + optimiser
and the code generator by providing an abstract machine with infinite registers
which the parser can generate for and the back end can turn into real code.
iTemps
	An iTemp is a temporary register used in iCode.  These will eventually
be either replaced, allocated into a register, or placed onto the stack by the
backend.
Live range
     The live range of an iTemp is the part of the code that the iTemp is used
over.  Generally the live range of an iTemp is from its first assignment to its
last use.

Input to mcs51_assignRegisters is an array of basic blocks.  Assign
registers is normally called at the end of a function.

In pseudo code,
1.  For each basic block, pack the registers in the block.
    In this case register packing consists of:
       Remove any unneded iTemps that are just used in assignments.
       Mark anything that can be rematerialised as rematerialisable.
	   There is no way I spelt that correctly.  Something is rematerialisable
	   if it can be generated easily and is constant, and hence dosnt need
	   to be cached away in an iTemp.  An example is the address of something.
       Packs iTemps that are only used once into normally unavailble registers.
    Register packing removes unneeded iTemps.
2.  Determine what number and type of regsiters are needed for each
    live range.
    It does
       If the iTemp lives for zero time, dont bother assigning
       If its not an iTemp, skip for now.
       If its a conditional (determined in the register packing), skip as it will
       be stored in carry.
       If the iTemp is already packed from 1.c, skip
       If the iTemp is remat and some other magic, skip.
       Else set the number and type of registers based on the size of the iTemp.
3.  Assign registers for each segment.
    For each iCode, do
	If it is a IPOP (pop of an iTemp at the end of a block), reset the LR.
	De-assign the live ranges of the iTemps that expire here.
	    For each iTemp, do
	        If this iTemp is still alive, skip
		If this iTemp is spilt on the stack, free the location and continue.
		If there are no registers assigned (?), continue.
		Some magic using IFX and IPOP
		If the iTemp has no registers, continue.
		If the result of this iCode doesnt yet have registers, allocate them now.  Weird.
		Deallocate the registers used.
	Skip instructions that dont need registers (IFX, JUMPTABLE, POINTER_SET)
	Only assign registers to the result of this iCode.
	If the iCode has registers, or has been spilt, continue.
	If this will cause a spill as it needs more registers than are free, then
	    Find those that can be spilt.
	    Spill this if its easy.
	    Spill this if its the least used.
	Allocate registers to the result iTemp	   
	If any registers in the result are shared with the operand, make them line up.
4.  Create the register mask for each segment.
    For each iCode, do
	Set the used register bit vector from the used registers.
	Mark these registers as used in the higher function.  This lets the generator
	decide which registers need to be saved when calling or being called by a function.
	Hmm.  It seems to re-setup the used register bit vector.
5.  Redo the stack offsets.
6.  Turn the basic blocks into an intermediate code chain.
        Takes the array of basic blocks and pulls them out into one iCode chain.
7.  Optimise the labels in the iCode chain.
	Skipped if the label optimisations are turned off.
	Remove any gotos that go to the next line.
	Simplify any chained gotos
	Remove unreferenced labels
	Remove unreferenced code.
7.  Generate the mcs51 code from the iCode chain.
8.  Deallocate everything (registers and stack locations).

Sandeep:
--------
=======
Sandeep:
--------
The Register Allocation story.

Before I get into this there are a few important fields
on the iCode & oprtand data structures that need to be
addressed.

iCode.
-----
	->key  -  is an unique number assigned to this
                  iCode when this icode is allocated.

        ->seq  - sequence number of the iCode given in
	         acesnding order of execution.

operand.
-------
	->key  - unique number for an operand when operand
                 is allocated.

OP_LIVEFROM(op) - sequence number of the iCode where it was
                  first defined. Computed in SDCClrange.c

OP_LIVETO(op)   - sequence number of the iCode where it is
                  last used. Computed in SDCClrange.c


                 

Sandeep:
--------
Adding memory maps for AVR, setup default map for
local & global variables in port.h will be initialised
by the _<port>_finaliseOptions() [good functions]..some
kludges remain because of the "overlay" segment for 8051.

The memory segment stuff will have to be made more flexible.
Currently there does not seem to be a 1-to-1 correspondence 
between storage class & memory map. (should there be??).

Also Added check for memory map in SDCCmem.c allocLocal
and allocglobal for "eeprom" memory space (AVR).



Michael:
--------
Tracing parmBytes and function calls.

Bug:
void printf(const char *format);

void puts(const char *s)
{
	printf(s);
}

Generates the pseudo-code:
	  hl = s
	  push hl
	  call printf
	  pop l (not hl - so parmBytes is too small)

parmBytes for a function call seems to be setup in geniCodeCall in
SDCCicode.c.

geniCodeCall:
* Takes care of calls with side effects (?)
* Generates the icode to push the parameters (this also computes the 
  resulting stack size)
* Generates a CALL or PCALL depending on if its a function or pointer to.
* Computes the result
* Adds the code for the call to the chain.

My bug is probably in geniCodeParms - it's probably computing the
size of pointers wrong.

geniCodeParms:
* A 'parm' node causes this to be run on the tree branches.
* It switches on the stack mode and sendto mode, and adds the
  instructions required to push or put.
* A push adds the result of 'getSize' to the stack size.

So the bug is probably in getSize.  's' is not an aggregate, so the
bug is in getSize().

It seems that IS_SPEC() is being set, deferencing *s so that it's size
is sizeof(char) == 1.  It's either a SPECIFIER or a DECLARATOR - seems that
were the wrong way around.  This is set in SDCCsymt.c, SDCCval.c, and the 
yacc file. SDCCsymt.c and SDCCval.c havnt really changed in 5 days - must
be SDCC.y.  Nope, no changes.  diff against 5 days ago shows only intersting
changes are in SDCCicode.  Same with -14 days.

Michael
-------
Next bug is global function parameters not being pushed correctly. i.e

unsigned int counter;

void print(void)
{
	printf("Counter is %u\n", counter);
}
generates:
_print::
	ld hl,#_counter
	push hl
	ld hl,#str_1
	push hl
	call printf
	fix, ret

which is more like:
	printf("Counter is %u\n", &counter);
	
First looking in SDCCicode.c for the stuff that generates function calls:
Probably a bug in geniCodeParams.
Nope, a bug in my stuff :)

Michael
-------
Comparing the dhrystone code vs Hitech C v7.50

cp:
	ld	hl,__r
	ld	(_Next_Ptr_Glob),hl
vs:
	ld	hl,#__r
	ld	iy,#_Next_Ptr_Glob
	ld	0(iy),l
	ld	1(iy),h

cp:
	ld	a,#<__r
	add	a,#0x27
	ld	iy,#_Ptr_Glob
	ld	0(iy),a
	ld	a,#>__r
	adc	a,#0x00
	ld	1(iy),a
vs:
	ld	hl,__r+027h
	ld	(_Ptr_Glob),hl

cp:
	ld	iy,#_Next_Ptr_Glob
	ld	a,0(iy)
	ld	(hl),a
	inc	hl
	ld	a,1(iy)
	ld	(hl),a

vs:
	ld	bc,(_Next_Ptr_Glob)
	ld	hl,(_Ptr_Glob)
	ld	(hl),c
	inc	hl
	ld	(hl),b


cp:
	ld	bc,(_Ptr_Glob)
	ld	l,c
	ld	h,b
	inc	hl
	inc	hl
	ld	(hl),#0x00
	inc	hl
	ld	(hl),#0x00
vs:
	ld	iy,(_Ptr_Glob)
	ld	(iy+2),0
	ld	(iy+3),0


strcpy is inlined as:
u12:
	ld	a,(hl)
	ldi
	or	a
	jp	nz,u12

cp:
	ld	a,#<_Arr_2_Glob
	add	a,#0x2E
	ld	-80(ix),a
	ld	a,#>_Arr_2_Glob
	adc	a,#0x03
	ld	-79(ix),a
;	genAssign (pointer)
;	AOP_STK for _main_sloc1_1_0
	ld	l,-80(ix)
	ld	h,-79(ix)
	ld	(hl),#0x0A
	inc	hl
	ld	(hl),#0x00
vs:
	ld	hl,0Ah
	ld	(_Arr_2_Glob+032Eh),hl

cp:
	ld	a,-72(ix)
	or	a,a
	jp	nz,00126$
	ld	a,-71(ix)
	and	a,#0x03
; Rule 4: Changed jp order
	jp	z,00127$
00126$:
	jp	00102$
00127$:

vs:        
	ld	(ix+-7),c
	ld	(ix+-6),b
	ld	a,c
	ld	l,a
	ld	a,b
	and	03h
	ld	h,a
	ld	a,l
	or	h
	jp	nz,l12

cp:
	ld	a,-82(ix)
	or	a,-81(ix)
	sub	a,#0x01
	ld	a,#0x00
	rla
	ld	iy,#_Bool_Glob
	ld	0(iy),a
	ld	1(iy),#0x00

vs:
	ld	a,l
	or	h
	ld	hl,01h
	jp	z,u42
	dec	hl
u42:
	ld	(_Bool_Glob),hl

;C:\TEMP\DHRY.C: 173: Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
is turned into:
	ld	l,(ix+-13)
	ld	h,(ix+-12)
	ld	d,h
	ld	e,l
	add	hl,hl
	add	hl,hl
	add	hl,de
   
Comapring two types of cmpeq:
	ld	a,c		; 4
	cp	a,#0xFB         ; 7
	jp	nz,00119$	; 10
	ld	a,b		; 4
	cp	a,#0xFF		; 7
; Rule 5: Changed jump logic
	jp	z,00101$	; 10
00119$:
        ; 21 to 42

vs:
        ld      hl,#val		; 10
        or      a		; 4
        sbc     hl,bc		; 15 
        jp      z,...		; 10
        ; Always 39 - worse

Comaring break even point for shift:
	ld	a,#0x03+1	; 7
	jp	00114$		; 10
00113$:
	sra	b		; 8
	rr	c		; 8
00114$:
	dec	a		; 4
	jp	nz,00113$	; 10

        ; Bytes: 2+3+1+1+1+3 = 11
        ; t-states = 17+n*30
vs
        sra     b
        rr      c ...
        ; Bytes: 2*n
        ; t-states = 16*n         

        Ah, pick 4

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人在线观看| 国产精品青草综合久久久久99| 亚洲国产欧美在线人成| 91成人国产精品| 午夜精品一区二区三区免费视频 | 国产精品亚洲视频| 国产免费成人在线视频| 91美女片黄在线观看91美女| 一卡二卡三卡日韩欧美| 欧美一区二区性放荡片| 国产一区二区三区四区五区美女| 欧美国产精品中文字幕| 一本大道久久a久久综合婷婷| 午夜一区二区三区视频| 日韩免费在线观看| 成人一区二区三区在线观看| 亚洲男人的天堂av| 日韩免费看网站| 国产69精品久久久久毛片| 亚洲欧美在线aaa| 在线观看亚洲精品| 狠狠色狠狠色综合日日91app| 日本一区二区视频在线| 91福利在线播放| 国产乱码精品一区二区三| 一区二区三区四区激情| 欧美成人性福生活免费看| 91在线精品一区二区三区| 日韩国产一二三区| 中文字幕在线不卡国产视频| 欧美一区二区三区公司| jiyouzz国产精品久久| 美女www一区二区| 亚洲欧美偷拍三级| 久久久久久毛片| 欧美亚一区二区| 国产高清精品久久久久| 石原莉奈一区二区三区在线观看| 国产精品毛片久久久久久久| 日韩一区二区电影在线| 91香蕉视频mp4| 久草这里只有精品视频| 亚洲国产精品一区二区久久 | 97aⅴ精品视频一二三区| 无码av中文一区二区三区桃花岛| 欧美国产精品v| 91精品国产品国语在线不卡| 色综合婷婷久久| 国产一区二区中文字幕| 亚洲成a人v欧美综合天堂下载| 国产精品初高中害羞小美女文| 91精品国产综合久久精品app| 91欧美一区二区| 成人永久免费视频| 国产综合色精品一区二区三区| 午夜精品一区二区三区三上悠亚| 亚洲免费三区一区二区| 中国av一区二区三区| 日韩欧美成人激情| 欧美一区二区三区在| 欧美精品粉嫩高潮一区二区| 91网上在线视频| 成人av电影免费观看| 成人性生交大片免费看视频在线 | 国产成人小视频| 老司机精品视频线观看86| 亚洲大片免费看| 亚洲国产精品嫩草影院| 亚洲国产精品天堂| 五月婷婷久久丁香| 亚洲国产人成综合网站| 午夜精品久久久| 亚州成人在线电影| 五月天中文字幕一区二区| 亚洲成人资源网| 日韩成人dvd| 美女视频网站黄色亚洲| 老司机精品视频在线| 久久激情五月婷婷| 国内国产精品久久| 高清成人在线观看| 99久久久久久| 欧美午夜在线观看| 日韩一区二区在线看| 日韩欧美激情四射| 久久午夜羞羞影院免费观看| 欧美国产禁国产网站cc| 中文字幕五月欧美| 一区二区三区高清| 人人爽香蕉精品| 国产综合成人久久大片91| 成人午夜av影视| 91影视在线播放| 欧美日韩一区二区在线视频| 日韩一区二区免费在线观看| 久久午夜国产精品| 亚洲欧洲综合另类在线| 五月天激情小说综合| 九色综合狠狠综合久久| 大胆欧美人体老妇| 色菇凉天天综合网| 欧美一级高清片在线观看| 国产亚洲精品bt天堂精选| 中文字幕一区二区日韩精品绯色| 亚洲综合成人在线视频| 美女视频网站久久| 不卡一区二区在线| 91精品国产综合久久福利软件 | 国产精品不卡一区二区三区| 亚洲日本在线a| 丝袜美腿高跟呻吟高潮一区| 国产精品一级片| 欧亚一区二区三区| 精品三级在线看| 亚洲人成电影网站色mp4| 日韩电影在线一区二区三区| 国产精品2024| 欧美高清dvd| 亚洲国产成人自拍| 成年人国产精品| 777午夜精品视频在线播放| 国产亚洲欧美一级| 性感美女久久精品| 国产aⅴ精品一区二区三区色成熟| 在线亚洲欧美专区二区| 久久综合狠狠综合久久综合88 | 一区二区高清在线| 国产传媒欧美日韩成人| 欧美精品免费视频| 日韩一区中文字幕| 国产激情一区二区三区| 67194成人在线观看| 亚洲欧洲成人精品av97| 国产在线看一区| 欧美日本一区二区三区四区 | 欧洲亚洲精品在线| 久久久久97国产精华液好用吗| 午夜成人免费电影| 99精品黄色片免费大全| 国产婷婷一区二区| 日本女优在线视频一区二区| 91免费版在线| 欧美激情一区二区三区在线| 麻豆精品精品国产自在97香蕉| 在线观看区一区二| 亚洲视频在线观看三级| 国产福利精品一区二区| 精品免费国产二区三区| 一区二区三区成人| 一本色道a无线码一区v| 中文字幕欧美三区| 岛国精品在线观看| 国产天堂亚洲国产碰碰| 精品在线亚洲视频| 精品国精品国产| 免费成人在线观看视频| 在线播放中文一区| 亚洲高清视频在线| 欧美午夜一区二区三区免费大片| 1000部国产精品成人观看| 成人免费视频网站在线观看| 久久久久久久综合日本| 国产成人午夜高潮毛片| 久久久久国产精品免费免费搜索| 精品一区二区三区日韩| 欧美xxxxx牲另类人与| 麻豆国产精品777777在线| 欧美精品在线观看一区二区| 亚洲国产视频在线| 欧美日韩高清一区| 日本中文字幕一区二区视频| 91精品国产91久久久久久最新毛片| 亚洲高清中文字幕| 欧美一区二区三区爱爱| 麻豆国产精品一区二区三区 | 欧美女孩性生活视频| 日韩成人午夜精品| 日韩精品一区二区在线观看| 日日摸夜夜添夜夜添精品视频 | 懂色av一区二区三区蜜臀| 中文字幕电影一区| 91蜜桃传媒精品久久久一区二区 | 亚洲成人av中文| 日韩一区二区三区在线| 国产在线精品一区二区三区不卡| 欧美激情一区三区| 在线观看成人免费视频| 日韩精品一区第一页| 精品国产91洋老外米糕| 成人性视频网站| 亚洲免费毛片网站| 日韩情涩欧美日韩视频| 国产一区二区三区精品视频 | 亚洲mv大片欧洲mv大片精品| 欧美一区二区国产| 国产精品一区二区在线观看不卡| 亚洲欧洲一区二区在线播放| 欧美视频一区二区三区在线观看| 美女网站一区二区| 国产精品久久久久久妇女6080|