public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kerrick Staley <mail@kerrickstaley.com>
To: gcc-help@gcc.gnu.org
Subject: Issues with gcc -S output format
Date: Thu, 10 Nov 2011 00:19:00 -0000	[thread overview]
Message-ID: <CANaWP3wWx05cJC=4SiLZYX-AWoRrNqtA7pU9dgC-wzUP9snJNQ@mail.gmail.com> (raw)

Hello. I am designing a MIPS processor in VHDL as part of a class, and
I would like to compile and run several programs on this processor in
order to test them.

I can successfully compile the programs and convert them into a raw
binary format for use with the processor I designed, but I now need to
also run the programs on the MARS simulator in order to check the
accuracy of my processor implementation.  The MARS simulator will only
accept assembly source code as input (and not raw binary or object
files), so I tried using -S to produce the assembly code for the
programs. The problem is that MARS does not understand macros such as
%lo and %hi (although it does have basic support for directives), so
the code won't run. I also tried using objdump to disassemble the
object file, but it inserts a bunch of extra junk such as instruction
addresses.

How can I get the raw assembly code in a simple format (that MARS can parse)?

Thanks,
Kerrick Staley

             reply	other threads:[~2011-11-09 23:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10  0:19 Kerrick Staley [this message]
2011-11-10 13:19 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANaWP3wWx05cJC=4SiLZYX-AWoRrNqtA7pU9dgC-wzUP9snJNQ@mail.gmail.com' \
    --to=mail@kerrickstaley.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).