Previous 199869 Revisions Next

r33455 Thursday 20th November, 2014 at 12:00:53 UTC by Oliver Stöneberg
fixed "unresolved external symbol" with RSP during linking with Visual Studio (nw)
[src/emu/cpu/rsp]rspcp2d.c

trunk/src/emu/cpu/rsp/rspcp2d.c
r241966r241967
258258//
259259// Load 1 byte to vector byte index
260260
261inline void rsp_cop2_drc::lbv()
261void rsp_cop2_drc::lbv()
262262{
263263   UINT32 op = m_op;
264264
r241966r241967
291291//
292292// Loads 2 bytes starting from vector byte index
293293
294inline void rsp_cop2_drc::lsv()
294void rsp_cop2_drc::lsv()
295295{
296296   UINT32 op = m_op;
297297   int dest = (op >> 16) & 0x1f;
r241966r241967
327327//
328328// Loads 4 bytes starting from vector byte index
329329
330inline void rsp_cop2_drc::llv()
330void rsp_cop2_drc::llv()
331331{
332332   UINT32 op = m_op;
333333   UINT32 ea = 0;
r241966r241967
366366//
367367// Loads 8 bytes starting from vector byte index
368368
369inline void rsp_cop2_drc::ldv()
369void rsp_cop2_drc::ldv()
370370{
371371   UINT32 op = m_op;
372372   UINT32 ea = 0;
r241966r241967
405405//
406406// Loads up to 16 bytes starting from vector byte index
407407
408inline void rsp_cop2_drc::lqv()
408void rsp_cop2_drc::lqv()
409409{
410410   UINT32 op = m_op;
411411   int dest = (op >> 16) & 0x1f;
r241966r241967
443443//
444444// Stores up to 16 bytes starting from right side until 16-byte boundary
445445
446inline void rsp_cop2_drc::lrv()
446void rsp_cop2_drc::lrv()
447447{
448448   UINT32 op = m_op;
449449   int dest = (op >> 16) & 0x1f;
r241966r241967
482482//
483483// Loads a byte as the upper 8 bits of each element
484484
485inline void rsp_cop2_drc::lpv()
485void rsp_cop2_drc::lpv()
486486{
487487   UINT32 op = m_op;
488488   int dest = (op >> 16) & 0x1f;
r241966r241967
517517//
518518// Loads a byte as the bits 14-7 of each element
519519
520inline void rsp_cop2_drc::luv()
520void rsp_cop2_drc::luv()
521521{
522522   UINT32 op = m_op;
523523   int dest = (op >> 16) & 0x1f;
r241966r241967
552552//
553553// Loads a byte as the bits 14-7 of each element, with 2-byte stride
554554
555inline void rsp_cop2_drc::lhv()
555void rsp_cop2_drc::lhv()
556556{
557557   UINT32 op = m_op;
558558   int dest = (op >> 16) & 0x1f;
r241966r241967
586586//
587587// Loads a byte as the bits 14-7 of upper or lower quad, with 4-byte stride
588588
589inline void rsp_cop2_drc::lfv()
589void rsp_cop2_drc::lfv()
590590{
591591   UINT32 op = m_op;
592592   int dest = (op >> 16) & 0x1f;
r241966r241967
627627// Loads the full 128-bit vector starting from vector byte index and wrapping to index 0
628628// after byte index 15
629629
630inline void rsp_cop2_drc::lwv()
630void rsp_cop2_drc::lwv()
631631{
632632   UINT32 op = m_op;
633633   int dest = (op >> 16) & 0x1f;
r241966r241967
664664//
665665// Loads one element to maximum of 8 vectors, while incrementing element index
666666
667inline void rsp_cop2_drc::ltv()
667void rsp_cop2_drc::ltv()
668668{
669669   UINT32 op = m_op;
670670   int dest = (op >> 16) & 0x1f;
r241966r241967
791791//
792792// Stores 1 byte from vector byte index
793793
794inline void rsp_cop2_drc::sbv()
794void rsp_cop2_drc::sbv()
795795{
796796   UINT32 op = m_op;
797797   int dest = (op >> 16) & 0x1f;
r241966r241967
822822//
823823// Stores 2 bytes starting from vector byte index
824824
825inline void rsp_cop2_drc::ssv()
825void rsp_cop2_drc::ssv()
826826{
827827   UINT32 op = m_op;
828828   int dest = (op >> 16) & 0x1f;
r241966r241967
859859//
860860// Stores 4 bytes starting from vector byte index
861861
862inline void rsp_cop2_drc::slv()
862void rsp_cop2_drc::slv()
863863{
864864   UINT32 op = m_op;
865865   int dest = (op >> 16) & 0x1f;
r241966r241967
896896//
897897// Stores 8 bytes starting from vector byte index
898898
899inline void rsp_cop2_drc::sdv()
899void rsp_cop2_drc::sdv()
900900{
901901   UINT32 op = m_op;
902902   int dest = (op >> 16) & 0x1f;
r241966r241967
932932//
933933// Stores up to 16 bytes starting from vector byte index until 16-byte boundary
934934
935inline void rsp_cop2_drc::sqv()
935void rsp_cop2_drc::sqv()
936936{
937937   UINT32 op = m_op;
938938   int dest = (op >> 16) & 0x1f;
r241966r241967
968968//
969969// Stores up to 16 bytes starting from right side until 16-byte boundary
970970
971inline void rsp_cop2_drc::srv()
971void rsp_cop2_drc::srv()
972972{
973973   UINT32 op = m_op;
974974   int dest = (op >> 16) & 0x1f;
r241966r241967
10081008//
10091009// Stores upper 8 bits of each element
10101010
1011inline void rsp_cop2_drc::spv()
1011void rsp_cop2_drc::spv()
10121012{
10131013   UINT32 op = m_op;
10141014   int dest = (op >> 16) & 0x1f;
r241966r241967
10511051//
10521052// Stores bits 14-7 of each element
10531053
1054inline void rsp_cop2_drc::suv()
1054void rsp_cop2_drc::suv()
10551055{
10561056   UINT32 op = m_op;
10571057   int dest = (op >> 16) & 0x1f;
r241966r241967
10941094//
10951095// Stores bits 14-7 of each element, with 2-byte stride
10961096
1097inline void rsp_cop2_drc::shv()
1097void rsp_cop2_drc::shv()
10981098{
10991099   UINT32 op = m_op;
11001100   int dest = (op >> 16) & 0x1f;
r241966r241967
11321132//
11331133// Stores bits 14-7 of upper or lower quad, with 4-byte stride
11341134
1135inline void rsp_cop2_drc::sfv()
1135void rsp_cop2_drc::sfv()
11361136{
11371137   UINT32 op = m_op;
11381138   int dest = (op >> 16) & 0x1f;
r241966r241967
11731173// Stores the full 128-bit vector starting from vector byte index and wrapping to index 0
11741174// after byte index 15
11751175
1176inline void rsp_cop2_drc::swv()
1176void rsp_cop2_drc::swv()
11771177{
11781178   UINT32 op = m_op;
11791179   int dest = (op >> 16) & 0x1f;
r241966r241967
12121212//
12131213// Stores one element from maximum of 8 vectors, while incrementing element index
12141214
1215inline void rsp_cop2_drc::stv()
1215void rsp_cop2_drc::stv()
12161216{
12171217   UINT32 op = m_op;
12181218   int dest = (op >> 16) & 0x1f;
r241966r241967
13441344//
13451345// Multiplies signed integer by signed integer * 2
13461346
1347inline void rsp_cop2_drc::vmulf()
1347void rsp_cop2_drc::vmulf()
13481348{
13491349   int op = m_op;
13501350
r241966r241967
13911391// ------------------------------------------------------
13921392//
13931393
1394inline void rsp_cop2_drc::vmulu()
1394void rsp_cop2_drc::vmulu()
13951395{
13961396   int op = m_op;
13971397
r241966r241967
14431443// The result is added into accumulator
14441444// The middle slice of accumulator is stored into destination element
14451445
1446inline void rsp_cop2_drc::vmudl()
1446void rsp_cop2_drc::vmudl()
14471447{
14481448   int op = m_op;
14491449
r241966r241967
14831483// The result is stored into accumulator
14841484// The middle slice of accumulator is stored into destination element
14851485
1486inline void rsp_cop2_drc::vmudm()
1486void rsp_cop2_drc::vmudm()
14871487{
14881488   int op = m_op;
14891489
r241966r241967
15231523// The result is stored into accumulator
15241524// The low slice of accumulator is stored into destination element
15251525
1526inline void rsp_cop2_drc::vmudn()
1526void rsp_cop2_drc::vmudn()
15271527{
15281528   int op = m_op;
15291529
r241966r241967
15631563// The result is stored into highest 32 bits of accumulator, the low slice is zero
15641564// The highest 32 bits of accumulator is saturated into destination element
15651565
1566inline void rsp_cop2_drc::vmudh()
1566void rsp_cop2_drc::vmudh()
15671567{
15681568   int op = m_op;
15691569
r241966r241967
16021602// ------------------------------------------------------
16031603//
16041604
1605inline void rsp_cop2_drc::vmacf()
1605void rsp_cop2_drc::vmacf()
16061606{
16071607   int op = m_op;
16081608
r241966r241967
16461646// ------------------------------------------------------
16471647//
16481648
1649inline void rsp_cop2_drc::vmacu()
1649void rsp_cop2_drc::vmacu()
16501650{
16511651   int op = m_op;
16521652
r241966r241967
17091709// Adds the higher 16 bits of the 32-bit result to accumulator
17101710// The low slice of accumulator is stored into destination element
17111711
1712inline void rsp_cop2_drc::vmadl()
1712void rsp_cop2_drc::vmadl()
17131713{
17141714   int op = m_op;
17151715
r241966r241967
17431743// VMADM
17441744//
17451745
1746inline void rsp_cop2_drc::vmadm()
1746void rsp_cop2_drc::vmadm()
17471747{
17481748   int op = m_op;
17491749
r241966r241967
17811781// VMADN
17821782//
17831783
1784inline void rsp_cop2_drc::vmadn()
1784void rsp_cop2_drc::vmadn()
17851785{
17861786   int op = m_op;
17871787
r241966r241967
18261826// The result is added into highest 32 bits of accumulator, the low slice is zero
18271827// The highest 32 bits of accumulator is saturated into destination element
18281828
1829inline void rsp_cop2_drc::vmadh()
1829void rsp_cop2_drc::vmadh()
18301830{
18311831   int op = m_op;
18321832
r241966r241967
18641864//
18651865// Adds two vector registers and carry flag, the result is saturated to 32767
18661866
1867inline void rsp_cop2_drc::vadd()
1867void rsp_cop2_drc::vadd()
18681868{
18691869   int op = m_op;
18701870
r241966r241967
19041904// Subtracts two vector registers and carry flag, the result is saturated to -32768
19051905// TODO: check VS2REG == VDREG
19061906
1907inline void rsp_cop2_drc::vsub()
1907void rsp_cop2_drc::vsub()
19081908{
19091909   int op = m_op;
19101910
r241966r241967
19441944//
19451945// Changes the sign of source register 2 if source register 1 is negative and stores the result to destination register
19461946
1947inline void rsp_cop2_drc::vabs()
1947void rsp_cop2_drc::vabs()
19481948{
19491949   int op = m_op;
19501950
r241966r241967
19951995// Adds two vector registers, the carry out is stored into carry register
19961996// TODO: check VS2REG = VDREG
19971997
1998inline void rsp_cop2_drc::vaddc()
1998void rsp_cop2_drc::vaddc()
19991999{
20002000   int op = m_op;
20012001
r241966r241967
20382038// Subtracts two vector registers, the carry out is stored into carry register
20392039// TODO: check VS2REG = VDREG
20402040
2041inline void rsp_cop2_drc::vsubc()
2041void rsp_cop2_drc::vsubc()
20422042{
20432043   int op = m_op;
20442044
r241966r241967
20842084//
20852085// Adds two vector registers bytewise with rounding
20862086
2087inline void rsp_cop2_drc::vaddb()
2087void rsp_cop2_drc::vaddb()
20882088{
20892089   const int op = m_op;
20902090   const int round = (EL == 0) ? 0 : (1 << (EL - 1));
r241966r241967
21382138//
21392139// Stores high, middle or low slice of accumulator to destination vector
21402140
2141inline void rsp_cop2_drc::vsaw()
2141void rsp_cop2_drc::vsaw()
21422142{
21432143   int op = m_op;
21442144
r241966r241967
21882188// Sets compare flags if elements in VS1 are less than VS2
21892189// Moves the element in VS2 to destination vector
21902190
2191inline void rsp_cop2_drc::vlt()
2191void rsp_cop2_drc::vlt()
21922192{
21932193   int op = m_op;
21942194
r241966r241967
22462246// Sets compare flags if elements in VS1 are equal with VS2
22472247// Moves the element in VS2 to destination vector
22482248
2249inline void rsp_cop2_drc::veq()
2249void rsp_cop2_drc::veq()
22502250{
22512251   int op = m_op;
22522252
r241966r241967
22932293// Sets compare flags if elements in VS1 are not equal with VS2
22942294// Moves the element in VS2 to destination vector
22952295
2296inline void rsp_cop2_drc::vne()
2296void rsp_cop2_drc::vne()
22972297{
22982298   int op = m_op;
22992299
r241966r241967
23402340// Sets compare flags if elements in VS1 are greater or equal with VS2
23412341// Moves the element in VS2 to destination vector
23422342
2343inline void rsp_cop2_drc::vge()
2343void rsp_cop2_drc::vge()
23442344{
23452345   int op = m_op;
23462346
r241966r241967
23852385//
23862386// Vector clip low
23872387
2388inline void rsp_cop2_drc::vcl()
2388void rsp_cop2_drc::vcl()
23892389{
23902390   int op = m_op;
23912391
r241966r241967
24882488//
24892489// Vector clip high
24902490
2491inline void rsp_cop2_drc::vch()
2491void rsp_cop2_drc::vch()
24922492{
24932493   int op = m_op;
24942494
r241966r241967
25752575//
25762576// Vector clip reverse
25772577
2578inline void rsp_cop2_drc::vcr()
2578void rsp_cop2_drc::vcr()
25792579{
25802580   int op = m_op;
25812581
r241966r241967
26442644//
26452645// Merges two vectors according to compare flags
26462646
2647inline void rsp_cop2_drc::vmrg()
2647void rsp_cop2_drc::vmrg()
26482648{
26492649   int op = m_op;
26502650
r241966r241967
26822682//
26832683// Bitwise AND of two vector registers
26842684
2685inline void rsp_cop2_drc::vand()
2685void rsp_cop2_drc::vand()
26862686{
26872687   int op = m_op;
26882688
r241966r241967
27122712//
27132713// Bitwise NOT AND of two vector registers
27142714
2715inline void rsp_cop2_drc::vnand()
2715void rsp_cop2_drc::vnand()
27162716{
27172717   int op = m_op;
27182718
r241966r241967
27422742//
27432743// Bitwise OR of two vector registers
27442744
2745inline void rsp_cop2_drc::vor()
2745void rsp_cop2_drc::vor()
27462746{
27472747   int op = m_op;
27482748
r241966r241967
27722772//
27732773// Bitwise NOT OR of two vector registers
27742774
2775inline void rsp_cop2_drc::vnor()
2775void rsp_cop2_drc::vnor()
27762776{
27772777   int op = m_op;
27782778
r241966r241967
28022802//
28032803// Bitwise XOR of two vector registers
28042804
2805inline void rsp_cop2_drc::vxor()
2805void rsp_cop2_drc::vxor()
28062806{
28072807   int op = m_op;
28082808
r241966r241967
28322832//
28332833// Bitwise NOT XOR of two vector registers
28342834
2835inline void rsp_cop2_drc::vnxor()
2835void rsp_cop2_drc::vnxor()
28362836{
28372837   int op = m_op;
28382838
r241966r241967
28622862//
28632863// Calculates reciprocal
28642864
2865inline void rsp_cop2_drc::vrcp()
2865void rsp_cop2_drc::vrcp()
28662866{
28672867   int op = m_op;
28682868
r241966r241967
29272927//
29282928// Calculates reciprocal low part
29292929
2930inline void rsp_cop2_drc::vrcpl()
2930void rsp_cop2_drc::vrcpl()
29312931{
29322932   int op = m_op;
29332933
r241966r241967
30123012//
30133013// Calculates reciprocal high part
30143014
3015inline void rsp_cop2_drc::vrcph()
3015void rsp_cop2_drc::vrcph()
30163016{
30173017   int op = m_op;
30183018
r241966r241967
30423042//
30433043// Moves element from vector to destination vector
30443044
3045inline void rsp_cop2_drc::vmov()
3045void rsp_cop2_drc::vmov()
30463046{
30473047   int op = m_op;
30483048
r241966r241967
30683068//
30693069// Calculates reciprocal square-root
30703070
3071inline void rsp_cop2_drc::vrsq()
3071void rsp_cop2_drc::vrsq()
30723072{
30733073   int op = m_op;
30743074
r241966r241967
31993199//
32003200// Calculates reciprocal square-root low part
32013201
3202inline void rsp_cop2_drc::vrsql()
3202void rsp_cop2_drc::vrsql()
32033203{
32043204   int op = m_op;
32053205
r241966r241967
32853285//
32863286// Calculates reciprocal square-root high part
32873287
3288inline void rsp_cop2_drc::vrsqh()
3288void rsp_cop2_drc::vrsqh()
32893289{
32903290   int op = m_op;
32913291
r241966r241967
35533553    Vector Flag Reading/Writing
35543554***************************************************************************/
35553555
3556inline void rsp_cop2_drc::mfc2()
3556void rsp_cop2_drc::mfc2()
35573557{
35583558   UINT32 op = m_op;
35593559   int el = (op >> 7) & 0xf;
r241966r241967
35683568   ((rsp_cop2 *)param)->mfc2();
35693569}
35703570
3571inline void rsp_cop2_drc::cfc2()
3571void rsp_cop2_drc::cfc2()
35723572{
35733573   UINT32 op = m_op;
35743574   if (RTREG)
r241966r241967
36333633}
36343634
36353635
3636inline void rsp_cop2_drc::mtc2()
3636void rsp_cop2_drc::mtc2()
36373637{
36383638   UINT32 op = m_op;
36393639   int el = (op >> 7) & 0xf;
r241966r241967
36473647}
36483648
36493649
3650inline void rsp_cop2_drc::ctc2()
3650void rsp_cop2_drc::ctc2()
36513651{
36523652   UINT32 op = m_op;
36533653   switch(RDREG)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team