Author: jmb
Date: Wed Sep 16 09:53:38 2009
New Revision: 9582
URL:
http://source.netsurf-browser.org?rev=9582&view=rev
Log:
Fix AOF build
Modified:
trunk/tools/profile/src/profile.s
Modified: trunk/tools/profile/src/profile.s
URL:
http://source.netsurf-browser.org/trunk/tools/profile/src/profile.s?rev=9...
==============================================================================
--- trunk/tools/profile/src/profile.s (original)
+++ trunk/tools/profile/src/profile.s Wed Sep 16 09:53:38 2009
@@ -12,16 +12,16 @@
EXPORT __cyg_profile_func_enter
EXPORT __cyg_profile_func_exit
- @; Standard C Functions
+ ;@ Standard C Functions
IMPORT atexit
IMPORT exit
IMPORT malloc
IMPORT memset
- @; In profc.c
+ ;@ In profc.c
IMPORT profile_save
- @; Generated by Linker
+ ;@ Generated by Linker
IMPORT |Image$$RO$$Base|
IMPORT |Image$$RO$$Limit|
#else
@@ -36,14 +36,14 @@
.section ".text"
#endif
-@; Function entry handler
-@;
-@; On Entry:
-@; r0 -> function
-@; r1 -> call site
-@;
-@; On Exit:
-@; r0-r3 corrupt
+;@ Function entry handler
+;@
+;@ On Entry:
+;@ r0 -> function
+;@ r1 -> call site
+;@
+;@ On Exit:
+;@ r0-r3 corrupt
#if defined(__aof__)
__cyg_profile_func_enter
@@ -54,35 +54,35 @@
__cyg_profile_func_enter:
#endif
STMFD sp!,{r4-r8,lr}
- MOV r4,r0 @; preserve function pointer
-
- LDR r1,initialised @; initialise, if necessary
+ MOV r4,r0 ;@ preserve function pointer
+
+ LDR r1,initialised ;@ initialise, if necessary
TEQ r1,#0
BLEQ profile_init
- MRC P14,0,a1,C1,C0,0 @; read CCNT
+ MRC P14,0,a1,C1,C0,0 ;@ read CCNT
ADR r5,stack_base
LDMIA r5,{r5-r8}
TEQ r5,r6
#if defined(__aof__)
- BEQ %FT01 @; stack empty
-#else
- BEQ 1f @; stack empty
-#endif
-
- LDR r1,[r6,#-8] @; r1 -> caller's profile blk
-
- @; update caller's exclusive time
+ BEQ %FT01 ;@ stack empty
+#else
+ BEQ 1f ;@ stack empty
+#endif
+
+ LDR r1,[r6,#-8] ;@ r1 -> caller's profile blk
+
+ ;@ update caller's exclusive time
LDR r2,[r1,#exclusive_time]
LDR r3,[r1,#exclusive_time + 4]
- CMP r0,r8 @; wrapped around?
+ CMP r0,r8 ;@ wrapped around?
MOVLO r5,#-1
- SUBLO r5,r5,r8 @; diff = UINT_MAX - last
- ADDLO r5,r5,r0 @; diff += now
- SUBHS r5,r0,r8 @; diff = last - now
+ SUBLO r5,r5,r8 ;@ diff = UINT_MAX - last
+ ADDLO r5,r5,r0 ;@ diff += now
+ SUBHS r5,r0,r8 ;@ diff = last - now
ADDS r2,r2,r5
ADC r3,r3,#0
STR r2,[r1,#exclusive_time]
@@ -98,25 +98,25 @@
CMP r4,r1
CMPGT r2,r4
#if defined(__aof__)
- BLE %FT02 @; address out of bounds
-#else
- BLE 2f @; address out of bounds
-#endif
-
- SUB r4,r4,r1 @; get offset into table
+ BLE %FT02 ;@ address out of bounds
+#else
+ BLE 2f ;@ address out of bounds
+#endif
+
+ SUB r4,r4,r1 ;@ get offset into table
ADD r4,r4,r7
LDR r1,[r4]
- TEQ r1,#0 @; create struct, if necessary
+ TEQ r1,#0 ;@ create struct, if necessary
BLEQ profile_create
- LDR r2,[r1,#fcc] @; increase call count
+ LDR r2,[r1,#fcc] ;@ increase call count
ADD r2,r2,#1
STR r2,[r1,#fcc]
- @; push onto call stack
-
- STR r1,[r6],#4 @; profile block pointer
- STR r0,[r6],#4 @; time called
+ ;@ push onto call stack
+
+ STR r1,[r6],#4 ;@ profile block pointer
+ STR r0,[r6],#4 ;@ time called
STR r6,stackp
#if defined(__aof__)
@@ -128,14 +128,14 @@
LDMFD sp!,{r4-r8,pc}
-@; Function exit handler
-@;
-@; On Entry:
-@; r0 -> function
-@; r1 -> call site
-@;
-@; On Exit:
-@; r0-r3 corrupt
+;@ Function exit handler
+;@
+;@ On Entry:
+;@ r0 -> function
+;@ r1 -> call site
+;@
+;@ On Exit:
+;@ r0-r3 corrupt
#if defined(__aof__)
__cyg_profile_func_exit
@@ -145,7 +145,7 @@
.type __cyg_profile_func_exit, %function
__cyg_profile_func_exit:
#endif
- @; if (!initialised || stack empty) return;
+ ;@ if (!initialised || stack empty) return;
LDR r1,initialised
TEQ r1,#0
LDRNE r1,stack_base
@@ -156,44 +156,44 @@
STMFD sp!,{r4-r8,lr}
MOV r4,r0
- MRC P14,0,a1,C1,C0,0 @; read CCNT
+ MRC P14,0,a1,C1,C0,0 ;@ read CCNT
LDR r5,ro_base
LDR r6,ro_limit
CMP r4,r5
CMPGT r6,r4
#if defined(__aof__)
- BLE %FT01 @; address out of bounds
-#else
- BLE 1f @; address out of bounds
+ BLE %FT01 ;@ address out of bounds
+#else
+ BLE 1f ;@ address out of bounds
#endif
ADR r5,stack_base
LDMIA r5,{r5-r8}
- LDR r1,[r6,#-4]! @; r1 = time function entered
- LDR r2,[r6,#-4]! @; r2 -> profile block
+ LDR r1,[r6,#-4]! ;@ r1 = time function entered
+ LDR r2,[r6,#-4]! ;@ r2 -> profile block
STR r6,stackp
- LDMIB r2,{r3-r6} @; load times
-
- @; update exclusive
- CMP r0,r8 @; wrapped around?
+ LDMIB r2,{r3-r6} ;@ load times
+
+ ;@ update exclusive
+ CMP r0,r8 ;@ wrapped around?
MOVLO r7,#-1
- SUBLO r7,r7,r8 @; diff = UINT_MAX - last
- ADDLO r7,r7,r0 @; diff += now
- SUBHS r7,r0,r8 @; diff = last - now
+ SUBLO r7,r7,r8 ;@ diff = UINT_MAX - last
+ ADDLO r7,r7,r0 ;@ diff += now
+ SUBHS r7,r0,r8 ;@ diff = last - now
ADDS r3,r3,r7
ADC r4,r4,#0
- @; update inclusive
- CMP r0,r1 @; wrapped around?
+ ;@ update inclusive
+ CMP r0,r1 ;@ wrapped around?
MOVLO r7,#-1
- SUBLO r7,r7,r1 @; diff = UINT_MAX - last
- ADDLO r7,r7,r0 @; diff += now
- SUBHS r7,r0,r1 @; diff = last - now
+ SUBLO r7,r7,r1 ;@ diff = UINT_MAX - last
+ ADDLO r7,r7,r0 ;@ diff += now
+ SUBHS r7,r0,r1 ;@ diff = last - now
ADDS r5,r5,r7
ADC r6,r6,#0
- STMIB r2,{r3-r6} @; save back
+ STMIB r2,{r3-r6} ;@ save back
#if defined(__aof__)
01
@@ -201,18 +201,18 @@
1:
#endif
- STR r0,last_called @; update last called and exit
+ STR r0,last_called ;@ update last called and exit
LDMFD sp!,{r4-r8,pc}
-@; Initialise the profiling code
-@; Ensures ProfileMod is loaded and allocates memory for call stack etc.
-@;
-@; On Entry:
-@; -
-@;
-@; On Exit:
-@; r0-r3 corrupt
+;@ Initialise the profiling code
+;@ Ensures ProfileMod is loaded and allocates memory for call stack etc.
+;@
+;@ On Entry:
+;@ -
+;@
+;@ On Exit:
+;@ r0-r3 corrupt
#if defined(__aof__)
profile_init
@@ -231,7 +231,7 @@
BVC 1f
#endif
- @;try to load the module
+ ;@try to load the module
MOV r0,#1
ADR r1,profile_cmd
@@ -244,26 +244,26 @@
#else
1:
#endif
- STR pc,initialised @; mark as initialised
-
- LDR a1,ro_base @; create table
+ STR pc,initialised ;@ mark as initialised
+
+ LDR a1,ro_base ;@ create table
LDR a2,ro_limit
SUB a1,a2,a1
BL malloc
TEQ a1,#0
- MOVEQ a1,#255 @; malloc failed
+ MOVEQ a1,#255 ;@ malloc failed
BEQ exit
STR a1,table_base
LDR a2,ro_limit
- LDR a3,ro_base @; zero-init table
+ LDR a3,ro_base ;@ zero-init table
SUB a3,a2,a3
MOV a2,#0
BL memset
- MOV a1,#4096 @; create call stack
+ MOV a1,#4096 ;@ create call stack
BL malloc
TEQ a1,#0
@@ -273,7 +273,7 @@
STR a1,stack_base
STR a1,stackp
- @; register exit handler
+ ;@ register exit handler
ADR a1,profile_save_shim
BL atexit
@@ -290,11 +290,11 @@
#endif
-@; On Entry:
-@; r4 -> table entry
-@; On Exit:
-@; r1 -> block
-@; table entry filled in
+;@ On Entry:
+;@ r4 -> table entry
+;@ On Exit:
+;@ r1 -> block
+;@ table entry filled in
#if defined(__aof__)
profile_create
@@ -308,7 +308,7 @@
BL malloc
TEQ a1,#0
- MOVEQ a1,#255 @; malloc failed
+ MOVEQ a1,#255 ;@ malloc failed
BEQ exit
MOV r1,#0
@@ -324,13 +324,13 @@
LDMFD sp!,{r0,pc}
-@; Shim for profile_save, filling in arguments as required
-@;
-@; On Entry:
-@; -
-@;
-@; On Exit:
-@; r0-r3 corrupt - exits through profile_save
+;@ Shim for profile_save, filling in arguments as required
+;@
+;@ On Entry:
+;@ -
+;@
+;@ On Exit:
+;@ r0-r3 corrupt - exits through profile_save
#if defined(__aof__)
profile_save_shim
@@ -347,7 +347,7 @@
B profile_save
-@; Data
+;@ Data
#if defined(__aof__)
initialised DCD 0