swh:1:snp:49cd9498d6cccc5e78252c27dcb645bcf7bf0c91
Raw File
Tip revision: 4a3928c6f8a53fa1aed28ccba227742486e8ddcb authored by Linus Torvalds on 26 February 2018, 02:50:41 UTC
Linux 4.16-rc3
Tip revision: 4a3928c
ucmpdi2.c
// SPDX-License-Identifier: GPL-2.0
#include "libgcc.h"

word_type __ucmpdi2(DWtype a, DWtype b)
{
	const DWunion au = {.ll = a};
	const DWunion bu = {.ll = b};

	if ((UWtype) au.s.high < (UWtype) bu.s.high)
		return 0;
	else if ((UWtype) au.s.high > (UWtype) bu.s.high)
		return 2;
	if ((UWtype) au.s.low < (UWtype) bu.s.low)
		return 0;
	else if ((UWtype) au.s.low > (UWtype) bu.s.low)
		return 2;
	return 1;
}
back to top