mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-01 14:28:02 +03:00
Made DSPTool more informative and actually fail when compile fails (right now it kept creating invalid files)
Also, created an example test which uses the INCLUDE directive. Tests are much shorter and human-readable now! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3064 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
92e6d7c283
commit
e0a202b7ef
4 changed files with 388 additions and 3 deletions
|
@ -210,7 +210,8 @@ int main(int argc, const char *argv[])
|
|||
{
|
||||
if(argc == 1 || (argc == 2 && (!strcmp(argv[1], "--help") || (!strcmp(argv[1], "-?")))))
|
||||
{
|
||||
printf("USAGE: DSPTool [-d] [-o <FILE>] [-h <FILE>] <DSP ASSEMBLER FILE>\n");
|
||||
printf("USAGE: DSPTool [-?] [--help] [-d] [-o <FILE>] [-h <FILE>] <DSP ASSEMBLER FILE>\n");
|
||||
printf("-? / --help: Prints this message\n");
|
||||
printf("-d: Disassemble\n");
|
||||
printf("-o <OUTPUT FILE>: Results from stdout redirected to a file\n");
|
||||
printf("-h <HEADER FILE>: Output assembly results to a header\n");
|
||||
|
@ -292,7 +293,10 @@ int main(int argc, const char *argv[])
|
|||
if (File::ReadFileToString(true, input_name.c_str(), &source))
|
||||
{
|
||||
std::vector<u16> code;
|
||||
Assemble(source.c_str(), &code);
|
||||
if(!Assemble(source.c_str(), &code)) {
|
||||
printf("Assemble: Assembly failed due to errors\n");
|
||||
return 1;
|
||||
}
|
||||
if (!output_name.empty())
|
||||
{
|
||||
std::string binary_code;
|
||||
|
@ -307,5 +311,8 @@ int main(int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("Assembly completed successfully!\n");
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue