diff --git a/ee/elf-loader/src/elf.c b/ee/elf-loader/src/elf.c index f709f3b7610..58bed46f1bd 100644 --- a/ee/elf-loader/src/elf.c +++ b/ee/elf-loader/src/elf.c @@ -77,7 +77,7 @@ int LoadELFFromFileWithPartition(const char *filename, const char *partition, in boot_elf = (u8 *)loader_elf; eh = (elf_header_t *)boot_elf; if (_lw((u32)&eh->ident) != ELF_MAGIC) - asm volatile("break\n"); + __builtin_trap(); eph = (elf_pheader_t *)(boot_elf + eh->phoff); diff --git a/iop/system/loadcore/src/loadcore.c b/iop/system/loadcore/src/loadcore.c index 7ce23d0a170..f9e39b646a1 100644 --- a/iop/system/loadcore/src/loadcore.c +++ b/iop/system/loadcore/src/loadcore.c @@ -1313,7 +1313,7 @@ static void loadrelelf(const void *module, FileInfo_t *ModuleInfo) u32 entsize; entsize = CurrentELF_shdr->entsize; if ( !entsize ) - __asm__ __volatile__("\tbreak\n"); + __builtin_trap(); NumRelocs = CurrentELF_shdr->size / entsize; ApplyElfRelSection(ModuleInfo->text_start, (const elf_rel *)((u8 *)module + CurrentELF_shdr->offset), NumRelocs); } diff --git a/iop/system/modload/src/modload.c b/iop/system/modload/src/modload.c index fb1bf5d4c1c..635a3babf56 100644 --- a/iop/system/modload/src/modload.c +++ b/iop/system/modload/src/modload.c @@ -1018,10 +1018,10 @@ static int modload_post_boot_callback(iop_init_entry_t *next, int delayed) module_result = ((int (*)(int, char **, u32, ModuleInfo_t *))module_info->entry)(updater_argc, updater_argv, 0, module_info); printf("return from updater '%s' return value = %d\n", updater_argv[0], module_result); - __asm__ __volatile__("\tbreak\n"); + __builtin_trap(); } printf("updater '%s' can't load\n", updater_argv[0]); - __asm__ __volatile__("\tbreak\n"); + __builtin_trap(); } printf("Reboot fail! need file name argument\n"); return 0; @@ -1404,7 +1404,7 @@ do_load_seek(module_thread_args_t *mltargs, int module_fd, FileInfo_t *fi, int * break; entsize = elfshdr[i].entsize; if ( !entsize ) - __asm__ __volatile__("\tbreak\n"); + __builtin_trap(); ApplyElfRelSection(fi->text_start, modulearea, elfshdr[i].size / entsize); } break; diff --git a/iop/system/sifcmd/src/sifrpc.c b/iop/system/sifcmd/src/sifrpc.c index b2cba0abc45..318239a44b2 100644 --- a/iop/system/sifcmd/src/sifrpc.c +++ b/iop/system/sifcmd/src/sifrpc.c @@ -178,7 +178,7 @@ static void *sif_rpc_get_fpacket(sif_rpc_data_t *rpc_data) rdata_table_len = rpc_data->rdata_table_len; index_calc = rdata_table_idx % rdata_table_len; if ( rdata_table_len == -1 && (u32)rdata_table_idx == 0x80000000 ) - __asm__("break\n"); + __builtin_trap(); rpc_data->rdata_table_idx = index_calc + 1; return &rpc_data->rdata_table[64 * index_calc]; } diff --git a/iop/system/threadman/src/thbase.c b/iop/system/threadman/src/thbase.c index 4c078e54efb..c2b59931686 100644 --- a/iop/system/threadman/src/thbase.c +++ b/iop/system/threadman/src/thbase.c @@ -229,7 +229,7 @@ int ExitThread() thread_leave(0, 0, state, 1); Kprintf("panic ! Thread DORMANT !\n"); - asm __volatile__("break 1"); + __builtin_trap(); return KE_OK; } @@ -249,7 +249,7 @@ int ExitDeleteThread() thread_leave(0, 0, state, 1); Kprintf("panic ! Thread ExitDeleted !\n"); - asm __volatile__("break 1"); + __builtin_trap(); return KE_OK; } diff --git a/iop/system/threadman/src/thcommon.c b/iop/system/threadman/src/thcommon.c index 6389de4112f..9c502dfdbd8 100644 --- a/iop/system/threadman/src/thcommon.c +++ b/iop/system/threadman/src/thcommon.c @@ -314,7 +314,7 @@ void report_stack_overflow(struct thread *thread) } } - asm __volatile__("break 1"); + __builtin_trap(); } void do_delete_thread() diff --git a/iop/system/udnl/src/udnl.c b/iop/system/udnl/src/udnl.c index 5d789908e94..f9ccdd7ee65 100644 --- a/iop/system/udnl/src/udnl.c +++ b/iop/system/udnl/src/udnl.c @@ -287,7 +287,7 @@ static void ScanImagesForFile(const struct ImageData *ImageDataBuffer, unsigned #else printf("panic ! \'%s\' not found\n", filename); #endif - __asm("break\n"); + __builtin_trap(); } #ifdef UDNL_T300 @@ -982,7 +982,7 @@ static void ParseIOPBTCONF(const struct ImageData *ImageDataBuffer, unsigned int DisplayModuleName(ResetData->NumModules, ptr); // Code for debugging only - not originally present. #endif if (SelectModuleFromImages(ImageDataBuffer, NumFiles, ptr, &ModuleFileStat) == NULL) { - __asm("break\n"); + __builtin_trap(); } ModList[NumModules] = ModuleFileStat.data; @@ -1102,7 +1102,7 @@ int _start(int argc, char *argv[]) } #endif SleepThread(); - __asm("break"); + __builtin_trap(); } } */ @@ -1119,7 +1119,7 @@ int _start(int argc, char *argv[]) } #endif SleepThread(); - __asm("break"); + __builtin_trap(); } file_sz = lseek(fd, 0, SEEK_END); @@ -1159,7 +1159,7 @@ int _start(int argc, char *argv[]) } #endif SleepThread(); - __asm("break"); + __builtin_trap(); } ResetData = buffer;