Browse Source

Optimize __set_clear_in_use_bit__ (merged from pstarter, thanks to Lionel Debroux).

git-svn-id: file:///var/svn/tigccpp/trunk@286 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 18 years ago
parent
commit
c9da3cdcf5
2 changed files with 7 additions and 5 deletions
  1. 6 4
      tigcc/archive/startup/_set_file_in_use_bit.s
  2. 1 1
      tigcc/archive/tigcc.tpr

+ 6 - 4
tigcc/archive/startup/_set_file_in_use_bit.s

@@ -85,12 +85,14 @@ __symbol_search_loop__:
 	moveq #1,%d0
 | If %d3.w is 0, clear the in-use bit.
 	move.l %d5,%a0
+	lea 11(%a0),%a0
 	tst.w %d3
 	jbeq __clear_bit__
 | Otherwise, store the previous value in %d3, set the bit, and quit.
-	move.b (%a0,11),%d3
-	and.w #0x10,%d3
-	or.b #0x10,(%a0,11)
+	moveq #0x10,%d1
+	move.b (%a0),%d3
+	and.w %d1,%d3
+	or.b %d1,(%a0)
 	rts
 __skip_symbol__:
 | Call SymFindNext.
@@ -99,6 +101,6 @@ __skip_symbol__:
 | Go to beginning of loop.
 	jra __symbol_search_loop__
 __clear_bit__:
-	and.b #0xEF,(%a0,11)
+	and.b #0xEF,(%a0)
 __symbol_search_done__:
 	rts

+ 1 - 1
tigcc/archive/tigcc.tpr

@@ -55,7 +55,7 @@ Save Screen=0
 Optimize ROM Calls=0
 
 [File Editing]
-Open File=E:\TI-89\tigcccvs\archive\gray.s
+Open File=E:\TI-89\tigcccvs\archive\startup\_set_file_in_use_bit.s
 
 [Included Files]
 C File 1=qsort.c