jdk/makefiles/GensrcBuffer.gmk
author ihse
Thu, 10 Oct 2013 14:58:04 +0200
changeset 20623 cb61ea12e375
parent 17922 d56eec572de5
child 20547 453837141fac
permissions -rw-r--r--
8001931: The new build system whitespace cleanup Reviewed-by: tbell, simonis, erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     1
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     4
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    10
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    15
# accompanied this code).
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    16
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    20
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    23
# questions.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    24
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    25
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    26
GENSRC_BUFFER :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    27
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    28
GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    29
GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    30
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    31
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    32
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    33
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    34
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
    35
$(GENSRC_BUFFER_DST)/_the.buffer.dir :
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    36
	$(ECHO) "Generating buffer classes"
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    37
	$(MKDIR) -p $(@D)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    38
	$(TOUCH) $@
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    39
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    40
define fixRw
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    41
	$1_RW := $2
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    42
	$1_rwkey := rw
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    43
	ifeq (R,$2)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    44
		 $1_rwkey := ro
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    45
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    46
endef
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    47
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    48
define typesAndBits
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    49
        # param 1 target
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    50
        # param 2 type
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    51
        # param 3 BO
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    52
	$1_a := a
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    53
	$1_A := A
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    54
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    55
	$1_type := $2
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    56
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    57
	ifeq ($2, byte)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    58
		$1_x        := b
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    59
		$1_Type     := Byte
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    60
		$1_fulltype := byte
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    61
		$1_Fulltype := Byte
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    62
		$1_category := integralType
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    63
		$1_LBPV     := 0
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    64
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    65
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    66
	ifeq ($2, char)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    67
		$1_x        := c
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    68
		$1_Type     := Char
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    69
		$1_fulltype := character
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    70
		$1_Fulltype := Character
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    71
		$1_category := integralType
17922
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
    72
                $1_streams  := streamableType
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
    73
                $1_streamtype := int
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
    74
                $1_Streamtype := Int
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    75
		$1_LBPV     := 1
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    76
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    77
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    78
	ifeq ($2, short)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    79
		$1_x        := s
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    80
		$1_Type     := Short
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    81
		$1_fulltype := short
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    82
		$1_Fulltype := Short
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    83
		$1_category := integralType
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    84
		$1_LBPV     := 1
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    85
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    86
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    87
	ifeq ($2, int)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    88
		$1_a := an
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    89
		$1_A := An
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    90
		$1_x        := i
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    91
		$1_Type     := Int
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    92
		$1_fulltype := integer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    93
		$1_Fulltype := Integer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    94
		$1_category := integralType
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    95
		$1_LBPV     := 2
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    96
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    97
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    98
	ifeq ($2, long)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
    99
		$1_x        := l
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   100
		$1_Type     := Long
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   101
		$1_fulltype := long
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   102
		$1_Fulltype := Long
