Browse Source

Reducing nop in allignement

Yann Weber 5 years ago
parent
commit
5929efa54b
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      wtfstopw.asm

+ 5
- 4
wtfstopw.asm View File

@@ -289,8 +289,8 @@ proc_print_time:
289 289
 	mov rsi, ts_start.tv_sec
290 290
 %define RSIPTR(x) rsi + x - ts_start.tv_sec
291 291
 
292
-	mov rax, [ts_cur.tv_nsec] ; allign procpt_loopns
293
-	sub rax, [ts_start.tv_nsec] ; allign procpt_loopns
292
+	mov rax, [RSIPTR(ts_cur.tv_nsec)]
293
+	sub rax, [ts_start.tv_nsec] ; allign nano sec loop
294 294
 	jge print_time_us_cont
295 295
 	add rax, 1000000000 ; negativ result
296 296
 	sub qword [RSIPTR(ts_cur.tv_sec)], 1
@@ -331,7 +331,7 @@ proc_print_time:
331 331
 	div rdi
332 332
 	mov bl, dl
333 333
 	or bx, 0x3030
334
-	mov word [RSIPTR(timestr + 4)], bx
334
+	mov word [timestr + 4], bx
335 335
 
336 336
 	xor dl, dl
337 337
 	div rcx
@@ -340,7 +340,7 @@ proc_print_time:
340 340
 	div rdi
341 341
 	mov bl, dl
342 342
 	or bx, 0x3030
343
-	mov word [RSIPTR(timestr + 1)], bx
343
+	mov word [timestr + 1], bx
344 344
 
345 345
 	; using rbx to stores the hours string
346 346
 	xor rbx, rbx
@@ -361,6 +361,7 @@ proc_print_time:
361 361
 	cmovl ax, cx ; rax stores hours digit count (at least 2)
362 362
 	test cl, cl
363 363
 	jz procpt_looph2_end
364
+	align 16
364 365
 	procpt_looph2: ; end rbx left shift before sto
365 366
 		shl rbx, 8
366 367
 		loopne procpt_looph2

Loading…
Cancel
Save