Skip to content

Dashmips raises exception at running the following code #21

Description

@dcordb

The following code runs perfectly using SPIM emulator version 8.0:

.data
	abort: .word	object_abort

.text
	object_abort:
		jr $ra

	main:
		li $v0, 10
		syscall

Yet dashmips fails to execute it, giving the following exception:

Traceback (most recent call last):
  File "/home/daniel/.pyenv/versions/cool-compiler-2020/bin/dashmips", line 8, in <module>
    sys.exit(main())
  File "/home/daniel/.pyenv/versions/3.8.5/envs/cool-compiler-2020/lib/python3.8/site-packages/dashmips/__main__.py", line 186, in main
    ret_val = prog_args.func(prog_args)
  File "/home/daniel/.pyenv/versions/3.8.5/envs/cool-compiler-2020/lib/python3.8/site-packages/dashmips/__main__.py", line 32, in main_run
    program = preprocess(args.FILE, args=args.mips_args)
  File "/home/daniel/.pyenv/versions/3.8.5/envs/cool-compiler-2020/lib/python3.8/site-packages/dashmips/preprocessor.py", line 35, in preprocess
    data_labels(labels, unprocessed_labels, memory)
  File "/home/daniel/.pyenv/versions/3.8.5/envs/cool-compiler-2020/lib/python3.8/site-packages/dashmips/preprocessor.py", line 133, in data_labels
    raise MipsException(f"Symbol {pair[1]} not found in symbol table")
dashmips.utils.MipsException: Symbol object_abort not found in symbol table

I'm using python 3.8.5 and dashmips 0.1.10. Which specification of MIPS does dashmips support? I couldn't find this info anywhere.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions