ref: 37d68b18e213ef6d551f6386f3f7038c381bfdf1
dir: /sys/src/libmp/port/mpfield.c/
#include "os.h"
#include <mp.h>
#include "dat.h"
mpint*
mpfield(mpint *N)
{
	Mfield *f;
	if(N == nil || N->flags & (MPfield|MPstatic))
		return N;
	if((f = cnfield(N)) != nil)
		goto Exchange;
	if((f = gmfield(N)) != nil)
		goto Exchange;
	return N;
Exchange:
	setmalloctag(f, getcallerpc(&N));
	mpfree(N);
	return f;
}