588cb88ced
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see the file copying or write to the free software foundation inc extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 12 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190523091651.231300438@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
501 B
C
31 lines
501 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
*/
|
|
|
|
#include <linux/export.h>
|
|
|
|
#include <linux/libgcc.h>
|
|
|
|
word_type notrace __cmpdi2(long long a, long long b)
|
|
{
|
|
const DWunion au = {
|
|
.ll = a
|
|
};
|
|
const DWunion bu = {
|
|
.ll = b
|
|
};
|
|
|
|
if (au.s.high < bu.s.high)
|
|
return 0;
|
|
else if (au.s.high > 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;
|
|
}
|
|
EXPORT_SYMBOL(__cmpdi2);
|