Browse Source

tigcclib: optimize (-8 bytes) OSVFreeTimer (Martial).
The Timers example is a testcase for OSVFreeTimer.

git-svn-id: file:///var/svn/tigccpp/trunk@1342 9552661e-59e3-4036-b4f2-dbe53926924f

debrouxl 15 years ago
parent
commit
cb793b5c4d
1 changed files with 7 additions and 4 deletions
  1. 7 4
      tigcc/archive/freetimer.s

+ 7 - 4
tigcc/archive/freetimer.s

@@ -2,21 +2,24 @@
 
 .text
 OSVFreeTimer:
+	moveq.l #2,%d1
+	moveq.l #-1,%d2
+	lea.l 0x600001,%a1
 	subq.w #1,%d0
-	cmpi.w #2,%d0
+	cmp.w %d1,%d0
 	bcc.s .L__timer_ffai
 	muls.w #12,%d0
 	move.l 0x74,%a0
 	cmp.l #132133782,(%a0,-4)
 	bne.s .L__timer_fok
-	move.l #-1,-32(%a0,%d0.w)
+	move.l %d2,-32(%a0,%d0.w)
 	move.l (%a0,-32),%d0
 	and.l (%a0,-20),%d0
 	addq.l #1,%d0
 	bne.s .L__timer_fok
-	bclr.b #2,0x600001
+	bclr.b %d1,(%a1)
 	move.l (%a0,-8),0x74:w
-	bset.b #2,0x600001
+	bset.b %d1,(%a1)
 .L__timer_fok:
 	moveq #1,%d0
 	rts