Forum Discussion
Altera_Forum
Honored Contributor
22 years ago"div" instructions
Hi all,
/f configuration has hardware dvide instrucion. I checked this option, but it seems that compiler does not use "div" instruction. (I cannot find div instruction in *.opjbump file.) How can I do? Need some compiler option to use div instruction?9 Replies
- Altera_Forum
Honored Contributor
I was wondering the same thing. I think that the compiler recongnizes "/" as the hardware divide but don't quote me on that.
I really wish the object dump still had the associated C code that went with the instructions, because I find the new one to be a zoo of info that I either don't care about or can't figure out what it's telling me. I turned off the instruction emulation so I'm hoping that "/" called the hardware divide (just got done characterizing my timing). - Altera_Forum
Honored Contributor
It's a known bug. Already fixed in the upcoming release. Here was the workaround given...
Put the -mhw-div option into the IDE compiler flags, and lo and behold a div instruction appears. - Altera_Forum
Honored Contributor
Don't count on what I did utilizing the hardware divider (just removed it and did my timing tests and they did not change).
My question is the same koma's, how do you call it??? (from C code). - Altera_Forum
Honored Contributor
Opps didn't see the reply. Thanks!
- Altera_Forum
Honored Contributor
Thank you! Compiler use div instrtuction!
BTW, where can I find compiler option list? I'd like to know -m*** (machine depended option). - Altera_Forum
Honored Contributor
Here's what I do:
nios2-elf-gcc --help -v >& out Then I edit the file "out" and search for "Target specific". You'll see the -m options there. Kerry - Altera_Forum
Honored Contributor
Hi Kerri,
Thanks a lot! - Altera_Forum
Honored Contributor
Actually, that was KerrY.
A little confusing, but there's KerrI and KerrY. - Altera_Forum
Honored Contributor
Oh...I'm sorry both.
and Thanks KerrI and KerrY.