swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: df0cc57e057f18e44dac8e6c18aba47ab53202f9 authored by Linus Torvalds on 09 January 2022, 22:55:34 UTC
Linux 5.16
Tip revision: df0cc57
cmpdi2.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);
back to top