How can I perform 64-bit division with a 32-bit divide instruction?

前端 未结 2 864
鱼传尺愫
鱼传尺愫 2020-12-17 20:00

This is (AFAIK) a specific question within this general topic.

Here\'s the situation:

I have an embedded system (a video game console) based on a 32-bit RISC

2条回答
  •  鱼传尺愫
    2020-12-17 20:30

    GCC has such a routine for many processors, named _divdi3 (usually implemented using a common divmod call). Here's one. Some Unix kernels have an implementation too, e.g. FreeBSD.

提交回复
热议问题