17922
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
   103
		$1_category := integralType	
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   104
		$1_LBPV     := 3
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   105
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   106
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   107
	ifeq ($2, float)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   108
		$1_x        := f
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   109
		$1_Type     := Float
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   110
		$1_fulltype := float
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   111
		$1_Fulltype := Float
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   112
		$1_category := floatingPointType
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   113
		$1_LBPV     := 2
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   114
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   115
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   116
	ifeq ($2, double)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   117
		$1_x        := d
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   118
		$1_Type     := Double
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   119
		$1_fulltype := double
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   120
		$1_Fulltype := Double
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   121
		$1_category := floatingPointType
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   122
		$1_LBPV     := 3
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   123
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   124
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   125
	$1_Swaptype := $$($1_Type)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   126
	$1_memtype := $2
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   127
	$1_Memtype := $$($1_Type)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   128
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   129
	ifeq ($2, float)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   130
		$1_memtype := int
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   131
		$1_Memtype := Int
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   132
		ifneq ($3,U)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   133
			$1_Swaptype := Int
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   134
			$1_fromBits := Float.intBitsToFloat
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   135
			$1_toBits   := Float.floatToRawIntBits
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   136
		endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   137
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   138
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   139
	ifeq ($2, double)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   140
		$1_memtype := long
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   141
		$1_Memtype := Long
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   142
		ifneq ($3,U)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   143
			$1_Swaptype := Long
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   144
			$1_fromBits := Double.longBitsToDouble
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   145
			$1_toBits   := Double.doubleToRawLongBits
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   146
		endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   147
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   148
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   149
	ifeq ($3, S)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   150
		$1_swap := Bits.swap
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   151
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   152
endef
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   153
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   154
define genBinOps
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   155
        # param 1 target
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   156
        # param 2 type
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   157
        # param 3 BO
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   158
        # param 4 RW
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   159
        # param 5 nbytes
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   160
        # param 6 nbytesButOne
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   161
	$(call typesAndBits,$1,$2,$3)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   162
	$(call fixRw,$1,$4)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   163
	$1_nbytes := $5
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   164
	$1_nbytesButOne := $6
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   165
	$1_CMD := $(TOOL_SPP) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   166
		-Dtype=$$($1_type) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   167
		-DType=$$($1_Type) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   168
		-Dfulltype=$$($1_fulltype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   169
		-Dmemtype=$$($1_memtype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   170
		-DMemtype=$$($1_Memtype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   171
		-DfromBits=$$($1_fromBits) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   172
		-DtoBits=$$($1_toBits) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   173
		-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   174
		-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   175
		-Dnbytes=$$($1_nbytes) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   176
		-DnbytesButOne=$$($1_nbytesButOne) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   177
		-DRW=$$($1_RW) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   178
		-K$$($1_rwkey) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   179
		-Da=$$($1_a) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   180
		-be
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   181
endef
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   182
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   183
define SetupGenBuffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   184
        # param 1 is for output file
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   185
        # param 2 is template dependency
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   186
        # param 3-9 are named args.
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   187
        #   type :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   188
        #   BIN  :=
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   189
        #   RW   := Mutability (R)ead-only (W)ritable
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   190
        #   BO   := (U)nswapped/(S)wapped/(L)ittle/(B)ig
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   191
        #
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   192
	$(if $3,$1_$(strip $3))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   193
	$(if $4,$1_$(strip $4))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   194
	$(if $5,$1_$(strip $5))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   195
	$(if $6,$1_$(strip $6))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   196
	$(if $7,$1_$(strip $7))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   197
	$(if $8,$1_$(strip $8))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   198
	$(if $9,$1_$(strip $9))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   199
	$(if $(10),$1_$(strip $(10)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   200
	$(if $(11),$1_$(strip $(11)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   201
	$(if $(12),$1_$(strip $(12)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   202
	$(if $(13),$1_$(strip $(13)))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   203
	$(if $(14),$1_$(strip $(14)))
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   204
	$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15,$(if $($i),$1_$(strip $($i)))$(NEWLINE))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   205
	$(call LogSetupMacroEntry,SetupGenBuffer($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   206
	$(if $(16),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   207
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   208
	$(call fixRw,$1,$$($1_RW))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   209
	$(call typesAndBits,$1,$$($1_type),$$($1_BO))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   210
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   211
	$1_DST     := $(GENSRC_BUFFER_DST)/$1.java
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   212
	$1_SRC     := $(GENSRC_BUFFER_SRC)/$(strip $2).java.template
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   213
	$1_SRC_BIN := $(GENSRC_BUFFER_SRC)/$(strip $2)-bin.java.template
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   214
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   215
	$1_DEP := $$($1_SRC)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   216
	ifneq ($$($1_BIN),1)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   217
		$1_DEP := $$($1_SRC)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   218
		$1_OUT := $$($1_DST)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   219
	else
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   220
		$1_DEP += $$($1_SRC) $$($1_SRC_BIN)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   221
		$1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   222
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   223
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   224
	ifeq ($$($1_BIN),1)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   225
		$(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   226
		$(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   227
		$(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   228
		$(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   229
		$(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   230
		$(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   231
	endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   232
14231
a0c23c1c010f 8000992: Update new build-infra makefiles
ohair
parents: 13702
diff changeset
   233
$$($1_DST) : $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   234
	$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   235
		-K$$($1_type) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   236
		-K$$($1_category) \
17922
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
   237
		-K$$($1_streams) \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   238
		-Dtype=$$($1_type) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   239
		-DType=$$($1_Type) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   240
		-Dfulltype=$$($1_fulltype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   241
		-DFulltype=$$($1_Fulltype) \
17922
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
   242
                -Dstreamtype=$$($1_streamtype) \
d56eec572de5 8014854: (bf) CharBuffer.chars too slow with default implementation
alanb
parents: 14231
diff changeset
   243
                -DStreamtype=$$($1_Streamtype) \
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   244
		-Dx=$$($1_x) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   245
		-Dmemtype=$$($1_memtype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   246
		-DMemtype=$$($1_Memtype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   247
		-DSwaptype=$$($1_Swaptype) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   248
		-DfromBits=$$($1_fromBits) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   249
		-DtoBits=$$($1_toBits) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   250
		-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   251
		-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   252
		-DBO=$$($1_BO) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   253
		-Dswap=$$($1_swap) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   254
		-DRW=$$($1_RW) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   255
		-K$$($1_rwkey) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   256
		-Da=$$($1_a) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   257
		-DA=$$($1_A) \
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   258
		-Kbo$$($1_BO)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   259
		$(MV) $$($1_OUT).tmp $$($1_OUT)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   260
# Do the extra bin thing
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   261
ifeq ($$($1_BIN),1)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   262
	$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   263
	$(RM) $$($1_OUT)
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   264
	$$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   265
	$$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   266
	$$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   267
	$$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   268
	$$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   269
	$$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   270
	$(PRINTF) "}\n" >> $$($1_DST).tmp
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   271
	mv $$($1_DST).tmp $$($1_DST)
12892
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   272
endif
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   273
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   274
GENSRC_BUFFER += $$($1_DST)
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   275
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   276
endef
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   277
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   278
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   279
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   280
X_BUF :=X-Buffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   281
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   282
$(eval $(call SetupGenBuffer,ByteBuffer,  $(X_BUF),type:=byte,BIN:=1))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   283
$(eval $(call SetupGenBuffer,CharBuffer,  $(X_BUF),type:=char))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   284
$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF),type:=short))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   285
$(eval $(call SetupGenBuffer,IntBuffer,   $(X_BUF),type:=int))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   286
$(eval $(call SetupGenBuffer,LongBuffer,  $(X_BUF),type:=long))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   287
$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF),type:=float))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   288
$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF),type:=double))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   289
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   290
# Buffers whose contents are heap-allocated
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   291
# 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   292
HEAP_X_BUF := Heap-X-Buffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   293
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   294
$(eval $(call SetupGenBuffer,HeapByteBuffer,   $(HEAP_X_BUF),type:=byte))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   295
$(eval $(call SetupGenBuffer,HeapByteBufferR,  $(HEAP_X_BUF),type:=byte,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   296
$(eval $(call SetupGenBuffer,HeapCharBuffer,   $(HEAP_X_BUF),type:=char))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   297
$(eval $(call SetupGenBuffer,HeapCharBufferR,  $(HEAP_X_BUF),type:=char,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   298
$(eval $(call SetupGenBuffer,HeapShortBuffer,  $(HEAP_X_BUF),type:=short))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   299
$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF),type:=short,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   300
$(eval $(call SetupGenBuffer,HeapIntBuffer,    $(HEAP_X_BUF),type:=int))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   301
$(eval $(call SetupGenBuffer,HeapIntBufferR,   $(HEAP_X_BUF),type:=int,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   302
$(eval $(call SetupGenBuffer,HeapLongBuffer,   $(HEAP_X_BUF),type:=long))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   303
$(eval $(call SetupGenBuffer,HeapLongBufferR,  $(HEAP_X_BUF),type:=long,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   304
$(eval $(call SetupGenBuffer,HeapFloatBuffer,  $(HEAP_X_BUF),type:=float))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   305
$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF),type:=float,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   306
$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF),type:=double))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   307
$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF),type:=double,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   308
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   309
# Direct byte buffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   310
# 
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   311
DIRECT_X_BUF := Direct-X-Buffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   312
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   313
$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF),type:=byte,BIN:=1))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   314
$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF),type:=byte,BIN:=1,RW:=R))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   315
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   316
# Unswapped views of direct byte buffers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   317
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   318
$(eval $(call SetupGenBuffer,DirectCharBufferU,   $(DIRECT_X_BUF),type:=char,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   319
$(eval $(call SetupGenBuffer,DirectCharBufferRU,  $(DIRECT_X_BUF),type:=char,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   320
$(eval $(call SetupGenBuffer,DirectShortBufferU,  $(DIRECT_X_BUF),type:=short,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   321
$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   322
$(eval $(call SetupGenBuffer,DirectIntBufferU,    $(DIRECT_X_BUF),type:=int,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   323
$(eval $(call SetupGenBuffer,DirectIntBufferRU,   $(DIRECT_X_BUF),type:=int,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   324
$(eval $(call SetupGenBuffer,DirectLongBufferU,   $(DIRECT_X_BUF),type:=long,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   325
$(eval $(call SetupGenBuffer,DirectLongBufferRU,  $(DIRECT_X_BUF),type:=long,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   326
$(eval $(call SetupGenBuffer,DirectFloatBufferU,  $(DIRECT_X_BUF),type:=float,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   327
$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   328
$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF),type:=double,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   329
$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=U))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   330
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   331
# Swapped views of direct byte buffers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   332
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   333
$(eval $(call SetupGenBuffer,DirectCharBufferS,   $(DIRECT_X_BUF),type:=char,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   334
$(eval $(call SetupGenBuffer,DirectCharBufferRS,  $(DIRECT_X_BUF),type:=char,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   335
$(eval $(call SetupGenBuffer,DirectShortBufferS,  $(DIRECT_X_BUF),type:=short,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   336
$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF),type:=short,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   337
$(eval $(call SetupGenBuffer,DirectIntBufferS,    $(DIRECT_X_BUF),type:=int,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   338
$(eval $(call SetupGenBuffer,DirectIntBufferRS,   $(DIRECT_X_BUF),type:=int,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   339
$(eval $(call SetupGenBuffer,DirectLongBufferS,   $(DIRECT_X_BUF),type:=long,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   340
$(eval $(call SetupGenBuffer,DirectLongBufferRS,  $(DIRECT_X_BUF),type:=long,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   341
$(eval $(call SetupGenBuffer,DirectFloatBufferS,  $(DIRECT_X_BUF),type:=float,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   342
$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF),type:=float,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   343
$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF),type:=double,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   344
$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF),type:=double,RW:=R,BO:=S))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   345
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   346
# Big-endian views of byte buffers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   347
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   348
BYTE_X_BUF := ByteBufferAs-X-Buffer
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   349
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   350
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB,   $(BYTE_X_BUF),type:=char,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   351
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB,  $(BYTE_X_BUF),type:=char,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   352
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB,  $(BYTE_X_BUF),type:=short,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   353
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF),type:=short,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   354
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB,    $(BYTE_X_BUF),type:=int,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   355
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB,   $(BYTE_X_BUF),type:=int,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   356
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB,   $(BYTE_X_BUF),type:=long,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   357
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB,  $(BYTE_X_BUF),type:=long,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   358
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB,  $(BYTE_X_BUF),type:=float,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   359
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF),type:=float,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   360
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF),type:=double,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   361
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF),type:=double,RW:=R,BO:=B))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   362
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   363
# Little-endian views of byte buffers
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   364
#
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   365
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL,   $(BYTE_X_BUF),type:=char,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   366
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL,  $(BYTE_X_BUF),type:=char,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   367
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL,  $(BYTE_X_BUF),type:=short,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   368
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF),type:=short,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   369
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL,    $(BYTE_X_BUF),type:=int,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   370
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL,   $(BYTE_X_BUF),type:=int,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   371
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL,   $(BYTE_X_BUF),type:=long,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   372
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL,  $(BYTE_X_BUF),type:=long,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   373
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL,  $(BYTE_X_BUF),type:=float,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   374
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF),type:=float,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   375
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF),type:=double,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   376
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF),type:=double,RW:=R,BO:=L))
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   377
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   378
###
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   379
3ef14bab6254 7170079: Adjustments to build-infra makefiles
erikj
parents:
diff changeset
   380
$(GENSRC_BUFFER) : $(BUILD_TOOLS)