Previous 199869 Revisions Next

r33846 Friday 12th December, 2014 at 17:28:48 UTC by David Haywood
arcompact (nw)
[src/emu/cpu/arcompact]arcompactdasm_ops.c

trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242357r242358
386386   return 4;
387387}
388388
389int arcompact_handle04_00_dasm(DASM_OPS_32)  { print("ADD (%08x)", op); return 4;}
390int arcompact_handle04_01_dasm(DASM_OPS_32)  { print("ADC (%08x)", op); return 4;}
391int arcompact_handle04_02_dasm(DASM_OPS_32)  { print("SUB (%08x)", op); return 4;}
392int arcompact_handle04_03_dasm(DASM_OPS_32)  { print("SBC (%08x)", op); return 4;}
393int arcompact_handle04_04_dasm(DASM_OPS_32)  { print("AND (%08x)", op); return 4;}
394int arcompact_handle04_05_dasm(DASM_OPS_32)  { print("OR (%08x)", op); return 4;}
395int arcompact_handle04_06_dasm(DASM_OPS_32)  { print("BIC (%08x)", op); return 4;}
396int arcompact_handle04_07_dasm(DASM_OPS_32)  { print("XOR (%08x)", op); return 4;}
397int arcompact_handle04_08_dasm(DASM_OPS_32)  { print("MAX (%08x)", op); return 4;}
398int arcompact_handle04_09_dasm(DASM_OPS_32)  { print("MIN (%08x)", op); return 4;}
399389
400int arcompact_handle04_0a_dasm(DASM_OPS_32)
390int arcompact_handle04_helper_dasm(char *output, offs_t pc, UINT32 op, const UINT8* oprom, const char* optext, int ignore_dst)
401391{
402392   //           PP
403393   // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
r242357r242358
409399   int breg = b | (B << 3);
410400   int F = (op & 0x00008000) >> 15;op &= ~0x00008000;
411401
412   output  += sprintf( output, "MOV");
402   output  += sprintf( output, "%s", optext);
413403   output  += sprintf( output, "%s", flagbit[F]);
414404   output  += sprintf( output, " p(%d)", p);
415405   output  += sprintf( output, " %s, ", regnames[breg]);
r242357r242358
426416         UINT32 limm;
427417         GET_LIMM_32;
428418         size = 8;   
429         output  += sprintf( output, "(%08x) A(%s)", limm, regnames[A]);
419         output  += sprintf( output, "(%08x) ", limm );
420         if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);
421         else  output  += sprintf( output, "unused(%s)", regnames[A]);     
430422      }
431423      else
432424      {
433         output  += sprintf( output, "C(%s) A(%s)", regnames[C], regnames[A]);
425         output  += sprintf( output, "C(%s) ", regnames[C]);
426         if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);
427         else  output  += sprintf( output, "unused(%s)", regnames[A]);     
428
434429      }
435430   }
436431   else if (p == 1)
r242357r242358
439434      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
440435      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
441436
442      output  += sprintf( output, "U(%02x) A(%s)", U, regnames[A]);
443
437      output  += sprintf( output, "U(%02x) ", U );
438      if (!ignore_dst) output  += sprintf( output, "A(%s)", regnames[A]);         
439      else  output  += sprintf( output, "unused(%s)", regnames[A]);     
444440   }
445441   else if (p == 2)
446442   {
r242357r242358
474470   return size;
475471}
476472
473int arcompact_handle04_00_dasm(DASM_OPS_32) 
474{
475   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD", 0);
476}
477477
478int arcompact_handle04_0b_dasm(DASM_OPS_32)  { print("TST (%08x)", op); return 4;}
479int arcompact_handle04_0c_dasm(DASM_OPS_32)  { print("CMP (%08x)", op); return 4;}
480int arcompact_handle04_0d_dasm(DASM_OPS_32)  { print("RCMP (%08x)", op); return 4;}
481int arcompact_handle04_0e_dasm(DASM_OPS_32)  { print("RSUB (%08x)", op); return 4;}
482int arcompact_handle04_0f_dasm(DASM_OPS_32)  { print("BSET (%08x)", op); return 4;}
483int arcompact_handle04_10_dasm(DASM_OPS_32)  { print("BCLR (%08x)", op); return 4;}
484int arcompact_handle04_11_dasm(DASM_OPS_32)  { print("BTST (%08x)", op); return 4;}
485int arcompact_handle04_12_dasm(DASM_OPS_32)  { print("BXOR (%08x)", op); return 4;}
486int arcompact_handle04_13_dasm(DASM_OPS_32)  { print("BMSK (%08x)", op); return 4;}
487int arcompact_handle04_14_dasm(DASM_OPS_32)  { print("ADD1 (%08x)", op); return 4;}
488int arcompact_handle04_15_dasm(DASM_OPS_32)  { print("ADD2 (%08x)", op); return 4;}
489int arcompact_handle04_16_dasm(DASM_OPS_32)  { print("ADD3 (%08x)", op); return 4;}
490int arcompact_handle04_17_dasm(DASM_OPS_32)  { print("SUB1 (%08x)", op); return 4;}
491int arcompact_handle04_18_dasm(DASM_OPS_32)  { print("SUB2 (%08x)", op); return 4;}
492int arcompact_handle04_19_dasm(DASM_OPS_32)  { print("SUB3 (%08x)", op); return 4;}
493int arcompact_handle04_1a_dasm(DASM_OPS_32)  { print("MPY (%08x)", op); return 4;} // *
494int arcompact_handle04_1b_dasm(DASM_OPS_32)  { print("MPYH (%08x)", op); return 4;} // *
495int arcompact_handle04_1c_dasm(DASM_OPS_32)  { print("MPYHU (%08x)", op); return 4;} // *
496int arcompact_handle04_1d_dasm(DASM_OPS_32)  { print("MPYU (%08x)", op); return 4;} // *
478int arcompact_handle04_01_dasm(DASM_OPS_32) 
479{
480   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADC", 0);
481}
497482
483int arcompact_handle04_02_dasm(DASM_OPS_32) 
484{
485   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB", 0);
486}
498487
488int arcompact_handle04_03_dasm(DASM_OPS_32) 
489{
490   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SBC", 0);
491}
499492
493int arcompact_handle04_04_dasm(DASM_OPS_32) 
494{
495   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "AND", 0);
496}
497
498int arcompact_handle04_05_dasm(DASM_OPS_32) 
499{
500   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "OR", 0);
501}
502
503int arcompact_handle04_06_dasm(DASM_OPS_32) 
504{
505   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BIC", 0);
506}
507
508int arcompact_handle04_07_dasm(DASM_OPS_32) 
509{
510   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "XOR", 0);
511}
512
513int arcompact_handle04_08_dasm(DASM_OPS_32) 
514{
515   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MAX", 0);
516}
517
518int arcompact_handle04_09_dasm(DASM_OPS_32)
519{
520   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MIN", 0);
521}
522
523
524int arcompact_handle04_0a_dasm(DASM_OPS_32)
525{
526   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MOV", 1);
527}
528
529int arcompact_handle04_0b_dasm(DASM_OPS_32)
530{
531   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "TST", 1);
532}
533
534int arcompact_handle04_0c_dasm(DASM_OPS_32)
535{
536   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "CMP", 1);
537}
538
539int arcompact_handle04_0d_dasm(DASM_OPS_32)
540{
541   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RCMP", 1);
542}
543
544int arcompact_handle04_0e_dasm(DASM_OPS_32)
545{
546   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "RSUB", 0);
547}
548
549int arcompact_handle04_0f_dasm(DASM_OPS_32) 
550{
551   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BSET", 0);
552}
553
554int arcompact_handle04_10_dasm(DASM_OPS_32) 
555{
556   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BCLR", 0);
557}
558
559int arcompact_handle04_11_dasm(DASM_OPS_32) 
560{
561   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BTST", 0);
562}
563
564int arcompact_handle04_12_dasm(DASM_OPS_32) 
565{
566   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BXOR", 0);
567}
568
569int arcompact_handle04_13_dasm(DASM_OPS_32) 
570{
571   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "BMSK", 0);
572}
573
574int arcompact_handle04_14_dasm(DASM_OPS_32) 
575{
576   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD1", 0);
577}
578
579int arcompact_handle04_15_dasm(DASM_OPS_32) 
580{
581   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD2", 0);
582}
583
584int arcompact_handle04_16_dasm(DASM_OPS_32) 
585{
586   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "ADD3", 0);
587}
588
589int arcompact_handle04_17_dasm(DASM_OPS_32) 
590{
591   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB1", 0);
592}
593
594int arcompact_handle04_18_dasm(DASM_OPS_32) 
595{
596   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB2", 0);
597}
598
599int arcompact_handle04_19_dasm(DASM_OPS_32) 
600{
601   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "SUB3", 0);
602}
603
604int arcompact_handle04_1a_dasm(DASM_OPS_32) 
605{
606   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPY", 0);
607} // *
608
609int arcompact_handle04_1b_dasm(DASM_OPS_32) 
610{
611   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYH", 0);
612} // *
613
614int arcompact_handle04_1c_dasm(DASM_OPS_32) 
615{
616   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYHU", 0);
617} // *
618
619int arcompact_handle04_1d_dasm(DASM_OPS_32) 
620{
621   return arcompact_handle04_helper_dasm(output, pc, op, oprom, "MPYU", 0);
622} // *
623
624
625
500626int arcompact_handle04_20_dasm(DASM_OPS_32)
501627{
502628   // todo, other bits (in none long immediate mode at least)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team