Date: Mon, 22 Feb 2010 01:23:41 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204184 - head/sys/ia64/ia64 Message-ID: <201002220123.o1M1NfJQ095142@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Mon Feb 22 01:23:41 2010 New Revision: 204184 URL: http://svn.freebsd.org/changeset/base/204184 Log: Prefer I-units and M-units for nop instructions. This works around McKinley flaws. It also avoids using the F-unit in the kernel for no reason. Modified: head/sys/ia64/ia64/context.S head/sys/ia64/ia64/exception.S head/sys/ia64/ia64/locore.S head/sys/ia64/ia64/support.S head/sys/ia64/ia64/syscall.S Modified: head/sys/ia64/ia64/context.S ============================================================================== --- head/sys/ia64/ia64/context.S Sun Feb 21 23:41:59 2010 (r204183) +++ head/sys/ia64/ia64/context.S Mon Feb 22 01:23:41 2010 (r204184) @@ -286,7 +286,7 @@ ENTRY(swapctx, 2) (p15) br.ret.sptk rp ;; } -{ .mfb +{ .mib mov r32=r33 nop 0 br.sptk restorectx @@ -338,10 +338,10 @@ ENTRY(save_callee_saved, 1) mov r17=b5 ;; } -{ .mfi +{ .mii st8 [r14]=r17,16 // b5 - nop 0 mov r16=ar.lc + nop 0 ;; } { .mmb @@ -363,13 +363,13 @@ ENTRY(restore_callee_saved, 1) add r31=-8,r32 ;; } -{ .mmb +{ .mmi ld8.fill r4=[r31],16 // r4 ld8.fill r5=[r32],16 // r5 nop 0 ;; } -{ .mmb +{ .mmi ld8.fill r6=[r31],16 // r6 ld8.fill r7=[r32],16 // r7 nop 0 Modified: head/sys/ia64/ia64/exception.S ============================================================================== --- head/sys/ia64/ia64/exception.S Sun Feb 21 23:41:59 2010 (r204183) +++ head/sys/ia64/ia64/exception.S Mon Feb 22 01:23:41 2010 (r204184) @@ -89,10 +89,10 @@ xhead: data8 xtrace addl r29=1024*5*8,r0 ;; \ (p15) sub r27=r28,r29 ;; \ } ; \ -{ .mib ; \ +{ .mmi ; \ st8 [r28]=r27 ; \ - mov pr=r25,0x1ffff ; \ - nop 0 ;; \ + nop 0 ; \ + mov pr=r25,0x1ffff ;; \ } #else @@ -148,10 +148,10 @@ ENTRY_NOPROFILE(exception_save, 0) add r31=8,r30 ;; } -{ .mib +{ .mmi mov r22=cr.iip - addl r29=NTLBRT_SAVE,r0 // 22-bit restart token. nop 0 + addl r29=NTLBRT_SAVE,r0 // 22-bit restart token. ;; } @@ -235,7 +235,7 @@ exception_save_restart: nop 0 ;; } -{ .mmb +{ .mmi (p13) mov ar.rnat=r19 mov r18=ar.bsp nop 0 @@ -248,7 +248,7 @@ exception_save_restart: ;; } // r19=ifs, r22=iip -{ .mmb +{ .mmi st8 [r31]=r18,16 // ndirty st8 [r30]=r19,16 // cfm nop 0 @@ -260,7 +260,7 @@ exception_save_restart: add r29=16,r30 ;; } -{ .mmb +{ .mmi st8 [r30]=r17,24 // ifa st8 [r31]=r18,24 // isr nop 0 @@ -407,7 +407,7 @@ exception_save_restart: movl gp=__gp ;; } -{ .mfb +{ .mib srlz.d nop 0 br.sptk b7 @@ -567,7 +567,7 @@ ENTRY_NOPROFILE(exception_restore, 0) cmp.le p14,p15=5,r28 ;; } -{ .mmb +{ .mmi ld8 r25=[r30] // cfm ld8 r19=[r31] // ip nop 0 @@ -606,13 +606,13 @@ exception_restore_restart: dep r31=0,r31,0,13 // 8KB aligned ;; } -{ .mmb +{ .mmi mov ar.k6=r31 mov ar.rnat=r21 nop 0 ;; } -{ .mmb +{ .mmi mov ar.unat=r17 mov cr.iip=r19 nop 0 @@ -656,7 +656,7 @@ END(exception_restore) add out1=16,sp ; \ br.call.sptk rp=_func_ ;; \ } ; \ -{ .mfb ; \ +{ .mib ; \ nop 0 ; \ nop 0 ; \ br.sptk exception_restore ;; \ @@ -1021,10 +1021,10 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400) movl r27=kstack ;; } -{ .mib +{ .mmi mov r28=sp - addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0 nop 0 + addl r27=KSTACK_PAGES*PAGE_SIZE-16,r0 ;; } { .mmi @@ -1287,13 +1287,13 @@ IVT_ENTRY(Break_Instruction, 0x2c00) (p11) srlz.d add out1=16,sp } -{ .mfb +{ .mib nop 0 nop 0 br.call.sptk rp=trap ;; } -{ .mfb +{ .mib nop 0 nop 0 br.sptk exception_restore @@ -1308,19 +1308,19 @@ IVT_ENTRY(External_Interrupt, 0x3000) br.sptk exception_save ;; } -{ .mfb +{ .mmi alloc r15=ar.pfs,0,0,1,0 nop 0 nop 0 ;; } -{ .mfb +{ .mib add out0=16,sp nop 0 br.call.sptk rp=interrupt ;; } -{ .mfb +{ .mib nop 0 nop 0 br.sptk exception_restore Modified: head/sys/ia64/ia64/locore.S ============================================================================== --- head/sys/ia64/ia64/locore.S Sun Feb 21 23:41:59 2010 (r204183) +++ head/sys/ia64/ia64/locore.S Mon Feb 22 01:23:41 2010 (r204184) @@ -98,13 +98,13 @@ ENTRY_NOPROFILE(__start, 1) mov out0=r0 // we are linked at the right address ;; // we just need to process fptrs } -{ .bbb +{ .mib nop 0 nop 0 br.call.sptk.many rp=_reloc ;; } -{ .bbb +{ .mib nop 0 nop 0 br.call.sptk.many rp=ia64_init @@ -112,21 +112,21 @@ ENTRY_NOPROFILE(__start, 1) } // We have the new bspstore in r8 and the new sp in r9. // Switch onto the new stack and call mi_startup(). -{ +{ .mmi mov ar.rsc = 0 ;; mov ar.bspstore = r8 mov sp = r9 ;; } -{ +{ .mmi loadrs ;; mov ar.rsc = 3 nop 0 ;; } -{ +{ .mib nop 0 nop 0 br.call.sptk.many rp=mi_startup @@ -163,7 +163,7 @@ ENTRY(fork_trampoline, 0) ld8 out1=[r16] nop 0 } -{ .mfb +{ .mib add out2=16,sp nop 0 br.call.sptk rp=fork_exit @@ -174,7 +174,7 @@ ENTRY(fork_trampoline, 0) .global enter_userland .type enter_userland, @function enter_userland: -{ .mfb +{ .mib nop 0 nop 0 br.sptk epc_syscall_return @@ -282,7 +282,7 @@ ENTRY_NOPROFILE(os_boot_rendez,0) add sp = r18, r16 ;; } -{ .mfb +{ .mib mov ar.rsc = 3 nop 0 br.call.sptk.few rp = ia64_ap_startup @@ -290,7 +290,7 @@ ENTRY_NOPROFILE(os_boot_rendez,0) } /* NOT REACHED */ 9: -{ .mfb +{ .mib nop 0 nop 0 br.sptk 9b Modified: head/sys/ia64/ia64/support.S ============================================================================== --- head/sys/ia64/ia64/support.S Sun Feb 21 23:41:59 2010 (r204183) +++ head/sys/ia64/ia64/support.S Mon Feb 22 01:23:41 2010 (r204184) @@ -227,14 +227,14 @@ ENTRY(casuword, 3) nop 0 ;; } -{ .mfb +{ .mib st8.rel [r15]=r0 // Clear onfault nop 0 br.ret.sptk rp ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -277,14 +277,14 @@ ENTRY(casuword32, 3) nop 0 ;; } -{ .mfb +{ .mib st8.rel [r15]=r0 // Clear onfault nop 0 br.ret.sptk rp ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -338,7 +338,7 @@ ENTRY(subyte, 2) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -384,7 +384,7 @@ ENTRY(suword16, 2) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -430,7 +430,7 @@ ENTRY(suword32, 2) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -477,7 +477,7 @@ XENTRY(suword) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -531,7 +531,7 @@ ENTRY(fubyte, 1) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -577,7 +577,7 @@ ENTRY(fuword16, 2) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -623,7 +623,7 @@ ENTRY(fuword32, 2) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -670,7 +670,7 @@ XENTRY(fuword) ;; } 1: -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -684,7 +684,7 @@ END(fuword64) */ ENTRY(fuswintr, 1) -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp @@ -693,7 +693,7 @@ ENTRY(fuswintr, 1) END(fuswintr) ENTRY(suswintr, 0) -{ .mfb +{ .mib add ret0=-1,r0 nop 0 br.ret.sptk rp Modified: head/sys/ia64/ia64/syscall.S ============================================================================== --- head/sys/ia64/ia64/syscall.S Sun Feb 21 23:41:59 2010 (r204183) +++ head/sys/ia64/ia64/syscall.S Mon Feb 22 01:23:41 2010 (r204184) @@ -102,13 +102,13 @@ gw_ret: ;; } gw_ret_ia32: -{ .mfb +{ .mmi flushrs nop 0 nop 0 ;; } -{ .mfb +{ .mib nop 0 nop 0 br.ia.sptk b6 @@ -193,7 +193,7 @@ ENTRY_NOPROFILE(epc_sigtramp, 0) mov b7=r16 ;; } -{ .mmb +{ .mmi alloc r14=ar.pfs, 0, 0, 3, 0 mov ar.rsc=15 nop 0 @@ -204,7 +204,7 @@ ENTRY_NOPROFILE(epc_sigtramp, 0) mov out0=r8 mov out1=r9 } -{ .mfb +{ .mib add out2=16,sp nop 0 br.call.sptk rp=b7 @@ -257,7 +257,7 @@ ENTRY_NOPROFILE(epc_syscall, 8) add r31=8,r30 ;; } -{ .mib +{ .mii mov r22=ar.fpsr sub r29=r14,r30 nop 0 @@ -380,7 +380,7 @@ ENTRY_NOPROFILE(epc_syscall, 8) } .global epc_syscall_return epc_syscall_return: -{ .mfb +{ .mib add out0=16,sp nop 0 br.call.sptk rp=do_ast @@ -392,7 +392,7 @@ epc_syscall_return: (p15) br.spnt 1b // restart syscall ;; } -{ .mfb +{ .mmi ld8 r14=[r14] // tf_flags nop 0 nop 0 @@ -422,7 +422,7 @@ epc_syscall_return: add r31=r31,sp ;; } -{ .mmb +{ .mmi ld8 r19=[r15],16 // pr ld8 r20=[r14],16 // pfs (syscall caller) nop 0 @@ -434,7 +434,7 @@ epc_syscall_return: mov pr=r19,0x1fffe ;; } -{ .mmb +{ .mmi ld8 r23=[r15],16 // tp ld8 r24=[r14],16 // rsc nop 0 @@ -488,7 +488,7 @@ epc_syscall_return: dep r30=0,r30,0,13 // 8KB aligned. ;; } -{ .mib +{ .mii mov ar.k6=r30 mov r13=r23 nop 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002220123.o1M1NfJQ095142>