/[qemu]/qemu/dyngen.c
ViewVC logotype

Diff of /qemu/dyngen.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by bellard, Mon Jun 30 23:36:57 2003 UTC revision 1.26 by bellard, Fri Jul 11 15:16:56 2003 UTC
# Line 1306  fprintf(outfile, Line 1306  fprintf(outfile,
1306  " the_end:\n"  " the_end:\n"
1307  );  );
1308    
1309  /* generate epilogue */  /* generate some code patching */
1310      switch(ELF_ARCH) {  #ifdef HOST_ARM
1311      case EM_386:  fprintf(outfile, "gen_code_ptr = arm_flush_ldr(gen_code_ptr, arm_ldr_table, arm_ldr_ptr, arm_data_table, arm_data_ptr, 0);\n");
1312          fprintf(outfile, "*gen_code_ptr++ = 0xc3; /* ret */\n");  #endif
         break;  
     case EM_PPC:  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x4e800020; /* blr */\n");  
         break;  
     case EM_S390:  
         fprintf(outfile, "*((uint16_t *)gen_code_ptr)++ = 0x07fe; /* br %%r14 */\n");  
         break;  
     case EM_ALPHA:  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x6bfa8001; /* ret */\n");  
         break;  
     case EM_IA_64:  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x00840008; /* br.ret.sptk.many b0;; */\n");  
         break;  
     case EM_SPARC:  
     case EM_SPARC32PLUS:  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x81c62008; /* jmpl %%i0 + 8, %%g0 */\n");  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x01000000; /* nop */\n");  
         break;  
     case EM_SPARCV9:  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x81c7e008; /* ret */\n");  
         fprintf(outfile, "*((uint32_t *)gen_code_ptr)++ = 0x81e80000; /* restore */\n");  
         break;  
     case EM_ARM:  
         fprintf(outfile, "gen_code_ptr = arm_flush_ldr(gen_code_ptr, arm_ldr_table, arm_ldr_ptr, arm_data_table, arm_data_ptr, 0);\n");  
         break;  
     default:  
         error("unknown ELF architecture");  
     }  
1313      /* flush instruction cache */      /* flush instruction cache */
1314      fprintf(outfile, "flush_icache_range((unsigned long)gen_code_buf, (unsigned long)gen_code_ptr);\n");      fprintf(outfile, "flush_icache_range((unsigned long)gen_code_buf, (unsigned long)gen_code_ptr);\n");
1315    

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26