mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 19:12:36 +00:00
We are having build failure with m32r and the error message being: ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined! ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined! ERROR: "__ucmpdi2" [drivers/scsi/sd_mod.ko] undefined! ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined! ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined! ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined! __ucmpdi2 is introduced to m32r architecture taking example from other architectures like h8300, microblaze, mips. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
18 lines
435 B
C
18 lines
435 B
C
#include "libgcc.h"
|
|
|
|
int __ucmpdi2(unsigned long long a, unsigned long long b)
|
|
{
|
|
const DWunion au = {.ll = a};
|
|
const DWunion bu = {.ll = b};
|
|
|
|
if ((unsigned int)au.s.high < (unsigned int)bu.s.high)
|
|
return 0;
|
|
else if ((unsigned int)au.s.high > (unsigned int)bu.s.high)
|
|
return 2;
|
|
if ((unsigned int)au.s.low < (unsigned int)bu.s.low)
|
|
return 0;
|
|
else if ((unsigned int)au.s.low > (unsigned int)bu.s.low)
|
|
return 2;
|
|
return 1;
|
|
}
|