数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

ST20C2 数据表(PDF) 29 Page - STMicroelectronics

部件名 ST20C2
功能描述  Instruction Set Reference Manual
PDF  212 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

ST20C2 数据表(HTML) 29 Page - STMicroelectronics

Back Button ST20C2 Datasheet HTML 25Page - STMicroelectronics ST20C2 Datasheet HTML 26Page - STMicroelectronics ST20C2 Datasheet HTML 27Page - STMicroelectronics ST20C2 Datasheet HTML 28Page - STMicroelectronics ST20C2 Datasheet HTML 29Page - STMicroelectronics ST20C2 Datasheet HTML 30Page - STMicroelectronics ST20C2 Datasheet HTML 31Page - STMicroelectronics ST20C2 Datasheet HTML 32Page - STMicroelectronics ST20C2 Datasheet HTML 33Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 29 / 212 page
background image
29/212
®
4.2.2
Evaluating minimal symbol offsets
Several primary instructions have an operand that is an offset between the current
value of the instruction pointer and some other part of the code. Generating the
optimal prefix sequence to create the instruction data value for one of these
instructions is more complicated. This is because two, or more, instructions with offset
operands can interlock so that the minimal prefix sequences for each instruction is
dependent on the prefixing sequences used for the others.
For example consider the interlocking jumps below which can be prefixed in two
distinct ways. The instructions
j and cj are respectively jump and conditional jump.
These are explained in more detail later. The sequence:
cj +16; j -257
can be coded as
pfix 1; cj 0; pfix 1; nfix 0; j 15
but this can be optimized to be
cj 15; nfix 15; j 1
which is the encoding for the sequence
cj +15; j -255
This is because when the two offsets are reduced, their prefixing sequences take 1
byte less so that the two interlocking jumps will still transfer control to the same
instructions as before. This compaction of non-optimal prefix sequences is difficult to
perform and a better method is to slowly build up the prefix sequences so that the
optimal solution is achieved. The following algorithm performs this.
1
Associate with each jump instruction or offset load an ‘estimate’ of the number
of bytes required to code it and initially set them all to 0.
2
Evaluate all jump and load offsets under the current assumptions of the size of
prefix sequences to the jumps and offset loads
3
For each jump or load offset set the number of bytes needed to the number in
the shortest sequence that will build up the current offset.
4
If any change was made to the number of bytes required then go back to 2 oth-
erwise the code has reached a stable state.
The stable state that is achieved will be the optimal state.
Steps 2 and 3 can be combined so that the number of bytes required by each jump is
updated as the offset is calculated. This does mean that if an estimate is increased
then some previously calculated offsets may have been invalidated, but step 4 forces
another loop to be performed when those offsets can be corrected.
By initially setting the estimated size of offsets to zero, all jumps whose destination is
the next instruction are optimized out.
† Where the code being analyzed has alignment directives, then it is possible that this algorithm will not reach a stable state. One
solution to this, is to allow the algorithm to increase the instruction size but not allow it to reduce the size. This is achieved by
modifying stage 3 to choose the larger of: the currently calculated length, and the previously calculated length. This approach
does not always lead to minimal sized code, but it guarantees termination of the algorithm.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com