17117f1b4Smrg 27117f1b4Smrg /* TODO 37117f1b4Smrg * 47117f1b4Smrg * 1) It would be nice if load/store double could be used 57117f1b4Smrg * at least for the matrix parts. I think for the matrices 67117f1b4Smrg * it is safe, but for the vertices it probably is not due to 77117f1b4Smrg * things like glInterleavedArrays etc. 87117f1b4Smrg * 97117f1b4Smrg * UPDATE: Trying this now in sparc_matrix.h -DaveM_990624 107117f1b4Smrg * 117117f1b4Smrg * 2) One extremely slick trick would be if we could enclose 127117f1b4Smrg * groups of xform calls on the same vertices such that 137117f1b4Smrg * we just load the matrix into f16-->f31 before the calls 147117f1b4Smrg * and then we would not have to do them here. This may be 157117f1b4Smrg * tricky and not much of a gain though. 167117f1b4Smrg */ 177117f1b4Smrg 187117f1b4Smrg#include "sparc_matrix.h" 197117f1b4Smrg 204a49301eSmrg#if defined(SVR4) || defined(__SVR4) || defined(__svr4__) || defined(__arch64__) 217117f1b4Smrg /* Solaris requires this for 64-bit. */ 227117f1b4Smrg .register %g2, #scratch 237117f1b4Smrg .register %g3, #scratch 247117f1b4Smrg#endif 257117f1b4Smrg 267117f1b4Smrg .text 277117f1b4Smrg .align 64 287117f1b4Smrg 297117f1b4Smrg__set_v4f_1: 307117f1b4Smrg ld [%o0 + V4F_FLAGS], %g2 317117f1b4Smrg mov 1, %g1 327117f1b4Smrg st %g1, [%o0 + V4F_SIZE] 337117f1b4Smrg or %g2, VEC_SIZE_1, %g2 347117f1b4Smrg retl 357117f1b4Smrg st %g2, [%o0 + V4F_FLAGS] 367117f1b4Smrg__set_v4f_2: 377117f1b4Smrg ld [%o0 + V4F_FLAGS], %g2 387117f1b4Smrg mov 2, %g1 397117f1b4Smrg st %g1, [%o0 + V4F_SIZE] 407117f1b4Smrg or %g2, VEC_SIZE_2, %g2 417117f1b4Smrg retl 427117f1b4Smrg st %g2, [%o0 + V4F_FLAGS] 437117f1b4Smrg__set_v4f_3: 447117f1b4Smrg ld [%o0 + V4F_FLAGS], %g2 457117f1b4Smrg mov 3, %g1 467117f1b4Smrg st %g1, [%o0 + V4F_SIZE] 477117f1b4Smrg or %g2, VEC_SIZE_3, %g2 487117f1b4Smrg retl 497117f1b4Smrg st %g2, [%o0 + V4F_FLAGS] 507117f1b4Smrg__set_v4f_4: 517117f1b4Smrg ld [%o0 + V4F_FLAGS], %g2 527117f1b4Smrg mov 4, %g1 537117f1b4Smrg st %g1, [%o0 + V4F_SIZE] 547117f1b4Smrg or %g2, VEC_SIZE_4, %g2 557117f1b4Smrg retl 567117f1b4Smrg st %g2, [%o0 + V4F_FLAGS] 577117f1b4Smrg 587117f1b4Smrg /* First the raw versions. */ 597117f1b4Smrg 607117f1b4Smrg .globl _mesa_sparc_transform_points1_general 617117f1b4Smrg_mesa_sparc_transform_points1_general: 627117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 637117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 647117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 657117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 667117f1b4Smrg 677117f1b4Smrg LDMATRIX_0_1_2_3_12_13_14_15(%o1) 687117f1b4Smrg 697117f1b4Smrg cmp %g3, 1 707117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 717117f1b4Smrg bl 3f 727117f1b4Smrg clr %o1 737117f1b4Smrg 747117f1b4Smrg be 2f 757117f1b4Smrg andn %g3, 1, %o2 767117f1b4Smrg 777117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 787117f1b4Smrg add %g1, %o5, %g1 ! IEU0 797117f1b4Smrg ld [%g1 + 0x00], %f8 ! LSU Group 807117f1b4Smrg add %o1, 2, %o1 ! IEU0 817117f1b4Smrg add %g1, %o5, %g1 ! IEU1 827117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 1-cycle stall on %f0 837117f1b4Smrg fmuls %f0, M1, %f2 ! FGM Group 847117f1b4Smrg fmuls %f0, M2, %f3 ! FGM Group 857117f1b4Smrg fmuls %f0, M3, %f4 ! FGM Group 867117f1b4Smrg fmuls %f8, M0, %f9 ! FGM Group f1 available 877117f1b4Smrg fadds %f1, M12, %f1 ! FGA 887117f1b4Smrg st %f1, [%g2 + 0x00] ! LSU 897117f1b4Smrg fmuls %f8, M1, %f10 ! FGM Group f2 available 907117f1b4Smrg fadds %f2, M13, %f2 ! FGA 917117f1b4Smrg st %f2, [%g2 + 0x04] ! LSU 927117f1b4Smrg fmuls %f8, M2, %f11 ! FGM Group f3 available 937117f1b4Smrg fadds %f3, M14, %f3 ! FGA 947117f1b4Smrg st %f3, [%g2 + 0x08] ! LSU 957117f1b4Smrg fmuls %f8, M3, %f12 ! FGM Group f4 available 967117f1b4Smrg fadds %f4, M15, %f4 ! FGA 977117f1b4Smrg st %f4, [%g2 + 0x0c] ! LSU 987117f1b4Smrg fadds %f9, M12, %f9 ! FGA Group f9 available 997117f1b4Smrg st %f9, [%g2 + 0x10] ! LSU 1007117f1b4Smrg fadds %f10, M13, %f10 ! FGA Group f10 available 1017117f1b4Smrg st %f10, [%g2 + 0x14] ! LSU 1027117f1b4Smrg fadds %f11, M14, %f11 ! FGA Group f11 available 1037117f1b4Smrg st %f11, [%g2 + 0x18] ! LSU 1047117f1b4Smrg fadds %f12, M15, %f12 ! FGA Group f12 available 1057117f1b4Smrg st %f12, [%g2 + 0x1c] ! LSU 1067117f1b4Smrg cmp %o1, %o2 ! IEU1 1077117f1b4Smrg bne 1b ! CTI 1087117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 1097117f1b4Smrg 1107117f1b4Smrg cmp %o1, %g3 1117117f1b4Smrg be 3f 1127117f1b4Smrg nop 1137117f1b4Smrg 1147117f1b4Smrg2: ld [%g1 + 0x00], %f0 ! LSU Group 1157117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 1-cycle stall on %f0 1167117f1b4Smrg fmuls %f0, M1, %f2 ! FGM Group 1177117f1b4Smrg fmuls %f0, M2, %f3 ! FGM Group 1187117f1b4Smrg fmuls %f0, M3, %f4 ! FGM Group 1197117f1b4Smrg fadds %f1, M12, %f1 ! FGA Group 1207117f1b4Smrg st %f1, [%g2 + 0x00] ! LSU 1217117f1b4Smrg fadds %f2, M13, %f2 ! FGA Group 1227117f1b4Smrg st %f2, [%g2 + 0x04] ! LSU 1237117f1b4Smrg fadds %f3, M14, %f3 ! FGA Group 1247117f1b4Smrg st %f3, [%g2 + 0x08] ! LSU 1257117f1b4Smrg fadds %f4, M15, %f4 ! FGA Group 1267117f1b4Smrg st %f4, [%g2 + 0x0c] ! LSU 1277117f1b4Smrg 1287117f1b4Smrg3: 1297117f1b4Smrg ba __set_v4f_4 1307117f1b4Smrg nop 1317117f1b4Smrg 1327117f1b4Smrg .globl _mesa_sparc_transform_points1_identity 1337117f1b4Smrg_mesa_sparc_transform_points1_identity: 1347117f1b4Smrg cmp %o0, %o2 1357117f1b4Smrg be 4f 1367117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 1377117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 1387117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 1397117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 1407117f1b4Smrg 1417117f1b4Smrg cmp %g3, 1 1427117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 1437117f1b4Smrg bl 3f 1447117f1b4Smrg clr %o1 1457117f1b4Smrg 1467117f1b4Smrg be 2f 1477117f1b4Smrg andn %g3, 1, %o2 1487117f1b4Smrg 1497117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 1507117f1b4Smrg add %g1, %o5, %g1 ! IEU0 1517117f1b4Smrg ld [%g1 + 0x00], %f1 ! LSU Group 1527117f1b4Smrg add %o1, 2, %o1 ! IEU0 1537117f1b4Smrg add %g1, %o5, %g1 ! IEU1 1547117f1b4Smrg st %f0, [%g2 + 0x00] ! LSU Group 1557117f1b4Smrg cmp %o1, %o2 ! IEU1 1567117f1b4Smrg st %f1, [%g2 + 0x10] ! LSU Group 1577117f1b4Smrg bne 1b ! CTI 1587117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 1597117f1b4Smrg 1607117f1b4Smrg cmp %o1, %g3 1617117f1b4Smrg be 3f 1627117f1b4Smrg nop 1637117f1b4Smrg 1647117f1b4Smrg2: ld [%g1 + 0x00], %f0 1657117f1b4Smrg addx %g0, %g0, %g0 1667117f1b4Smrg st %f0, [%g2 + 0x00] 1677117f1b4Smrg 1687117f1b4Smrg3: 1697117f1b4Smrg ba __set_v4f_1 1707117f1b4Smrg nop 1717117f1b4Smrg 1727117f1b4Smrg4: retl 1737117f1b4Smrg nop 1747117f1b4Smrg 1757117f1b4Smrg .globl _mesa_sparc_transform_points1_2d 1767117f1b4Smrg_mesa_sparc_transform_points1_2d: 1777117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 1787117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 1797117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 1807117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 1817117f1b4Smrg 1827117f1b4Smrg LDMATRIX_0_1_12_13(%o1) 1837117f1b4Smrg 1847117f1b4Smrg cmp %g3, 1 1857117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 1867117f1b4Smrg bl 3f 1877117f1b4Smrg clr %o1 1887117f1b4Smrg 1897117f1b4Smrg be 2f 1907117f1b4Smrg andn %g3, 1, %o2 1917117f1b4Smrg 1927117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 1937117f1b4Smrg add %g1, %o5, %g1 ! IEU0 1947117f1b4Smrg ld [%g1 + 0x00], %f8 ! LSU Group 1957117f1b4Smrg add %o1, 2, %o1 ! IEU0 1967117f1b4Smrg add %g1, %o5, %g1 ! IEU1 1977117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 1987117f1b4Smrg fmuls %f0, M1, %f2 ! FGM Group 1997117f1b4Smrg fmuls %f8, M0, %f9 ! FGM Group 2007117f1b4Smrg fmuls %f8, M1, %f10 ! FGM Group 2017117f1b4Smrg fadds %f1, M12, %f3 ! FGA Group f1 available 2027117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 2037117f1b4Smrg fadds %f2, M13, %f4 ! FGA Group f2 available 2047117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 2057117f1b4Smrg fadds %f9, M12, %f11 ! FGA Group f9 available 2067117f1b4Smrg st %f11, [%g2 + 0x10] ! LSU 2077117f1b4Smrg fadds %f10, M13, %f12 ! FGA Group f10 available 2087117f1b4Smrg st %f12, [%g2 + 0x14] ! LSU 2097117f1b4Smrg cmp %o1, %o2 ! IEU1 2107117f1b4Smrg bne 1b ! CTI 2117117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 2127117f1b4Smrg 2137117f1b4Smrg cmp %o1, %g3 2147117f1b4Smrg be 3f 2157117f1b4Smrg nop 2167117f1b4Smrg 2177117f1b4Smrg2: ld [%g1 + 0x00], %f0 2187117f1b4Smrg fmuls %f0, M0, %f1 2197117f1b4Smrg fmuls %f0, M1, %f2 2207117f1b4Smrg fadds %f1, M12, %f3 2217117f1b4Smrg st %f3, [%g2 + 0x00] 2227117f1b4Smrg fadds %f2, M13, %f4 2237117f1b4Smrg st %f4, [%g2 + 0x04] 2247117f1b4Smrg 2257117f1b4Smrg3: 2267117f1b4Smrg ba __set_v4f_2 2277117f1b4Smrg nop 2287117f1b4Smrg 2297117f1b4Smrg .globl _mesa_sparc_transform_points1_2d_no_rot 2307117f1b4Smrg_mesa_sparc_transform_points1_2d_no_rot: 2317117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 2327117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 2337117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 2347117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 2357117f1b4Smrg 2367117f1b4Smrg LDMATRIX_0_12_13(%o1) 2377117f1b4Smrg 2387117f1b4Smrg cmp %g3, 1 2397117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 2407117f1b4Smrg bl 3f 2417117f1b4Smrg clr %o1 2427117f1b4Smrg 2437117f1b4Smrg be 2f 2447117f1b4Smrg andn %g3, 1, %o2 2457117f1b4Smrg 2467117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 2477117f1b4Smrg add %g1, %o5, %g1 ! IEU0 2487117f1b4Smrg ld [%g1 + 0x00], %f4 ! LSU Group 2497117f1b4Smrg add %o1, 2, %o1 ! IEU0 2507117f1b4Smrg add %g1, %o5, %g1 ! IEU1 2517117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 2527117f1b4Smrg fmuls %f4, M0, %f5 ! FGM Group 2537117f1b4Smrg fadds %f1, M12, %f3 ! FGA Group, 2 cycle stall, f1 available 2547117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 2557117f1b4Smrg st M13, [%g2 + 0x04] ! LSU Group, f5 available 2567117f1b4Smrg fadds %f5, M12, %f6 ! FGA 2577117f1b4Smrg st %f6, [%g2 + 0x10] ! LSU Group 2587117f1b4Smrg st M13, [%g2 + 0x14] ! LSU Group 2597117f1b4Smrg cmp %o1, %o2 ! IEU1 2607117f1b4Smrg bne 1b ! CTI 2617117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 2627117f1b4Smrg 2637117f1b4Smrg cmp %o1, %g3 2647117f1b4Smrg be 3f 2657117f1b4Smrg nop 2667117f1b4Smrg 2677117f1b4Smrg2: ld [%g1 + 0x00], %f0 2687117f1b4Smrg fmuls %f0, M0, %f1 2697117f1b4Smrg fadds %f1, M12, %f3 2707117f1b4Smrg st %f3, [%g2 + 0x00] 2717117f1b4Smrg st M13, [%g2 + 0x04] 2727117f1b4Smrg 2737117f1b4Smrg3: 2747117f1b4Smrg ba __set_v4f_2 2757117f1b4Smrg nop 2767117f1b4Smrg 2777117f1b4Smrg .globl _mesa_sparc_transform_points1_3d 2787117f1b4Smrg_mesa_sparc_transform_points1_3d: 2797117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 2807117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 2817117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 2827117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 2837117f1b4Smrg 2847117f1b4Smrg LDMATRIX_0_1_2_12_13_14(%o1) 2857117f1b4Smrg 2867117f1b4Smrg cmp %g3, 1 2877117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 2887117f1b4Smrg bl 3f 2897117f1b4Smrg clr %o1 2907117f1b4Smrg 2917117f1b4Smrg be 2f 2927117f1b4Smrg andn %g3, 1, %o2 2937117f1b4Smrg 2947117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 2957117f1b4Smrg add %g1, %o5, %g1 ! IEU0 2967117f1b4Smrg ld [%g1 + 0x00], %f4 ! LSU Group 2977117f1b4Smrg add %o1, 2, %o1 ! IEU0 2987117f1b4Smrg add %g1, %o5, %g1 ! IEU1 2997117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 3007117f1b4Smrg fmuls %f0, M1, %f2 ! FGM Group 3017117f1b4Smrg fmuls %f0, M2, %f3 ! FGM Group 3027117f1b4Smrg fmuls %f4, M0, %f5 ! FGM Group 3037117f1b4Smrg fadds %f1, M12, %f1 ! FGA Group, f1 available 3047117f1b4Smrg st %f1, [%g2 + 0x00] ! LSU 3057117f1b4Smrg fmuls %f4, M1, %f6 ! FGM 3067117f1b4Smrg fadds %f2, M13, %f2 ! FGA Group, f2 available 3077117f1b4Smrg st %f2, [%g2 + 0x04] ! LSU 3087117f1b4Smrg fmuls %f4, M2, %f7 ! FGM 3097117f1b4Smrg fadds %f3, M14, %f3 ! FGA Group, f3 available 3107117f1b4Smrg st %f3, [%g2 + 0x08] ! LSU 3117117f1b4Smrg fadds %f5, M12, %f5 ! FGA Group, f5 available 3127117f1b4Smrg st %f5, [%g2 + 0x10] ! LSU 3137117f1b4Smrg fadds %f6, M13, %f6 ! FGA Group, f6 available 3147117f1b4Smrg st %f6, [%g2 + 0x14] ! LSU 3157117f1b4Smrg fadds %f7, M14, %f7 ! FGA Group, f7 available 3167117f1b4Smrg st %f7, [%g2 + 0x18] ! LSU 3177117f1b4Smrg cmp %o1, %o2 ! IEU1 3187117f1b4Smrg bne 1b ! CTI 3197117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 3207117f1b4Smrg 3217117f1b4Smrg cmp %o1, %g3 3227117f1b4Smrg be 3f 3237117f1b4Smrg nop 3247117f1b4Smrg 3257117f1b4Smrg2: ld [%g1 + 0x00], %f0 3267117f1b4Smrg fmuls %f0, M0, %f1 3277117f1b4Smrg fmuls %f0, M1, %f2 3287117f1b4Smrg fmuls %f0, M2, %f3 3297117f1b4Smrg fadds %f1, M12, %f1 3307117f1b4Smrg st %f1, [%g2 + 0x00] 3317117f1b4Smrg fadds %f2, M13, %f2 3327117f1b4Smrg st %f2, [%g2 + 0x04] 3337117f1b4Smrg fadds %f3, M14, %f3 3347117f1b4Smrg st %f3, [%g2 + 0x08] 3357117f1b4Smrg 3367117f1b4Smrg3: 3377117f1b4Smrg ba __set_v4f_3 3387117f1b4Smrg nop 3397117f1b4Smrg 3407117f1b4Smrg .globl _mesa_sparc_transform_points1_3d_no_rot 3417117f1b4Smrg_mesa_sparc_transform_points1_3d_no_rot: 3427117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 3437117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 3447117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 3457117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 3467117f1b4Smrg 3477117f1b4Smrg LDMATRIX_0_12_13_14(%o1) 3487117f1b4Smrg 3497117f1b4Smrg cmp %g3, 1 3507117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 3517117f1b4Smrg bl 3f 3527117f1b4Smrg clr %o1 3537117f1b4Smrg 3547117f1b4Smrg be 2f 3557117f1b4Smrg andn %g3, 1, %o2 3567117f1b4Smrg 3577117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 3587117f1b4Smrg add %g1, %o5, %g1 ! IEU0 3597117f1b4Smrg ld [%g1 + 0x00], %f2 ! LSU Group 3607117f1b4Smrg add %o1, 2, %o1 ! IEU0 3617117f1b4Smrg add %g1, %o5, %g1 ! IEU1 3627117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 3637117f1b4Smrg fmuls %f2, M0, %f3 ! FGM Group 3647117f1b4Smrg fadds %f1, M12, %f1 ! FGA Group, 2 cycle stall, f1 available 3657117f1b4Smrg st %f1, [%g2 + 0x00] ! LSU 3667117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group, f3 available 3677117f1b4Smrg st M13, [%g2 + 0x04] ! LSU 3687117f1b4Smrg st M14, [%g2 + 0x08] ! LSU Group 3697117f1b4Smrg st %f3, [%g2 + 0x10] ! LSU Group 3707117f1b4Smrg st M13, [%g2 + 0x14] ! LSU Group 3717117f1b4Smrg st M14, [%g2 + 0x18] ! LSU Group 3727117f1b4Smrg cmp %o1, %o2 ! IEU1 3737117f1b4Smrg bne 1b ! CTI 3747117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 3757117f1b4Smrg 3767117f1b4Smrg cmp %o1, %g3 3777117f1b4Smrg be 3f 3787117f1b4Smrg nop 3797117f1b4Smrg 3807117f1b4Smrg2: ld [%g1 + 0x00], %f0 3817117f1b4Smrg fmuls %f0, M0, %f1 3827117f1b4Smrg fadds %f1, M12, %f1 3837117f1b4Smrg st %f1, [%g2 + 0x00] 3847117f1b4Smrg st M13, [%g2 + 0x04] 3857117f1b4Smrg st M14, [%g2 + 0x08] 3867117f1b4Smrg 3877117f1b4Smrg3: 3887117f1b4Smrg ba __set_v4f_3 3897117f1b4Smrg nop 3907117f1b4Smrg 3917117f1b4Smrg .globl _mesa_sparc_transform_points1_perspective 3927117f1b4Smrg_mesa_sparc_transform_points1_perspective: 3937117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 3947117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 3957117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 3967117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 3977117f1b4Smrg 3987117f1b4Smrg LDMATRIX_0_14(%o1) 3997117f1b4Smrg 4007117f1b4Smrg cmp %g3, 1 4017117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 4027117f1b4Smrg bl 3f 4037117f1b4Smrg clr %o1 4047117f1b4Smrg 4057117f1b4Smrg be 2f 4067117f1b4Smrg andn %g3, 1, %o2 4077117f1b4Smrg 4087117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 4097117f1b4Smrg add %g1, %o5, %g1 ! IEU0 4107117f1b4Smrg ld [%g1 + 0x00], %f2 ! LSU Group 4117117f1b4Smrg add %o1, 2, %o1 ! IEU0 4127117f1b4Smrg add %g1, %o5, %g1 ! IEU1 4137117f1b4Smrg fmuls %f0, M0, %f1 ! FGM Group 4147117f1b4Smrg st %f1, [%g2 + 0x00] ! LSU 4157117f1b4Smrg fmuls %f2, M0, %f3 ! FGM Group 4167117f1b4Smrg st %g0, [%g2 + 0x04] ! LSU 4177117f1b4Smrg st M14, [%g2 + 0x08] ! LSU Group 4187117f1b4Smrg st %g0, [%g2 + 0x0c] ! LSU Group 4197117f1b4Smrg st %f3, [%g2 + 0x10] ! LSU Group 4207117f1b4Smrg st %g0, [%g2 + 0x14] ! LSU Group 4217117f1b4Smrg st M14, [%g2 + 0x18] ! LSU Group 4227117f1b4Smrg st %g0, [%g2 + 0x1c] ! LSU Group 4237117f1b4Smrg cmp %o1, %o2 ! IEU1 4247117f1b4Smrg bne 1b ! CTI 4257117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 4267117f1b4Smrg 4277117f1b4Smrg cmp %o1, %g3 4287117f1b4Smrg be 3f 4297117f1b4Smrg nop 4307117f1b4Smrg 4317117f1b4Smrg2: ld [%g1 + 0x00], %f0 4327117f1b4Smrg fmuls %f0, M0, %f1 4337117f1b4Smrg st %f1, [%g2 + 0x00] 4347117f1b4Smrg st %g0, [%g2 + 0x04] 4357117f1b4Smrg st M14, [%g2 + 0x08] 4367117f1b4Smrg st %g0, [%g2 + 0x0c] 4377117f1b4Smrg 4387117f1b4Smrg3: 4397117f1b4Smrg ba __set_v4f_4 4407117f1b4Smrg nop 4417117f1b4Smrg 4427117f1b4Smrg .globl _mesa_sparc_transform_points2_general 4437117f1b4Smrg_mesa_sparc_transform_points2_general: 4447117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 4457117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 4467117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 4477117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 4487117f1b4Smrg 4497117f1b4Smrg LDMATRIX_0_1_2_3_4_5_6_7_12_13_14_15(%o1) 4507117f1b4Smrg 4517117f1b4Smrg cmp %g3, 0 4527117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 4537117f1b4Smrg be 2f 4547117f1b4Smrg clr %o1 4557117f1b4Smrg 4567117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 4577117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 4587117f1b4Smrg add %o1, 1, %o1 ! IEU0 4597117f1b4Smrg add %g1, %o5, %g1 ! IEU1 4607117f1b4Smrg fmuls %f0, M0, %f2 ! FGM Group 4617117f1b4Smrg fmuls %f0, M1, %f3 ! FGM Group 4627117f1b4Smrg fmuls %f0, M2, %f4 ! FGM Group 4637117f1b4Smrg fmuls %f0, M3, %f5 ! FGM Group 4647117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group f2 available 4657117f1b4Smrg fmuls %f1, M4, %f6 ! FGM 4667117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 4677117f1b4Smrg fmuls %f1, M5, %f7 ! FGM 4687117f1b4Smrg fadds %f4, M14, %f4 ! FGA Group f4 available 4697117f1b4Smrg fmuls %f1, M6, %f8 ! FGM 4707117f1b4Smrg fadds %f5, M15, %f5 ! FGA Group f5 available 4717117f1b4Smrg fmuls %f1, M7, %f9 ! FGM 4727117f1b4Smrg fadds %f2, %f6, %f2 ! FGA Group f6 available 4737117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 4747117f1b4Smrg fadds %f3, %f7, %f3 ! FGA Group f7 available 4757117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 4767117f1b4Smrg fadds %f4, %f8, %f4 ! FGA Group f8 available 4777117f1b4Smrg st %f4, [%g2 + 0x08] ! LSU 4787117f1b4Smrg fadds %f5, %f9, %f5 ! FGA Group f9 available 4797117f1b4Smrg st %f5, [%g2 + 0x0c] ! LSU 4807117f1b4Smrg cmp %o1, %g3 ! IEU1 4817117f1b4Smrg bne 1b ! CTI 4827117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 4837117f1b4Smrg2: 4847117f1b4Smrg ba __set_v4f_4 4857117f1b4Smrg nop 4867117f1b4Smrg 4877117f1b4Smrg .globl _mesa_sparc_transform_points2_identity 4887117f1b4Smrg_mesa_sparc_transform_points2_identity: 4897117f1b4Smrg cmp %o2, %o0 4907117f1b4Smrg be 3f 4917117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 4927117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 4937117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 4947117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 4957117f1b4Smrg 4967117f1b4Smrg cmp %g3, 0 4977117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 4987117f1b4Smrg be 2f 4997117f1b4Smrg clr %o1 5007117f1b4Smrg 5017117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 5027117f1b4Smrg add %o1, 1, %o1 ! IEU0 5037117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 5047117f1b4Smrg add %g1, %o5, %g1 ! IEU0 5057117f1b4Smrg cmp %o1, %g3 ! IEU1 5067117f1b4Smrg st %f0, [%g2 + 0x00] ! LSU Group 5077117f1b4Smrg st %f1, [%g2 + 0x04] ! LSU Group 5087117f1b4Smrg bne 1b ! CTI 5097117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 5107117f1b4Smrg2: 5117117f1b4Smrg ba __set_v4f_2 5127117f1b4Smrg nop 5137117f1b4Smrg 5147117f1b4Smrg3: retl 5157117f1b4Smrg nop 5167117f1b4Smrg 5177117f1b4Smrg .globl _mesa_sparc_transform_points2_2d 5187117f1b4Smrg_mesa_sparc_transform_points2_2d: 5197117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 5207117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 5217117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 5227117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 5237117f1b4Smrg 5247117f1b4Smrg LDMATRIX_0_1_4_5_12_13(%o1) 5257117f1b4Smrg 5267117f1b4Smrg cmp %g3, 1 5277117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 5287117f1b4Smrg bl 3f 5297117f1b4Smrg clr %o1 5307117f1b4Smrg 5317117f1b4Smrg be 2f 5327117f1b4Smrg andn %g3, 1, %o2 5337117f1b4Smrg 5347117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 5357117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 5367117f1b4Smrg add %o1, 2, %o1 ! IEU0 5377117f1b4Smrg add %g1, %o5, %g1 ! IEU1 5387117f1b4Smrg fmuls %f0, M0, %f2 ! FGM 5397117f1b4Smrg ld [%g1 + 0x00], %f8 ! LSU Group 5407117f1b4Smrg fmuls %f0, M1, %f3 ! FGM 5417117f1b4Smrg ld [%g1 + 0x04], %f9 ! LSU Group 5427117f1b4Smrg fmuls %f1, M4, %f6 ! FGM 5437117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group 5447117f1b4Smrg add %g1, %o5, %g1 ! IEU0 5457117f1b4Smrg fmuls %f8, M0, %f10 ! FGM Group f2 available 5467117f1b4Smrg fadds %f2, M12, %f2 ! FGA 5477117f1b4Smrg fmuls %f8, M1, %f11 ! FGM Group f3 available 5487117f1b4Smrg fadds %f3, M13, %f3 ! FGA 5497117f1b4Smrg fmuls %f9, M4, %f12 ! FGM Group 5507117f1b4Smrg fmuls %f9, M5, %f13 ! FGM Group 5517117f1b4Smrg fadds %f10, M12, %f10 ! FGA Group f2, f10 available 5527117f1b4Smrg fadds %f2, %f6, %f2 ! FGA Group f3, f11 available 5537117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 5547117f1b4Smrg fadds %f11, M13, %f11 ! FGA Group f12 available 5557117f1b4Smrg fadds %f3, %f7, %f3 ! FGA Group f13 available 5567117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 5577117f1b4Smrg fadds %f10, %f12, %f10 ! FGA Group f10 available 5587117f1b4Smrg st %f10, [%g2 + 0x10] ! LSU 5597117f1b4Smrg fadds %f11, %f13, %f11 ! FGA Group f11 available 5607117f1b4Smrg st %f11, [%g2 + 0x14] ! LSU 5617117f1b4Smrg cmp %o1, %o2 ! IEU1 5627117f1b4Smrg bne 1b ! CTI 5637117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 5647117f1b4Smrg 5657117f1b4Smrg cmp %o1, %g3 5667117f1b4Smrg be 3f 5677117f1b4Smrg nop 5687117f1b4Smrg 5697117f1b4Smrg2: ld [%g1 + 0x00], %f0 ! LSU Group 5707117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 5717117f1b4Smrg fmuls %f0, M0, %f2 ! FGM Group 5727117f1b4Smrg fmuls %f0, M1, %f3 ! FGM Group 5737117f1b4Smrg fmuls %f1, M4, %f6 ! FGM Group 5747117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group 5757117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group f2 available 5767117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 5777117f1b4Smrg fadds %f2, %f6, %f2 ! FGA Group 2 cycle stall, f2 available 5787117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 5797117f1b4Smrg fadds %f3, %f7, %f3 ! FGA Group f3 available 5807117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 5817117f1b4Smrg 5827117f1b4Smrg3: 5837117f1b4Smrg ba __set_v4f_2 5847117f1b4Smrg nop 5857117f1b4Smrg 5867117f1b4Smrg .globl _mesa_sparc_transform_points2_2d_no_rot 5877117f1b4Smrg_mesa_sparc_transform_points2_2d_no_rot: 5887117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 5897117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 5907117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 5917117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 5927117f1b4Smrg 5937117f1b4Smrg LDMATRIX_0_5_12_13(%o1) 5947117f1b4Smrg 5957117f1b4Smrg cmp %g3, 1 5967117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 5977117f1b4Smrg bl 3f 5987117f1b4Smrg clr %o1 5997117f1b4Smrg 6007117f1b4Smrg be 2f 6017117f1b4Smrg andn %g3, 1, %o2 6027117f1b4Smrg 6037117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 6047117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 6057117f1b4Smrg add %o1, 2, %o1 ! IEU0 6067117f1b4Smrg add %g1, %o5, %g1 ! IEU1 6077117f1b4Smrg ld [%g1 + 0x00], %f4 ! LSU Group 6087117f1b4Smrg fmuls %f0, M0, %f2 ! FGM 6097117f1b4Smrg ld [%g1 + 0x04], %f5 ! LSU Group 6107117f1b4Smrg fmuls %f1, M5, %f3 ! FGM 6117117f1b4Smrg fmuls %f4, M0, %f6 ! FGM Group 6127117f1b4Smrg add %g1, %o5, %g1 ! IEU0 6137117f1b4Smrg fmuls %f5, M5, %f7 ! FGM Group 6147117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group f2 available 6157117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 6167117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 6177117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 6187117f1b4Smrg fadds %f6, M12, %f6 ! FGA Group f6 available 6197117f1b4Smrg st %f6, [%g2 + 0x10] ! LSU 6207117f1b4Smrg fadds %f7, M13, %f7 ! FGA Group f7 available 6217117f1b4Smrg st %f7, [%g2 + 0x14] ! LSU 6227117f1b4Smrg cmp %o1, %o2 ! IEU1 6237117f1b4Smrg bne 1b ! CTI 6247117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 6257117f1b4Smrg 6267117f1b4Smrg cmp %o1, %g3 6277117f1b4Smrg be 3f 6287117f1b4Smrg nop 6297117f1b4Smrg 6307117f1b4Smrg2: ld [%g1 + 0x00], %f0 ! LSU Group 6317117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 6327117f1b4Smrg fmuls %f0, M0, %f2 ! FGM Group 6337117f1b4Smrg fmuls %f1, M5, %f3 ! FGM Group 6347117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group, 2 cycle stall, f2 available 6357117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 6367117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 6377117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 6387117f1b4Smrg 6397117f1b4Smrg3: 6407117f1b4Smrg ba __set_v4f_2 6417117f1b4Smrg nop 6427117f1b4Smrg 6437117f1b4Smrg /* orig: 12 cycles */ 6447117f1b4Smrg .globl _mesa_sparc_transform_points2_3d 6457117f1b4Smrg_mesa_sparc_transform_points2_3d: 6467117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 6477117f1b4Smrg ld [%o2 + V4F_START], %g1 6487117f1b4Smrg ld [%o0 + V4F_START], %g2 6497117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 6507117f1b4Smrg 6517117f1b4Smrg LDMATRIX_0_1_2_3_4_5_6_12_13_14(%o1) 6527117f1b4Smrg 6537117f1b4Smrg cmp %g3, 1 6547117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 6557117f1b4Smrg bl 3f 6567117f1b4Smrg clr %o1 6577117f1b4Smrg 6587117f1b4Smrg be 2f 6597117f1b4Smrg andn %g3, 1, %o2 6607117f1b4Smrg 6617117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 6627117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 6637117f1b4Smrg add %o1, 2, %o1 ! IEU0 6647117f1b4Smrg add %g1, %o5, %g1 ! IEU1 6657117f1b4Smrg ld [%g1 + 0x00], %f9 ! LSU Group 6667117f1b4Smrg fmuls %f0, M0, %f2 ! FGM 6677117f1b4Smrg ld [%g1 + 0x04], %f10 ! LSU Group 6687117f1b4Smrg fmuls %f0, M1, %f3 ! FGM 6697117f1b4Smrg fmuls %f0, M2, %f4 ! FGM Group 6707117f1b4Smrg add %g1, %o5, %g1 ! IEU0 6717117f1b4Smrg fmuls %f1, M4, %f6 ! FGM Group 6727117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group f2 available 6737117f1b4Smrg fadds %f2, M12, %f2 ! FGA 6747117f1b4Smrg fmuls %f1, M6, %f8 ! FGM Group f3 available 6757117f1b4Smrg fadds %f3, M13, %f3 ! FGA 6767117f1b4Smrg fmuls %f9, M0, %f11 ! FGM Group f4 available 6777117f1b4Smrg fadds %f4, M14, %f4 ! FGA 6787117f1b4Smrg fmuls %f9, M1, %f12 ! FGM Group f6 available 6797117f1b4Smrg fmuls %f9, M2, %f13 ! FGM Group f2, f7 available 6807117f1b4Smrg fadds %f2, %f6, %f2 ! FGA 6817117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 6827117f1b4Smrg fmuls %f10, M4, %f14 ! FGM Group f3, f8 available 6837117f1b4Smrg fadds %f3, %f7, %f3 ! FGA 6847117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 6857117f1b4Smrg fmuls %f10, M5, %f15 ! FGM Group f4, f11 available 6867117f1b4Smrg fadds %f11, M12, %f11 ! FGA 6877117f1b4Smrg fmuls %f10, M6, %f0 ! FGM Group f12 available 6887117f1b4Smrg fadds %f12, M13, %f12 ! FGA 6897117f1b4Smrg fadds %f13, M14, %f13 ! FGA Group f13 available 6907117f1b4Smrg fadds %f4, %f8, %f4 ! FGA Group f14 available 6917117f1b4Smrg st %f4, [%g2 + 0x08] ! LSU 6927117f1b4Smrg fadds %f11, %f14, %f11 ! FGA Group f15, f11 available 6937117f1b4Smrg st %f11, [%g2 + 0x10] ! LSU 6947117f1b4Smrg fadds %f12, %f15, %f12 ! FGA Group f0, f12 available 6957117f1b4Smrg st %f12, [%g2 + 0x14] ! LSU 6967117f1b4Smrg fadds %f13, %f0, %f13 ! FGA Group f13 available 6977117f1b4Smrg st %f13, [%g2 + 0x18] ! LSU 6987117f1b4Smrg 6997117f1b4Smrg cmp %o1, %o2 ! IEU1 7007117f1b4Smrg bne 1b ! CTI 7017117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 7027117f1b4Smrg 7037117f1b4Smrg cmp %o1, %g3 7047117f1b4Smrg be 3f 7057117f1b4Smrg nop 7067117f1b4Smrg 7077117f1b4Smrg2: ld [%g1 + 0x00], %f0 ! LSU Group 7087117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 7097117f1b4Smrg fmuls %f0, M0, %f2 ! FGM Group 7107117f1b4Smrg fmuls %f0, M1, %f3 ! FGM Group 7117117f1b4Smrg fmuls %f0, M2, %f4 ! FGM Group 7127117f1b4Smrg fmuls %f1, M4, %f6 ! FGM Group 7137117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group f2 available 7147117f1b4Smrg fadds %f2, M12, %f2 ! FGA 7157117f1b4Smrg fmuls %f1, M6, %f8 ! FGM Group f3 available 7167117f1b4Smrg fadds %f3, M13, %f3 ! FGA 7177117f1b4Smrg fadds %f4, M14, %f4 ! FGA Group f4 available 7187117f1b4Smrg fadds %f2, %f6, %f2 ! FGA Group stall, f2, f6, f7 available 7197117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 7207117f1b4Smrg fadds %f3, %f7, %f3 ! FGA Group f3, f8 available 7217117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 7227117f1b4Smrg fadds %f4, %f8, %f4 ! FGA Group f4 available 7237117f1b4Smrg st %f4, [%g2 + 0x08] ! LSU 7247117f1b4Smrg 7257117f1b4Smrg3: 7267117f1b4Smrg ba __set_v4f_3 7277117f1b4Smrg nop 7287117f1b4Smrg 7297117f1b4Smrg .globl _mesa_sparc_transform_points2_3d_no_rot 7307117f1b4Smrg_mesa_sparc_transform_points2_3d_no_rot: 7317117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 7327117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 7337117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 7347117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 7357117f1b4Smrg 7367117f1b4Smrg LDMATRIX_0_5_12_13_14(%o1) 7377117f1b4Smrg 7387117f1b4Smrg cmp %g3, 1 7397117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 7407117f1b4Smrg bl 3f 7417117f1b4Smrg clr %o3 7427117f1b4Smrg 7437117f1b4Smrg be 2f 7447117f1b4Smrg andn %g3, 1, %o2 7457117f1b4Smrg 7467117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 7477117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 7487117f1b4Smrg add %o3, 2, %o3 ! IEU0 7497117f1b4Smrg add %g1, %o5, %g1 ! IEU1 7507117f1b4Smrg ld [%g1 + 0x00], %f4 ! LSU Group 7517117f1b4Smrg fmuls %f0, M0, %f2 ! FGM 7527117f1b4Smrg ld [%g1 + 0x04], %f5 ! LSU Group 7537117f1b4Smrg fmuls %f1, M5, %f3 ! FGM 7547117f1b4Smrg fmuls %f4, M0, %f6 ! FGM Group 7557117f1b4Smrg add %g1, %o5, %g1 ! IEU0 7567117f1b4Smrg fmuls %f5, M5, %f7 ! FGM Group 7577117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group f2 available 7587117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 7597117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 7607117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 7617117f1b4Smrg fadds %f6, M12, %f6 ! FGA Group f6 available 7627117f1b4Smrg st M14, [%g2 + 0x08] ! LSU 7637117f1b4Smrg fadds %f7, M13, %f7 ! FGA Group f7 available 7647117f1b4Smrg st %f6, [%g2 + 0x10] ! LSU 7657117f1b4Smrg st %f7, [%g2 + 0x14] ! LSU Group 7667117f1b4Smrg st M14, [%g2 + 0x18] ! LSU Group 7677117f1b4Smrg cmp %o3, %o2 ! IEU1 7687117f1b4Smrg bne 1b ! CTI 7697117f1b4Smrg add %g2, 0x20, %g2 ! IEU0 Group 7707117f1b4Smrg 7717117f1b4Smrg cmp %o3, %g3 7727117f1b4Smrg be 3f 7737117f1b4Smrg nop 7747117f1b4Smrg 7757117f1b4Smrg2: ld [%g1 + 0x00], %f0 ! LSU Group 7767117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 7777117f1b4Smrg fmuls %f0, M0, %f2 ! FGM Group 7787117f1b4Smrg fmuls %f1, M5, %f3 ! FGM Group 7797117f1b4Smrg fadds %f2, M12, %f2 ! FGA Group, 2 cycle stall, f2 available 7807117f1b4Smrg st %f2, [%g2 + 0x00] ! LSU 7817117f1b4Smrg fadds %f3, M13, %f3 ! FGA Group f3 available 7827117f1b4Smrg st %f3, [%g2 + 0x04] ! LSU 7837117f1b4Smrg st M14, [%g2 + 0x08] ! LSU Group 7847117f1b4Smrg 7857117f1b4Smrg3: ld [%o1 + (14 * 0x4)], %g3 7867117f1b4Smrg cmp %g3, 0 7877117f1b4Smrg bne __set_v4f_3 7887117f1b4Smrg nop 7897117f1b4Smrg ba __set_v4f_2 7907117f1b4Smrg nop 7917117f1b4Smrg 7927117f1b4Smrg .globl _mesa_sparc_transform_points2_perspective 7937117f1b4Smrg_mesa_sparc_transform_points2_perspective: 7947117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 7957117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 7967117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 7977117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 7987117f1b4Smrg 7997117f1b4Smrg LDMATRIX_0_5_14(%o1) 8007117f1b4Smrg 8017117f1b4Smrg cmp %g3, 0 8027117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 8037117f1b4Smrg be 2f 8047117f1b4Smrg clr %o1 8057117f1b4Smrg 8067117f1b4Smrg1: ld [%g1 + 0x00], %f0 8077117f1b4Smrg ld [%g1 + 0x04], %f1 8087117f1b4Smrg add %o1, 1, %o1 8097117f1b4Smrg add %g1, %o5, %g1 8107117f1b4Smrg fmuls %f0, M0, %f2 8117117f1b4Smrg st %f2, [%g2 + 0x00] 8127117f1b4Smrg fmuls %f1, M5, %f3 8137117f1b4Smrg st %f3, [%g2 + 0x04] 8147117f1b4Smrg st M14, [%g2 + 0x08] 8157117f1b4Smrg st %g0, [%g2 + 0x0c] 8167117f1b4Smrg cmp %o1, %g3 8177117f1b4Smrg bne 1b 8187117f1b4Smrg add %g2, 0x10, %g2 8197117f1b4Smrg2: 8207117f1b4Smrg ba __set_v4f_4 8217117f1b4Smrg nop 8227117f1b4Smrg 8237117f1b4Smrg .globl _mesa_sparc_transform_points3_general 8247117f1b4Smrg_mesa_sparc_transform_points3_general: 8257117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 8267117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 8277117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 8287117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 8297117f1b4Smrg 8307117f1b4Smrg LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(%o1) 8317117f1b4Smrg 8327117f1b4Smrg cmp %g3, 0 8337117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 8347117f1b4Smrg be 2f 8357117f1b4Smrg clr %o1 8367117f1b4Smrg 8377117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 8387117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 8397117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 8407117f1b4Smrg add %o1, 1, %o1 ! IEU0 8417117f1b4Smrg add %g1, %o5, %g1 ! IEU1 8427117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 8437117f1b4Smrg fmuls %f1, M4, %f7 ! FGM Group 8447117f1b4Smrg fmuls %f0, M1, %f4 ! FGM Group 8457117f1b4Smrg fmuls %f1, M5, %f8 ! FGM Group 8467117f1b4Smrg fmuls %f0, M2, %f5 ! FGM Group f3 available 8477117f1b4Smrg fmuls %f1, M6, %f9 ! FGM Group f7 available 8487117f1b4Smrg fadds %f3, %f7, %f3 ! FGA 8497117f1b4Smrg fmuls %f0, M3, %f6 ! FGM Group f4 available 8507117f1b4Smrg fmuls %f1, M7, %f10 ! FGM Group f8 available 8517117f1b4Smrg fadds %f4, %f8, %f4 ! FGA 8527117f1b4Smrg fmuls %f2, M8, %f7 ! FGM Group f5 available 8537117f1b4Smrg fmuls %f2, M9, %f8 ! FGM Group f9,f3 available 8547117f1b4Smrg fadds %f5, %f9, %f5 ! FGA 8557117f1b4Smrg fmuls %f2, M10, %f9 ! FGM Group f6 available 8567117f1b4Smrg fadds %f6, %f10, %f6 ! FGA Group f10,f4 available 8577117f1b4Smrg fmuls %f2, M11, %f10 ! FGM 8587117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group f7 available 8597117f1b4Smrg fadds %f4, M13, %f4 ! FGA Group f8,f5 available 8607117f1b4Smrg fadds %f5, M14, %f5 ! FGA Group f9 available 8617117f1b4Smrg fadds %f6, M15, %f6 ! FGA Group f10,f6 available 8627117f1b4Smrg fadds %f3, %f7, %f3 ! FGA Group f3 available 8637117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 8647117f1b4Smrg fadds %f4, %f8, %f4 ! FGA Group f4 available 8657117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 8667117f1b4Smrg fadds %f5, %f9, %f5 ! FGA Group f5 available 8677117f1b4Smrg st %f5, [%g2 + 0x08] ! LSU 8687117f1b4Smrg fadds %f6, %f10, %f6 ! FGA Group f6 available 8697117f1b4Smrg st %f6, [%g2 + 0x0c] ! LSU 8707117f1b4Smrg cmp %o1, %g3 ! IEU1 8717117f1b4Smrg bne 1b ! CTI 8727117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 8737117f1b4Smrg2: 8747117f1b4Smrg ba __set_v4f_4 8757117f1b4Smrg nop 8767117f1b4Smrg 8777117f1b4Smrg .globl _mesa_sparc_transform_points3_identity 8787117f1b4Smrg_mesa_sparc_transform_points3_identity: 8797117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 8807117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 8817117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 8827117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 8837117f1b4Smrg 8847117f1b4Smrg cmp %g3, 0 8857117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 8867117f1b4Smrg be 2f 8877117f1b4Smrg clr %o1 8887117f1b4Smrg 8897117f1b4Smrg1: ld [%g1 + 0x00], %f0 8907117f1b4Smrg ld [%g1 + 0x04], %f1 8917117f1b4Smrg ld [%g1 + 0x08], %f2 8927117f1b4Smrg add %o1, 1, %o1 8937117f1b4Smrg add %g1, %o5, %g1 8947117f1b4Smrg cmp %o1, %g3 8957117f1b4Smrg st %f0, [%g2 + 0x00] 8967117f1b4Smrg st %f1, [%g2 + 0x04] 8977117f1b4Smrg st %f2, [%g2 + 0x08] 8987117f1b4Smrg bne 1b 8997117f1b4Smrg add %g2, 0x10, %g2 9007117f1b4Smrg2: 9017117f1b4Smrg ba __set_v4f_3 9027117f1b4Smrg nop 9037117f1b4Smrg 9047117f1b4Smrg .globl _mesa_sparc_transform_points3_2d 9057117f1b4Smrg_mesa_sparc_transform_points3_2d: 9067117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 9077117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 9087117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 9097117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 9107117f1b4Smrg 9117117f1b4Smrg LDMATRIX_0_1_4_5_12_13(%o1) 9127117f1b4Smrg 9137117f1b4Smrg cmp %g3, 0 9147117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 9157117f1b4Smrg be 2f 9167117f1b4Smrg clr %o1 9177117f1b4Smrg 9187117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 9197117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 9207117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 9217117f1b4Smrg add %o1, 1, %o1 ! IEU0 9227117f1b4Smrg add %g1, %o5, %g1 ! IEU1 9237117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 9247117f1b4Smrg fmuls %f0, M1, %f4 ! FGM Group 9257117f1b4Smrg fmuls %f1, M4, %f6 ! FGM Group 9267117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group 9277117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group f3 available 9287117f1b4Smrg fadds %f4, M13, %f4 ! FGA Group f4 available 9297117f1b4Smrg fadds %f3, %f6, %f3 ! FGA Group f6 available 9307117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 9317117f1b4Smrg fadds %f4, %f7, %f4 ! FGA Group f7 available 9327117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 9337117f1b4Smrg st %f2, [%g2 + 0x08] ! LSU Group 9347117f1b4Smrg cmp %o1, %g3 ! IEU1 9357117f1b4Smrg bne 1b ! CTI 9367117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 9377117f1b4Smrg2: 9387117f1b4Smrg ba __set_v4f_3 9397117f1b4Smrg nop 9407117f1b4Smrg 9417117f1b4Smrg .globl _mesa_sparc_transform_points3_2d_no_rot 9427117f1b4Smrg_mesa_sparc_transform_points3_2d_no_rot: 9437117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 9447117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 9457117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 9467117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 9477117f1b4Smrg 9487117f1b4Smrg LDMATRIX_0_5_12_13(%o1) 9497117f1b4Smrg 9507117f1b4Smrg cmp %g3, 0 9517117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 9527117f1b4Smrg be 2f 9537117f1b4Smrg clr %o1 9547117f1b4Smrg 9557117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 9567117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 9577117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 9587117f1b4Smrg add %o1, 1, %o1 ! IEU0 9597117f1b4Smrg add %g1, %o5, %g1 ! IEU1 9607117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 9617117f1b4Smrg fmuls %f1, M5, %f4 ! FGM Group 9627117f1b4Smrg st %f2, [%g2 + 0x08] ! LSU 9637117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group 9647117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 9657117f1b4Smrg fadds %f4, M13, %f4 ! FGA Group 9667117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 9677117f1b4Smrg cmp %o1, %g3 ! IEU1 9687117f1b4Smrg bne 1b ! CTI 9697117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 9707117f1b4Smrg2: 9717117f1b4Smrg ba __set_v4f_3 9727117f1b4Smrg nop 9737117f1b4Smrg 9747117f1b4Smrg .globl _mesa_sparc_transform_points3_3d 9757117f1b4Smrg_mesa_sparc_transform_points3_3d: 9767117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 9777117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 9787117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 9797117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 9807117f1b4Smrg 9817117f1b4Smrg LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(%o1) 9827117f1b4Smrg 9837117f1b4Smrg cmp %g3, 0 9847117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 9857117f1b4Smrg be 2f 9867117f1b4Smrg clr %o1 9877117f1b4Smrg 9887117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 9897117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 9907117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 9917117f1b4Smrg add %o1, 1, %o1 ! IEU0 9927117f1b4Smrg add %g1, %o5, %g1 ! IEU1 9937117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 9947117f1b4Smrg fmuls %f1, M4, %f6 ! FGM Group 9957117f1b4Smrg fmuls %f0, M1, %f4 ! FGM Group 9967117f1b4Smrg fmuls %f1, M5, %f7 ! FGM Group 9977117f1b4Smrg fmuls %f0, M2, %f5 ! FGM Group f3 available 9987117f1b4Smrg fmuls %f1, M6, %f8 ! FGM Group f6 available 9997117f1b4Smrg fadds %f3, %f6, %f3 ! FGA 10007117f1b4Smrg fmuls %f2, M8, %f9 ! FGM Group f4 available 10017117f1b4Smrg fmuls %f2, M9, %f10 ! FGM Group f7 available 10027117f1b4Smrg fadds %f4, %f7, %f4 ! FGA 10037117f1b4Smrg fmuls %f2, M10, %f11 ! FGM Group f5 available 10047117f1b4Smrg fadds %f5, %f8, %f5 ! FGA Group f8, f3 available 10057117f1b4Smrg fadds %f3, %f9, %f3 ! FGA Group f9 available 10067117f1b4Smrg fadds %f4, %f10, %f4 ! FGA Group f10, f4 available 10077117f1b4Smrg fadds %f5, %f11, %f5 ! FGA Group stall, f11, f5 available 10087117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group f3 available 10097117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 10107117f1b4Smrg fadds %f4, M13, %f4 ! FGA Group f4 available 10117117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 10127117f1b4Smrg fadds %f5, M14, %f5 ! FGA Group f5 available 10137117f1b4Smrg st %f5, [%g2 + 0x08] ! LSU 10147117f1b4Smrg cmp %o1, %g3 ! IEU1 10157117f1b4Smrg bne 1b ! CTI 10167117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 10177117f1b4Smrg2: 10187117f1b4Smrg ba __set_v4f_3 10197117f1b4Smrg nop 10207117f1b4Smrg 10217117f1b4Smrg .globl _mesa_sparc_transform_points3_3d_no_rot 10227117f1b4Smrg_mesa_sparc_transform_points3_3d_no_rot: 10237117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 10247117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 10257117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 10267117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 10277117f1b4Smrg 10287117f1b4Smrg LDMATRIX_0_5_10_12_13_14(%o1) 10297117f1b4Smrg 10307117f1b4Smrg cmp %g3, 0 10317117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 10327117f1b4Smrg be 2f 10337117f1b4Smrg clr %o1 10347117f1b4Smrg 10357117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 10367117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 10377117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 10387117f1b4Smrg add %o1, 1, %o1 ! IEU0 10397117f1b4Smrg add %g1, %o5, %g1 ! IEU1 10407117f1b4Smrg cmp %o1, %g3 ! IEU1 Group 10417117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 10427117f1b4Smrg fmuls %f1, M5, %f4 ! FGM Group 10437117f1b4Smrg fmuls %f2, M10, %f5 ! FGM Group 10447117f1b4Smrg fadds %f3, M12, %f3 ! FGA Group, stall, f3 available 10457117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 10467117f1b4Smrg fadds %f4, M13, %f4 ! FGA Group, f4 available 10477117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 10487117f1b4Smrg fadds %f5, M14, %f5 ! FGA Group, f5 available 10497117f1b4Smrg st %f5, [%g2 + 0x08] ! LEU 10507117f1b4Smrg bne 1b ! CTI 10517117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 10527117f1b4Smrg2: 10537117f1b4Smrg ba __set_v4f_3 10547117f1b4Smrg nop 10557117f1b4Smrg 10567117f1b4Smrg .globl _mesa_sparc_transform_points3_perspective 10577117f1b4Smrg_mesa_sparc_transform_points3_perspective: 10587117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 10597117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 10607117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 10617117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 10627117f1b4Smrg 10637117f1b4Smrg LDMATRIX_0_5_8_9_10_14(%o1) 10647117f1b4Smrg 10657117f1b4Smrg cmp %g3, 0 10667117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 10677117f1b4Smrg be 2f 10687117f1b4Smrg clr %o1 10697117f1b4Smrg 10707117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 10717117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 10727117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 10737117f1b4Smrg add %o1, 1, %o1 ! IEU0 10747117f1b4Smrg add %g1, %o5, %g1 ! IEU1 10757117f1b4Smrg fmuls %f0, M0, %f3 ! FGM 10767117f1b4Smrg fmuls %f2, M8, %f6 ! FGM Group 10777117f1b4Smrg fmuls %f1, M5, %f4 ! FGM Group 10787117f1b4Smrg fmuls %f2, M9, %f7 ! FGM Group 10797117f1b4Smrg fmuls %f2, M10, %f5 ! FGM Group f3 available 10807117f1b4Smrg fadds %f3, %f6, %f3 ! FGA Group f6 available 10817117f1b4Smrg st %f3, [%g2 + 0x00] ! LSU 10827117f1b4Smrg fadds %f4, %f7, %f4 ! FGA Group stall, f4, f7 available 10837117f1b4Smrg st %f4, [%g2 + 0x04] ! LSU 10847117f1b4Smrg fadds %f5, M14, %f5 ! FGA Group 10857117f1b4Smrg st %f5, [%g2 + 0x08] ! LSU 10867117f1b4Smrg fnegs %f2, %f6 ! FGA Group 10877117f1b4Smrg st %f6, [%g2 + 0x0c] ! LSU 10887117f1b4Smrg cmp %o1, %g3 ! IEU1 10897117f1b4Smrg bne 1b ! CTI 10907117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 10917117f1b4Smrg2: 10927117f1b4Smrg ba __set_v4f_4 10937117f1b4Smrg nop 10947117f1b4Smrg 10957117f1b4Smrg .globl _mesa_sparc_transform_points4_general 10967117f1b4Smrg_mesa_sparc_transform_points4_general: 10977117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 10987117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 10997117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 11007117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 11017117f1b4Smrg 11027117f1b4Smrg LDMATRIX_0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15(%o1) 11037117f1b4Smrg 11047117f1b4Smrg cmp %g3, 0 11057117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 11067117f1b4Smrg be 2f 11077117f1b4Smrg clr %o1 11087117f1b4Smrg 11097117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 11107117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 11117117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 11127117f1b4Smrg ld [%g1 + 0x0c], %f3 ! LSU Group 11137117f1b4Smrg add %o1, 1, %o1 ! IEU0 11147117f1b4Smrg add %g1, %o5, %g1 ! IEU1 11157117f1b4Smrg fmuls %f0, M0, %f4 ! FGM Group 11167117f1b4Smrg fmuls %f1, M4, %f8 ! FGM Group 11177117f1b4Smrg fmuls %f0, M1, %f5 ! FGM Group 11187117f1b4Smrg fmuls %f1, M5, %f9 ! FGM Group 11197117f1b4Smrg fmuls %f0, M2, %f6 ! FGM Group f4 available 11207117f1b4Smrg fmuls %f1, M6, %f10 ! FGM Group f8 available 11217117f1b4Smrg fadds %f4, %f8, %f4 ! FGA 11227117f1b4Smrg fmuls %f0, M3, %f7 ! FGM Group f5 available 11237117f1b4Smrg fmuls %f1, M7, %f11 ! FGM Group f9 available 11247117f1b4Smrg fadds %f5, %f9, %f5 ! FGA 11257117f1b4Smrg fmuls %f2, M8, %f12 ! FGM Group f6 available 11267117f1b4Smrg fmuls %f2, M9, %f13 ! FGM Group f10, f4 available 11277117f1b4Smrg fadds %f6, %f10, %f6 ! FGA 11287117f1b4Smrg fmuls %f2, M10, %f14 ! FGM Group f7 available 11297117f1b4Smrg fmuls %f2, M11, %f15 ! FGM Group f11, f5 available 11307117f1b4Smrg fadds %f7, %f11, %f7 ! FGA 11317117f1b4Smrg fmuls %f3, M12, %f8 ! FGM Group f12 available 11327117f1b4Smrg fadds %f4, %f12, %f4 ! FGA 11337117f1b4Smrg fmuls %f3, M13, %f9 ! FGM Group f13, f6 available 11347117f1b4Smrg fadds %f5, %f13, %f5 ! FGA 11357117f1b4Smrg fmuls %f3, M14, %f10 ! FGM Group f14 available 11367117f1b4Smrg fadds %f6, %f14, %f6 ! FGA 11377117f1b4Smrg fmuls %f3, M15, %f11 ! FGM Group f15, f7 available 11387117f1b4Smrg fadds %f7, %f15, %f7 ! FGA 11397117f1b4Smrg fadds %f4, %f8, %f4 ! FGA Group f8, f4 available 11407117f1b4Smrg st %f4, [%g2 + 0x00] ! LSU 11417117f1b4Smrg fadds %f5, %f9, %f5 ! FGA Group f9, f5 available 11427117f1b4Smrg st %f5, [%g2 + 0x04] ! LSU 11437117f1b4Smrg fadds %f6, %f10, %f6 ! FGA Group f10, f6 available 11447117f1b4Smrg st %f6, [%g2 + 0x08] ! LSU 11457117f1b4Smrg fadds %f7, %f11, %f7 ! FGA Group f11, f7 available 11467117f1b4Smrg st %f7, [%g2 + 0x0c] ! LSU 11477117f1b4Smrg cmp %o1, %g3 ! IEU1 11487117f1b4Smrg bne 1b ! CTI 11497117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 11507117f1b4Smrg2: 11517117f1b4Smrg ba __set_v4f_4 11527117f1b4Smrg nop 11537117f1b4Smrg 11547117f1b4Smrg .globl _mesa_sparc_transform_points4_identity 11557117f1b4Smrg_mesa_sparc_transform_points4_identity: 11567117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 11577117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 11587117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 11597117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 11607117f1b4Smrg 11617117f1b4Smrg cmp %g3, 0 11627117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 11637117f1b4Smrg be 2f 11647117f1b4Smrg clr %o1 11657117f1b4Smrg 11667117f1b4Smrg1: ld [%g1 + 0x00], %f0 11677117f1b4Smrg ld [%g1 + 0x04], %f1 11687117f1b4Smrg ld [%g1 + 0x08], %f2 11697117f1b4Smrg add %o1, 1, %o1 11707117f1b4Smrg ld [%g1 + 0x0c], %f3 11717117f1b4Smrg add %g1, %o5, %g1 11727117f1b4Smrg st %f0, [%g2 + 0x00] 11737117f1b4Smrg st %f1, [%g2 + 0x04] 11747117f1b4Smrg st %f2, [%g2 + 0x08] 11757117f1b4Smrg cmp %o1, %g3 11767117f1b4Smrg st %f3, [%g2 + 0x0c] 11777117f1b4Smrg bne 1b 11787117f1b4Smrg add %g2, 0x10, %g2 11797117f1b4Smrg2: 11807117f1b4Smrg ba __set_v4f_4 11817117f1b4Smrg nop 11827117f1b4Smrg 11837117f1b4Smrg .globl _mesa_sparc_transform_points4_2d 11847117f1b4Smrg_mesa_sparc_transform_points4_2d: 11857117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 11867117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 11877117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 11887117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 11897117f1b4Smrg 11907117f1b4Smrg LDMATRIX_0_1_4_5_12_13(%o1) 11917117f1b4Smrg 11927117f1b4Smrg cmp %g3, 0 11937117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 11947117f1b4Smrg be 2f 11957117f1b4Smrg clr %o1 11967117f1b4Smrg 11977117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 11987117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 11997117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 12007117f1b4Smrg ld [%g1 + 0x0c], %f3 ! LSU Group 12017117f1b4Smrg add %o1, 1, %o1 ! IEU0 12027117f1b4Smrg add %g1, %o5, %g1 ! IEU1 12037117f1b4Smrg fmuls %f0, M0, %f4 ! FGM 12047117f1b4Smrg fmuls %f1, M4, %f8 ! FGM Group 12057117f1b4Smrg fmuls %f0, M1, %f5 ! FGM Group 12067117f1b4Smrg fmuls %f1, M5, %f9 ! FGM Group f4 available 12077117f1b4Smrg fmuls %f3, M12, %f12 ! FGM Group 12087117f1b4Smrg fmuls %f3, M13, %f13 ! FGM Group f8 available 12097117f1b4Smrg fadds %f4, %f8, %f4 ! FGA 12107117f1b4Smrg fadds %f5, %f9, %f5 ! FGA Group stall, f5, f9 available 12117117f1b4Smrg fadds %f4, %f12, %f4 ! FGA Group 2 cycle stall, f4, f12, f13 avail 12127117f1b4Smrg st %f4, [%g2 + 0x00] ! LSU 12137117f1b4Smrg fadds %f5, %f13, %f5 ! FGA Group f5 available 12147117f1b4Smrg st %f5, [%g2 + 0x04] ! LSU 12157117f1b4Smrg st %f2, [%g2 + 0x08] ! LSU Group 12167117f1b4Smrg st %f3, [%g2 + 0x0c] ! LSU Group 12177117f1b4Smrg cmp %o1, %g3 ! IEU1 12187117f1b4Smrg bne 1b ! CTI 12197117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 12207117f1b4Smrg2: 12217117f1b4Smrg ba __set_v4f_4 12227117f1b4Smrg nop 12237117f1b4Smrg 12247117f1b4Smrg .globl _mesa_sparc_transform_points4_2d_no_rot 12257117f1b4Smrg_mesa_sparc_transform_points4_2d_no_rot: 12267117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 12277117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 12287117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 12297117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 12307117f1b4Smrg 12317117f1b4Smrg LDMATRIX_0_1_4_5_12_13(%o1) 12327117f1b4Smrg 12337117f1b4Smrg cmp %g3, 0 12347117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 12357117f1b4Smrg be 2f 12367117f1b4Smrg clr %o1 12377117f1b4Smrg 12387117f1b4Smrg1: ld [%g1 + 0x00], %f0 12397117f1b4Smrg ld [%g1 + 0x04], %f1 12407117f1b4Smrg ld [%g1 + 0x08], %f2 12417117f1b4Smrg ld [%g1 + 0x0c], %f3 12427117f1b4Smrg add %o1, 1, %o1 12437117f1b4Smrg add %g1, %o5, %g1 12447117f1b4Smrg fmuls %f0, M0, %f4 12457117f1b4Smrg fmuls %f3, M12, %f8 12467117f1b4Smrg fmuls %f1, M5, %f5 12477117f1b4Smrg fmuls %f3, M13, %f9 12487117f1b4Smrg fadds %f4, %f8, %f4 12497117f1b4Smrg st %f4, [%g2 + 0x00] 12507117f1b4Smrg fadds %f5, %f9, %f5 12517117f1b4Smrg st %f5, [%g2 + 0x04] 12527117f1b4Smrg st %f2, [%g2 + 0x08] 12537117f1b4Smrg st %f3, [%g2 + 0x0c] 12547117f1b4Smrg cmp %o1, %g3 12557117f1b4Smrg bne 1b 12567117f1b4Smrg add %g2, 0x10, %g2 12577117f1b4Smrg2: 12587117f1b4Smrg ba __set_v4f_4 12597117f1b4Smrg nop 12607117f1b4Smrg 12617117f1b4Smrg .globl _mesa_sparc_transform_points4_3d 12627117f1b4Smrg_mesa_sparc_transform_points4_3d: 12637117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 12647117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 12657117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 12667117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 12677117f1b4Smrg 12687117f1b4Smrg LDMATRIX_0_1_2_4_5_6_8_9_10_12_13_14(%o1) 12697117f1b4Smrg 12707117f1b4Smrg cmp %g3, 0 12717117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 12727117f1b4Smrg be 2f 12737117f1b4Smrg clr %o1 12747117f1b4Smrg 12757117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 12767117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 12777117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 12787117f1b4Smrg ld [%g1 + 0x0c], %f3 ! LSU Group 12797117f1b4Smrg add %o1, 1, %o1 ! IEU0 12807117f1b4Smrg add %g1, %o5, %g1 ! IEU1 12817117f1b4Smrg fmuls %f0, M0, %f4 ! FGM 12827117f1b4Smrg fmuls %f1, M4, %f7 ! FGM Group 12837117f1b4Smrg fmuls %f0, M1, %f5 ! FGM Group 12847117f1b4Smrg fmuls %f1, M5, %f8 ! FGM Group 12857117f1b4Smrg fmuls %f0, M2, %f6 ! FGM Group f4 available 12867117f1b4Smrg fmuls %f1, M6, %f9 ! FGM Group f7 available 12877117f1b4Smrg fadds %f4, %f7, %f4 ! FGA 12887117f1b4Smrg fmuls %f2, M8, %f10 ! FGM Group f5 available 12897117f1b4Smrg fmuls %f2, M9, %f11 ! FGM Group f8 available 12907117f1b4Smrg fadds %f5, %f8, %f5 ! FGA 12917117f1b4Smrg fmuls %f2, M10, %f12 ! FGM Group f6 available 12927117f1b4Smrg fmuls %f3, M12, %f13 ! FGM Group f9, f4 available 12937117f1b4Smrg fadds %f6, %f9, %f6 ! FGA 12947117f1b4Smrg fmuls %f3, M13, %f14 ! FGM Group f10 available 12957117f1b4Smrg fadds %f4, %f10, %f4 ! FGA 12967117f1b4Smrg fmuls %f3, M14, %f15 ! FGM Group f11, f5 available 12977117f1b4Smrg fadds %f5, %f11, %f5 ! FGA 12987117f1b4Smrg fadds %f6, %f12, %f6 ! FGA Group stall, f12, f13, f6 available 12997117f1b4Smrg fadds %f4, %f13, %f4 ! FGA Group f14, f4 available 13007117f1b4Smrg st %f4, [%g2 + 0x00] ! LSU 13017117f1b4Smrg fadds %f5, %f14, %f5 ! FGA Group f15, f5 available 13027117f1b4Smrg st %f5, [%g2 + 0x04] ! LSU 13037117f1b4Smrg fadds %f6, %f15, %f6 ! FGA Group f6 available 13047117f1b4Smrg st %f6, [%g2 + 0x08] ! LSU 13057117f1b4Smrg st %f3, [%g2 + 0x0c] ! LSU Group 13067117f1b4Smrg cmp %o1, %g3 ! IEU1 13077117f1b4Smrg bne 1b ! CTI 13087117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 13097117f1b4Smrg2: 13107117f1b4Smrg ba __set_v4f_4 13117117f1b4Smrg nop 13127117f1b4Smrg 13137117f1b4Smrg .globl _mesa_sparc_transform_points4_3d_no_rot 13147117f1b4Smrg_mesa_sparc_transform_points4_3d_no_rot: 13157117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 13167117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 13177117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 13187117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 13197117f1b4Smrg 13207117f1b4Smrg LDMATRIX_0_5_10_12_13_14(%o1) 13217117f1b4Smrg 13227117f1b4Smrg cmp %g3, 0 13237117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 13247117f1b4Smrg be 2f 13257117f1b4Smrg clr %o1 13267117f1b4Smrg 13277117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 13287117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 13297117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 13307117f1b4Smrg ld [%g1 + 0x0c], %f3 ! LSU Group 13317117f1b4Smrg add %o1, 1, %o1 ! IEU0 13327117f1b4Smrg add %g1, %o5, %g1 ! IEU1 13337117f1b4Smrg fmuls %f0, M0, %f4 ! FGM 13347117f1b4Smrg fmuls %f3, M12, %f7 ! FGM Group 13357117f1b4Smrg fmuls %f1, M5, %f5 ! FGM Group 13367117f1b4Smrg fmuls %f3, M13, %f8 ! FGM Group 13377117f1b4Smrg fmuls %f2, M10, %f6 ! FGM Group f4 available 13387117f1b4Smrg fmuls %f3, M14, %f9 ! FGM Group f7 available 13397117f1b4Smrg fadds %f4, %f7, %f4 ! FGA 13407117f1b4Smrg st %f4, [%g2 + 0x00] ! LSU 13417117f1b4Smrg fadds %f5, %f8, %f5 ! FGA Group stall, f5, f8 available 13427117f1b4Smrg st %f5, [%g2 + 0x04] ! LSU 13437117f1b4Smrg fadds %f6, %f9, %f6 ! FGA Group stall, f6, f9 available 13447117f1b4Smrg st %f6, [%g2 + 0x08] ! LSU 13457117f1b4Smrg st %f3, [%g2 + 0x0c] ! LSU Group 13467117f1b4Smrg cmp %o1, %g3 ! IEU1 13477117f1b4Smrg bne 1b ! CTI 13487117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 13497117f1b4Smrg2: 13507117f1b4Smrg ba __set_v4f_4 13517117f1b4Smrg nop 13527117f1b4Smrg 13537117f1b4Smrg .globl _mesa_sparc_transform_points4_perspective 13547117f1b4Smrg_mesa_sparc_transform_points4_perspective: 13557117f1b4Smrg ld [%o2 + V4F_STRIDE], %o5 13567117f1b4Smrg LDPTR [%o2 + V4F_START], %g1 13577117f1b4Smrg LDPTR [%o0 + V4F_START], %g2 13587117f1b4Smrg ld [%o2 + V4F_COUNT], %g3 13597117f1b4Smrg 13607117f1b4Smrg LDMATRIX_0_5_8_9_10_14(%o1) 13617117f1b4Smrg 13627117f1b4Smrg cmp %g3, 0 13637117f1b4Smrg st %g3, [%o0 + V4F_COUNT] 13647117f1b4Smrg be 2f 13657117f1b4Smrg clr %o1 13667117f1b4Smrg 13677117f1b4Smrg1: ld [%g1 + 0x00], %f0 ! LSU Group 13687117f1b4Smrg ld [%g1 + 0x04], %f1 ! LSU Group 13697117f1b4Smrg ld [%g1 + 0x08], %f2 ! LSU Group 13707117f1b4Smrg ld [%g1 + 0x0c], %f3 ! LSU Group 13717117f1b4Smrg add %o1, 1, %o1 ! IEU0 13727117f1b4Smrg add %g1, %o5, %g1 ! IEU1 13737117f1b4Smrg fmuls %f0, M0, %f4 ! FGM 13747117f1b4Smrg fmuls %f2, M8, %f7 ! FGM Group 13757117f1b4Smrg fmuls %f1, M5, %f5 ! FGM Group 13767117f1b4Smrg fmuls %f2, M9, %f8 ! FGM Group 13777117f1b4Smrg fmuls %f2, M10, %f6 ! FGM Group f4 available 13787117f1b4Smrg fmuls %f3, M14, %f9 ! FGM Group f7 available 13797117f1b4Smrg fadds %f4, %f7, %f4 ! FGA 13807117f1b4Smrg st %f4, [%g2 + 0x00] ! LSU 13817117f1b4Smrg fadds %f5, %f8, %f5 ! FGA Group stall, f5, f8 available 13827117f1b4Smrg st %f5, [%g2 + 0x04] ! LSU 13837117f1b4Smrg fadds %f6, %f9, %f6 ! FGA Group stall, f6, f9 available 13847117f1b4Smrg st %f6, [%g2 + 0x08] ! LSU 13857117f1b4Smrg fnegs %f2, %f7 ! FGA Group 13867117f1b4Smrg st %f7, [%g2 + 0x0c] ! LSU 13877117f1b4Smrg cmp %o1, %g3 ! IEU1 13887117f1b4Smrg bne 1b ! CTI 13897117f1b4Smrg add %g2, 0x10, %g2 ! IEU0 Group 13907117f1b4Smrg2: 13917117f1b4Smrg ba __set_v4f_4 13927117f1b4Smrg nop 1393