Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8773241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:14:40+00:00 2026-06-13T18:14:40+00:00

I know that to compile to assembly, I should use the -S option with

  • 0

I know that to compile to assembly, I should use the -Soption with gcc or g++, but how do I get MIPS assembly?

I tried

g++ -march=mips2 dll.c 

but that gives the error

dll.c:1:0: error: bad value (mips2) for -march= switch

I saw a suggestion of the compile command mips_gcc, but I can’t find how to install that compiler.

I’m using Ubuntu 64-bit, if that helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:14:41+00:00Added an answer on June 13, 2026 at 6:14 pm

    You need a version of gcc that is built as a MIPS cross compiler. You can download the free Mentor/Codesourcery MIPS gnu/gcc cross compilation tool chain from here. This toolchain is available for both Windows and Linux.

    After downloading, installing and adding the tool chain to your path you would say:

    mips-linux-gnu-g++ -march=mips32r2 -S dll.c
    

    to compile your code to MIPS32R2 assembly.

    UPDATE 8/2017:
    It looks like Sourcery CodeBench free cross compiler for MIPS is no longer available at Mentor’s site.
    Try the free toolchain at Imagination’s site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that c++ code should be compiled and linked by g++, not gcc.
I know that it is possible to add swf metadata to the compile command
Yes, I know that downcast using dynamic_cast can't compile if the Base is not
I'm trying to compile a project that uses both libjpeg and libpng. I know
I know that C++11 provides <atomic> , but this isn't implemented by any compiler
I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I have some trouble with some inline assembly code. I know what should be
I have several large code bases which compile into dynamic libraries. I know that
I am trying to use a thread local variable in inline assembly, but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.