From owner-acpi-jp@jp.freebsd.org  Wed Jun 14 00:14:55 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id AAA73557;
	Wed, 14 Jun 2000 00:14:55 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id AAA73552
	for <acpi-jp@jp.freebsd.org>; Wed, 14 Jun 2000 00:14:54 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (isdn48.imasy.or.jp [202.227.24.240])
	by tasogare.imasy.or.jp (8.10.1+3.3W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id e5DFEq229558
	for <acpi-jp@jp.freebsd.org>; Wed, 14 Jun 2000 00:14:52 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: acpi-jp@jp.freebsd.org
In-Reply-To: <20000602231332X.iwasaki@jp.FreeBSD.org>
References: <20000602231332X.iwasaki@jp.FreeBSD.org>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <20000614001450Q.iwasaki@jp.FreeBSD.org>
Date: Wed, 14 Jun 2000 00:14:50 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 97
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 394
Subject: [acpi-jp 394] Re: objref fix and more
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

> AddOp $B$NBh;00z?t$N%*%V%8%'%/%H$J$I$K$O%*%W%7%g%s$G7k2L$r3JG<$G$-$k$h$&(B
> $B$K$J$C$F$$$^$9$,!";XDj$5$l$F$$$J$$>l9g$O(B Zero $B$,F~$C$F$*$j!"$3$l$KBP$9(B
> $B$k(B Store $B$NL5BL$J=hM}$,<B9T$5$l$F$$$^$9!#7k2L$N(B Store $B$r8F$S=P$98D=j(B
> $B$9$Y$F$K%A%'%C%/$rF~$l$k$N$O%$%d$@$C$?$N$G!"(Bacpi_store_to_name() $B$N(B
> $B0lO"$N%(%i!<%A%'%C%/$N0l$D$H$7$F5[<}$9$k$h$&$K$7$F$_$^$7$?!#(B

JUS $B4X@>$N%;%_%J!<Cf$K$3$l$K4X$9$kITHw$,8+$D$+$j$^$7$?!#(B
If(And(0x4, Local1, Zero)) {
$B$N(B AndOp $B$N$h$&$J(B optional $B$J7k2L$N(B store $B$H(B
Z505D $B$N(B _SB.PCI0.ISA.SIO.EC__.WOBF $B$J$I$N(B
Method(WOBF) {
    Store(Zero, Local0)
    While(LNot(Local0)) {
        And(RDMB(0x86), 0x2, Local0)
    }
}
$BCM(B 0 $B$r;}$DJQ?t$X$N(B store $B$r6hJL$9$kI,MW$,$"$j$^$7$?!#(B
Zero, One $B$J$IA0<T$rDj?t$H$7$F07$($k$h$&$K$7!"(Bstore $B$N:]$O(B optional $B$J(B
StoreOp $B$+$rH=CG$9$k$h$&$K$7$F2r7h$7$h$&$H$7$F$$$^$9!#0J2<%Q%C%A$G$9!#(B

Index: aml_obj.c
===================================================================
RCS file: /home/cvs/ACPI/sys/i386/acpi/aml/aml_obj.c,v
retrieving revision 1.11
diff -u -r1.11 aml_obj.c
--- aml_obj.c	2000/06/06 15:33:37	1.11
+++ aml_obj.c	2000/06/13 14:42:40
@@ -87,7 +87,9 @@
 			ret->str.string = memman_alloc_flexsize(aml_memman,
 			    strlen(orig->str.string) + 1);
 			strcpy(orig->str.string, ret->str.string);
-		}
+		} else if (orig->type == aml_t_num) {
+                        ret->num.constant = 0;
+                }
 	} else {
 		printf("%s:%d\n", __FILE__, __LINE__);
 		env->wobj.type = aml_t_null;
Index: aml_obj.h
===================================================================
RCS file: /home/cvs/ACPI/sys/i386/acpi/aml/aml_obj.h,v
retrieving revision 1.11
diff -u -r1.11 aml_obj.h
--- aml_obj.h	2000/06/06 15:33:37	1.11
+++ aml_obj.h	2000/06/13 13:24:31
@@ -70,6 +70,7 @@
 struct	aml_num {
 	enum	aml_objtype type;	/* =aml_t_num */
 	int	number;
+	int	constant;
 };
 
 struct	aml_package {
Index: aml_parse.c
===================================================================
RCS file: /home/cvs/ACPI/sys/i386/acpi/aml/aml_parse.c,v
retrieving revision 1.24
diff -u -r1.24 aml_parse.c
--- aml_parse.c	2000/06/06 15:33:37	1.24
+++ aml_parse.c	2000/06/13 13:26:09
@@ -1309,18 +1309,21 @@
 	case 0x00:		/* ZeroOp */
 		ret->type = aml_t_num;
 		ret->num.number = 0;
+		ret->num.constant = 1;
 		AML_PRINTF("Zero");
 		aname = &env->work;
 		break;
 	case 0x01:		/* OneOp */
 		ret->type = aml_t_num;
 		ret->num.number = 1;
+		ret->num.constant = 1;
 		AML_PRINTF("One");
 		aname = &env->work;
 		break;
 	case 0xff:		/* OnesOp */
 		ret->type = aml_t_num;
 		ret->num.number = 0xffffffff;
+		ret->num.constant = 1;
 		AML_PRINTF("Ones");
 		aname = &env->work;
 		break;
Index: aml_store.c
===================================================================
RCS file: /home/cvs/ACPI/sys/i386/acpi/aml/aml_store.c,v
retrieving revision 1.14
diff -u -r1.14 aml_store.c
--- aml_store.c	2000/06/06 15:33:37	1.14
+++ aml_store.c	2000/06/13 14:40:19
@@ -305,6 +305,7 @@
 	/* no need to store to Zero object */
 	if (name->name[0] == NULL && name->property != NULL &&
 	    name->property->type == aml_t_num &&
+	    name->property->num.constant == 1 &&
 	    name->property->num.number == 0) {
 		return;
 	}
