CW 7.2 Bug compiling constant 0x44000000 translates into 0x10000000

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CW 7.2 Bug compiling constant 0x44000000 translates into 0x10000000

ソリューションへジャンプ
1,304件の閲覧回数
nnadal2
Contributor III

Compiling a file outside the 'drivers' folder in one case 0x44000000 is translated into 0x10000000

 

;   79:         (*(volatile vuint32 *)(0x44000000+address)) =  -1;
;
0x00000028  0x207C44000000           movea.l  #1140850688,a0        ; 'D...'
0x0000002E  0x74FF                   moveq    #-1,d2
0x00000030  0x21827800               move.l   d2,(a0,d7.l)
;

...
;  114:        (*(volatile vuint32 *)(0x44000000+dst_cpyflash)) =  data;
;  115:               
;
0x000000DA  0x2E3900000000           move.l   _dst_cpyflash,d7
0x000000E0  0x068710000000           addi.l   #268435456,d7         ; '....'    <<<<<--translated to 0x10000000
0x000000E6  0x2047                   movea.l  d7,a0
0x000000E8  0x2082                   move.l   d2,(a0)

 

Coldwarrior Version 7.2 build 91218

 

Narcís Nadal

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,105件の閲覧回数
nnadal2
Contributor III

Solved with a cast  (int)

 

;  116:        (*(volatile vuint32 *)(0x44000000+(int)dst_cpyflash)) =  data;
;  117:         
;
0x000000DA  0x2E3900000000           move.l   _dst_cpyflash,d7
0x000000E0  0x207C44000000           movea.l  #1140850688,a0        ; 'D...'    <<- now 0x44000000 is translated correctlly
0x000000E6  0x21827800               move.l   d2,(a0,d7.l)

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,106件の閲覧回数
nnadal2
Contributor III

Solved with a cast  (int)

 

;  116:        (*(volatile vuint32 *)(0x44000000+(int)dst_cpyflash)) =  data;
;  117:         
;
0x000000DA  0x2E3900000000           move.l   _dst_cpyflash,d7
0x000000E0  0x207C44000000           movea.l  #1140850688,a0        ; 'D...'    <<- now 0x44000000 is translated correctlly
0x000000E6  0x21827800               move.l   d2,(a0,d7.l)

0 件の賞賛
返信