e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * CDDL HEADER START
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * This file and its contents are supplied under the terms of the
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Common Development and Distribution License ("CDDL"), version 1.0.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * You may only use this file in accordance with the terms of version
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * 1.0 of the CDDL.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * A full copy of the text of the CDDL should have accompanied this
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * source. A copy of the CDDL is also available via the Internet at
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * http://www.illumos.org/license/CDDL.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * CDDL HEADER END
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Copyright (c) 2012 by Delphix. All rights reserved.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal/*
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Compile some code that requires exactly 9 registers. This should generate
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * invalid DIF because the kernel will flag the fact that we're using more
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * registers than are available internally.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Changes to the code generator might cause this test to succeeed in which
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * case the code should be changed to another sequence that exhausts the
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * available internal registers.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal * Note that this and err.D_NOREG.noreg.d should be kept in sync.
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal */
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal#pragma D option iregs=9
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. LeventhalBEGIN
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal{
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal a = 4;
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal trace((a + a) * ((a + a) * ((a + a) * ((a + a) * ((a + a) *
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal ((a + a) * (a + a)))))));
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal}
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. LeventhalBEGIN
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal{
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal exit(0);
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal}