Home | History | Annotate | Download | only in bfd

Lines Matching refs:code

51 #define IS_PAGE_OPCODE(code) \
52 ip2k_is_opcode (code, ip2k_page_opcode)
60 #define IS_JMP_OPCODE(code) \
61 ip2k_is_opcode (code, ip2k_jmp_opcode)
69 #define IS_SNC_OPCODE(code) \
70 ip2k_is_opcode (code, ip2k_snc_opcode)
78 #define IS_INC_1SP_OPCODE(code) \
79 ip2k_is_opcode (code, ip2k_inc_1sp_opcode)
87 #define IS_ADD_2SP_W_OPCODE(code) \
88 ip2k_is_opcode (code, ip2k_add_2sp_w_opcode)
97 #define IS_ADD_W_WREG_OPCODE(code) \
98 ip2k_is_opcode (code, ip2k_add_w_wreg_opcode)
106 #define IS_ADD_PCL_W_OPCODE(code) \
107 ip2k_is_opcode (code, ip2k_add_pcl_w_opcode)
122 #define IS_SKIP_OPCODE(code) \
123 ip2k_is_opcode (code, ip2k_skip_opcodes)
179 bfd_reloc_code_real_type code)
186 switch (code)
251 ip2k_is_opcode (bfd_byte *code, const struct ip2k_opcode *opcodes)
253 unsigned short insn = (code[0] << 8) | code[1];
348 bfd_byte code[4];
355 ip2k_get_mem (abfd, contents + addr, 4, code);
357 if ((! IS_PAGE_OPCODE (code + 0))
358 || (! IS_JMP_OPCODE (code + 2)))
368 ip2k_get_mem (abfd, contents + addr - 4, 4, code);
369 if ((IS_ADD_W_WREG_OPCODE (code + 0))
370 && (IS_ADD_PCL_W_OPCODE (code + 2)))
373 if ((! IS_PAGE_OPCODE (code + 0))
374 || (! IS_JMP_OPCODE (code + 2)))
428 bfd_byte code[16];
435 ip2k_get_mem (abfd, contents + addr, 4, code);
436 if ((! IS_PAGE_OPCODE (code + 0))
437 || (! IS_JMP_OPCODE (code + 2)))
447 ip2k_get_mem (abfd, contents + addr - 16, 16, code);
448 if ((IS_ADD_W_WREG_OPCODE (code + 0))
449 && (IS_SNC_OPCODE (code + 2))
450 && (IS_INC_1SP_OPCODE (code + 4))
451 && (IS_ADD_2SP_W_OPCODE (code + 6))
452 && (IS_SNC_OPCODE (code + 8))
453 && (IS_INC_1SP_OPCODE (code + 10))
454 && (IS_PAGE_OPCODE (code + 12))
455 && (IS_JMP_OPCODE (code + 14)))
458 if ((IS_ADD_W_WREG_OPCODE (code + 2))
459 && (IS_SNC_OPCODE (code + 4))
460 && (IS_INC_1SP_OPCODE (code + 6))
461 && (IS_ADD_2SP_W_OPCODE (code + 8))
462 && (IS_SNC_OPCODE (code + 10))
463 && (IS_INC_1SP_OPCODE (code + 12))
464 && (IS_JMP_OPCODE (code + 14)))
467 if ((! IS_PAGE_OPCODE (code + 0))
468 || (! IS_JMP_OPCODE (code + 2)))
500 bfd_byte code[2];
503 ip2k_get_mem (abfd, contents + addr, 2, code);
504 if (!IS_PAGE_OPCODE (code))
519 ip2k_get_mem (abfd, contents + addr - 2, 2, code);
520 if (IS_SKIP_OPCODE (code))
837 bfd_byte code[4];
847 ip2k_get_mem (abfd, misc->contents + addr, 4, code);
848 if ((! IS_PAGE_OPCODE (code + 0))
849 || (! IS_JMP_OPCODE (code + 2)))
875 ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 4, code);
876 if ((! IS_ADD_W_WREG_OPCODE (code + 0))
877 || (! IS_ADD_PCL_W_OPCODE (code + 2)))
908 bfd_byte code[12];
919 ip2k_get_mem (abfd, misc->contents + addr, 4, code);
921 if ((! IS_PAGE_OPCODE (code + 0))
922 || (! IS_JMP_OPCODE (code + 2)))
948 ip2k_get_mem (abfd, misc->contents + irel->r_offset - 4, 2, code);
949 if (IS_PAGE_OPCODE (code))
954 ip2k_get_mem (abfd, misc->contents + addr, 12, code);
955 if ((!IS_ADD_W_WREG_OPCODE (code + 0))
956 || (!IS_SNC_OPCODE (code + 2))
957 || (!IS_INC_1SP_OPCODE (code + 4))
958 || (!IS_ADD_2SP_W_OPCODE (code + 6))
959 || (!IS_SNC_OPCODE (code + 8))
960 || (!IS_INC_1SP_OPCODE (code + 10)))
1007 already been processed. Remember that there is code flow
1056 code will fit into this page - repeat until nothing more can be achieved
1098 not a code section. */