1 TTL C:\pocket\test\asm.cpp
3 AREA |.drectve|, DRECTVE
4 DCB "-defaultlib:coredll.lib "
5 DCB "-defaultlib:corelibc.lib "
7 EXPORT |?do_it@@YAXXZ| ; do_it
9 |$T222| DCD |?do_it@@YAXXZ|
12 |?do_it@@YAXXZ| PROC ; do_it
15 mcr p15, 0, r0, c7, c5, 0 ;/* invalidate i cache & BTB */
17 mrc p15, 0, r0, c2, c0, 0
22 mov r9, r1 ; add r9, r1, #0x100
23 ldr r5, =0xa0000100 ; ldr r5, =0xa0000100
40 ; mcr p15, 0, r0, c7, c10, 4 ;/* drain the write buffer*/
43 ; mrc p15, 0, r0, c2, c0, 0
48 mcr p15, 0, r0, c8, c7, 0x00 ;/* invalidate I+D TLB */
50 mrc p15, 0, r0, c2, c0, 0
54 ; //; they skipped this, unnecessary? seems like we need to do this
55 mcr p15, 0, r0, c7, c5, 0 ;/* invalidate i cache & BTB */
57 ; S bit set, p and d bit set (no 26 bit mode)
58 ; mov r3, #0x120 ; xscale says p needs to be 0 ???
59 ; mcr p15, 0, r3, c1, c0, 0 ;/* disable the MMU */
62 ; mrc p15, 0, r0, c2, c0, 0
67 ; /*; make sure the pipeline is emptied*/
73 ; /* zero PID in Process ID Virtual Address Map register. */
75 mcr p15, 0, r0, c13, c0, 0
79 mrc p15, 0, r0, c2, c0, 0
97 ENDP ; |?do_it@@YAXXZ|, do_it