📄 y.tab.c
字号:
#define Y_NMSUB_D_OP 471#define Y_NMSUB_PS_OP 472#define Y_NMSUB_S_OP 473#define Y_NOR_OP 474#define Y_OR_OP 475#define Y_ORI_OP 476#define Y_PFW_OP 477#define Y_PLL_PS_OP 478#define Y_PLU_PS_OP 479#define Y_PREF_OP 480#define Y_PREFX_OP 481#define Y_PUL_PS_OP 482#define Y_PUU_PS_OP 483#define Y_RDHWR_OP 484#define Y_RDPGPR_OP 485#define Y_RECIP_D_OP 486#define Y_RECIP_S_OP 487#define Y_RFE_OP 488#define Y_ROTR_OP 489#define Y_ROTRV_OP 490#define Y_ROUND_L_D_OP 491#define Y_ROUND_L_S_OP 492#define Y_ROUND_W_D_OP 493#define Y_ROUND_W_S_OP 494#define Y_RSQRT_D_OP 495#define Y_RSQRT_S_OP 496#define Y_SB_OP 497#define Y_SC_OP 498#define Y_SDBBP_OP 499#define Y_SDC1_OP 500#define Y_SDC2_OP 501#define Y_SDXC1_OP 502#define Y_SEB_OP 503#define Y_SEH_OP 504#define Y_SH_OP 505#define Y_SLL_OP 506#define Y_SLLV_OP 507#define Y_SLT_OP 508#define Y_SLTI_OP 509#define Y_SLTIU_OP 510#define Y_SLTU_OP 511#define Y_SQRT_D_OP 512#define Y_SQRT_S_OP 513#define Y_SRA_OP 514#define Y_SRAV_OP 515#define Y_SRL_OP 516#define Y_SRLV_OP 517#define Y_SSNOP_OP 518#define Y_SUB_D_OP 519#define Y_SUB_OP 520#define Y_SUB_PS_OP 521#define Y_SUB_S_OP 522#define Y_SUBU_OP 523#define Y_SUXC1_OP 524#define Y_SW_OP 525#define Y_SWC1_OP 526#define Y_SWC2_OP 527#define Y_SWL_OP 528#define Y_SWR_OP 529#define Y_SWXC1_OP 530#define Y_SYNC_OP 531#define Y_SYNCI_OP 532#define Y_SYSCALL_OP 533#define Y_TEQ_OP 534#define Y_TEQI_OP 535#define Y_TGE_OP 536#define Y_TGEI_OP 537#define Y_TGEIU_OP 538#define Y_TGEU_OP 539#define Y_TLBP_OP 540#define Y_TLBR_OP 541#define Y_TLBWI_OP 542#define Y_TLBWR_OP 543#define Y_TLT_OP 544#define Y_TLTI_OP 545#define Y_TLTIU_OP 546#define Y_TLTU_OP 547#define Y_TNE_OP 548#define Y_TNEI_OP 549#define Y_TRUNC_L_D_OP 550#define Y_TRUNC_L_S_OP 551#define Y_TRUNC_W_D_OP 552#define Y_TRUNC_W_S_OP 553#define Y_WRPGPR_OP 554#define Y_WSBH_OP 555#define Y_XOR_OP 556#define Y_XORI_OP 557#define Y_ABS_POP 558#define Y_B_POP 559#define Y_BAL_POP 560#define Y_BEQZ_POP 561#define Y_BGE_POP 562#define Y_BGEU_POP 563#define Y_BGT_POP 564#define Y_BGTU_POP 565#define Y_BLE_POP 566#define Y_BLEU_POP 567#define Y_BLT_POP 568#define Y_BLTU_POP 569#define Y_BNEZ_POP 570#define Y_LA_POP 571#define Y_LD_POP 572#define Y_L_D_POP 573#define Y_L_S_POP 574#define Y_LI_D_POP 575#define Y_LI_POP 576#define Y_LI_S_POP 577#define Y_MFC1_D_POP 578#define Y_MOVE_POP 579#define Y_MTC1_D_POP 580#define Y_MULO_POP 581#define Y_MULOU_POP 582#define Y_NEG_POP 583#define Y_NEGU_POP 584#define Y_NOP_POP 585#define Y_NOT_POP 586#define Y_REM_POP 587#define Y_REMU_POP 588#define Y_ROL_POP 589#define Y_ROR_POP 590#define Y_S_D_POP 591#define Y_S_S_POP 592#define Y_SD_POP 593#define Y_SEQ_POP 594#define Y_SGE_POP 595#define Y_SGEU_POP 596#define Y_SGT_POP 597#define Y_SGTU_POP 598#define Y_SLE_POP 599#define Y_SLEU_POP 600#define Y_SNE_POP 601#define Y_ULH_POP 602#define Y_ULHU_POP 603#define Y_ULW_POP 604#define Y_USH_POP 605#define Y_USW_POP 606#define Y_ALIAS_DIR 607#define Y_ALIGN_DIR 608#define Y_ASCII_DIR 609#define Y_ASCIIZ_DIR 610#define Y_ASM0_DIR 611#define Y_BGNB_DIR 612#define Y_BYTE_DIR 613#define Y_COMM_DIR 614#define Y_DATA_DIR 615#define Y_DOUBLE_DIR 616#define Y_END_DIR 617#define Y_ENDB_DIR 618#define Y_ENDR_DIR 619#define Y_ENT_DIR 620#define Y_ERR_DIR 621#define Y_EXTERN_DIR 622#define Y_FILE_DIR 623#define Y_FLOAT_DIR 624#define Y_FMASK_DIR 625#define Y_FRAME_DIR 626#define Y_GLOBAL_DIR 627#define Y_HALF_DIR 628#define Y_K_DATA_DIR 629#define Y_K_TEXT_DIR 630#define Y_LABEL_DIR 631#define Y_LCOMM_DIR 632#define Y_LIVEREG_DIR 633#define Y_LOC_DIR 634#define Y_MASK_DIR 635#define Y_NOALIAS_DIR 636#define Y_OPTIONS_DIR 637#define Y_RDATA_DIR 638#define Y_REPEAT_DIR 639#define Y_SDATA_DIR 640#define Y_SET_DIR 641#define Y_SPACE_DIR 642#define Y_STRUCT_DIR 643#define Y_TEXT_DIR 644#define Y_VERSTAMP_DIR 645#define Y_VREG_DIR 646#define Y_WORD_DIR 647/* Copy the first part of user declarations. */#line 432 "d:\\Jim\\Software\\Spim\\Cpu\\parser.y"#include <stdio.h>#include "spim.h"#include "string-stream.h"#include "spim-utils.h"#include "inst.h"#include "reg.h"#include "mem.h"#include "sym-tbl.h"#include "data.h"#include "scanner.h"#include "parser.h"/* return (0) */#define LINE_PARSE_DONE YYACCEPT/* return (1) */#define FILE_PARSE_DONE YYABORTtypedef struct ll{ label *head; struct ll *tail;} label_list;/* Exported Variables: */int data_dir; /* Non-zero means item in data segment */int text_dir; /* Non-zero means item in text segment */int parse_error_occurred; /* Non-zero => parse resulted in error *//* Local functions: */static imm_expr *branch_offset (int n_inst);static int cc_to_rt (int cc, int nd, int tf);static void check_imm_range (imm_expr*, int32, int32);static void check_uimm_range (imm_expr*, uint32, uint32);static void clear_labels ();static label_list *cons_label (label *head, label_list *tail);static void div_inst (int op, int rd, int rs, int rt, int const_divisor);static void mips32_r2_inst ();static void mult_inst (int op, int rd, int rs, int rt);static void nop_inst ();static void set_eq_inst (int op, int rd, int rs, int rt);static void set_ge_inst (int op, int rd, int rs, int rt);static void set_gt_inst (int op, int rd, int rs, int rt);static void set_le_inst (int op, int rd, int rs, int rt);static void store_word_data (int value);static void trap_inst ();static void yywarn (char*);/* Local variables: */static int null_term; /* Non-zero means string terminate by \0 */static void (*store_op) (); /* Function to store items in an EXPR_LST */static label_list *this_line_labels = NULL; /* List of label for curent line */static int noat_flag = 0; /* Non-zero means program can use $1 */static char *input_file_name; /* Name of file being parsed *//* Enabling traces. */#ifndef YYDEBUG# define YYDEBUG 0#endif/* Enabling verbose error messages. */#ifdef YYERROR_VERBOSE# undef YYERROR_VERBOSE# define YYERROR_VERBOSE 1#else# define YYERROR_VERBOSE 0#endif#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)typedef int YYSTYPE;# define yystype YYSTYPE /* obsolescent; will be withdrawn */# define YYSTYPE_IS_DECLARED 1# define YYSTYPE_IS_TRIVIAL 1#endif/* Copy the second part of user declarations. *//* Line 214 of yacc.c. */#line 943 "y.tab.c"#if ! defined (yyoverflow) || YYERROR_VERBOSE/* The parser invokes alloca or malloc; define the necessary symbols. */# if YYSTACK_USE_ALLOCA# define YYSTACK_ALLOC alloca# else# ifndef YYSTACK_USE_ALLOCA# if defined (alloca) || defined (_ALLOCA_H)# define YYSTACK_ALLOC alloca# else# ifdef __GNUC__# define YYSTACK_ALLOC __builtin_alloca# endif# endif# endif# endif# ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)# else# if defined (__STDC__) || defined (__cplusplus)# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */# define YYSIZE_T size_t# endif# define YYSTACK_ALLOC malloc# define YYSTACK_FREE free# endif#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */#if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYSTYPE_IS_TRIVIAL)))/* A type that is properly aligned for any stack member. */union yyalloc{ short yyss; YYSTYPE yyvs; };/* The size of the maximum gap between one aligned stack and the next. */# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)/* The size of an array large to enough to hold all stacks, each with
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -