Home
last modified time | relevance | path

Searched refs:gen (Results 1 – 25 of 142) sorted by relevance

123456

/packages/modules/NetworkStack/src/android/net/apf/
DDnsUtils.java86 private static void genParseDnsLabel(ApfV4Generator gen, JumpTable jumpTable) throws Exception { in genParseDnsLabel() argument
95 gen.defineLabel(LABEL_PARSE_DNS_LABEL); in genParseDnsLabel()
96 gen.addLoadFromMemory(R1, SLOT_CURRENT_PARSE_OFFSET); in genParseDnsLabel()
104 gen.addLoadFromMemory(R0, SLOT_DNS_HEADER_OFFSET); in genParseDnsLabel()
105 gen.addJumpIfR0GreaterThanR1(ApfV4Generator.DROP_LABEL); in genParseDnsLabel()
114 gen.addLoad8Indexed(R0, 0); in genParseDnsLabel()
115 gen.addAnd(0xc0); in genParseDnsLabel()
116 gen.addJumpIfR0Equals(0, labelParseDnsLabelReal); in genParseDnsLabel()
128 gen.addLoadFromMemory(R0, SLOT_AFTER_POINTER_OFFSET); in genParseDnsLabel()
129 gen.addJumpIfR0NotEquals(0, labelPointerOffsetStored); in genParseDnsLabel()
[all …]
DLegacyApfFilter.java128 private void maybeSetupCounter(ApfV4Generator gen, Counter c) { in maybeSetupCounter() argument
130 gen.addLoadImmediate(R1, c.offset()); in maybeSetupCounter()
986 long generateFilterLocked(ApfV4Generator gen) throws IllegalInstructionException { in generateFilterLocked() argument
989 gen.addLoadFromMemory(R0, MemorySlot.PACKET_SIZE); in generateFilterLocked()
990 gen.addJumpIfR0NotEquals(mPacket.capacity(), nextFilterLabel); in generateFilterLocked()
992 gen.addLoadFromMemory(R0, MemorySlot.FILTER_AGE_SECONDS); in generateFilterLocked()
993 gen.addJumpIfR0GreaterThan(filterLifetime(), nextFilterLabel); in generateFilterLocked()
997 gen.addLoadImmediate(R0, section.start); in generateFilterLocked()
998 gen.addJumpIfBytesAtR0NotEqual( in generateFilterLocked()
1008 case 4: gen.addLoad32(R0, section.start); break; in generateFilterLocked()
[all …]
DApfFilter.java1188 void generateFilterLocked(ApfV4GeneratorBase<?> gen, int timeSeconds) in generateFilterLocked() argument
1190 String nextFilterLabel = gen.getUniqueLabel(); in generateFilterLocked()
1192 gen.addLoadFromMemory(R0, MemorySlot.PACKET_SIZE); in generateFilterLocked()
1193 gen.addJumpIfR0NotEquals(mPacket.capacity(), nextFilterLabel); in generateFilterLocked()
1195 gen.addLoadFromMemory(R0, MemorySlot.FILTER_AGE_SECONDS); in generateFilterLocked()
1196 gen.addJumpIfR0GreaterThan(getRemainingFilterLft(timeSeconds), nextFilterLabel); in generateFilterLocked()
1200 gen.addLoadImmediate(R0, section.start); in generateFilterLocked()
1201 gen.addJumpIfBytesAtR0NotEqual( in generateFilterLocked()
1208 case 2: gen.addLoad16(R0, section.start); break; in generateFilterLocked()
1209 case 4: gen.addLoad32(R0, section.start); break; in generateFilterLocked()
[all …]
DJumpTable.java127 public void generate(@NonNull ApfV4Generator gen) in generate() argument
129 gen.defineLabel(mStartLabel); in generate()
130 gen.addLoadFromMemory(R0, mReturnAddressMemorySlot); in generate()
132 gen.addJumpIfR0Equals(e.getValue(), e.getKey()); in generate()
136 gen.addJump(ApfV4Generator.PASS_LABEL); in generate()
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java274 private void assertPass(ApfV4Generator gen) throws ApfV4Generator.IllegalInstructionException { in assertPass() argument
275 ApfTestUtils.assertPass(mApfVersion, gen); in assertPass()
278 private void assertDrop(ApfV4Generator gen) throws ApfV4Generator.IllegalInstructionException { in assertDrop() argument
279 ApfTestUtils.assertDrop(mApfVersion, gen); in assertDrop()
298 private void assertPass(ApfV4Generator gen, byte[] packet, int filterAge) in assertPass() argument
300 ApfTestUtils.assertPass(mApfVersion, gen, packet, filterAge); in assertPass()
303 private void assertDrop(ApfV4Generator gen, byte[] packet, int filterAge) in assertDrop() argument
305 ApfTestUtils.assertDrop(mApfVersion, gen, packet, filterAge); in assertDrop()
339 ApfV4Generator gen = new ApfV4Generator(APF_VERSION_2); in testApfInstructions() local
340 assertPass(gen); in testApfInstructions()
[all …]
DBpf2Apf.java77 private static void convertLine(String line, ApfV4Generator gen) in convertLine() argument
83 gen.defineLabel(Integer.toString(label)); in convertLine()
98 gen.addLoadFromMemory(dest, MemorySlot.IPV4_HEADER_SIZE); in convertLine()
105 gen.addLoadFromMemory(dest, MemorySlot.PACKET_SIZE); in convertLine()
112 gen.addLoadImmediate(dest, parseImm(line, arg)); in convertLine()
120 gen.addLoadFromMemory(dest, byIndex(memory_slot)); in convertLine()
128 gen.addLoad32Indexed(dest, offset); in convertLine()
132 gen.addLoad16Indexed(dest, offset); in convertLine()
136 gen.addLoad8Indexed(dest, offset); in convertLine()
144 gen.addLoad32(dest, offset); in convertLine()
[all …]
DApfStandaloneTest.kt251 val gen = ApfV4Generator(APF_VERSION_4) in generateApfV4Program() constant
253 maybeSetupCounter(gen, Counter.TOTAL_PACKETS) in generateApfV4Program()
254 gen.addLoadData(R0, 0) in generateApfV4Program()
255 gen.addAdd(1) in generateApfV4Program()
256 gen.addStoreData(R0, 0) in generateApfV4Program()
258 maybeSetupCounter(gen, Counter.FILTER_AGE_SECONDS) in generateApfV4Program()
259 gen.addLoadFromMemory(R0, MemorySlot.FILTER_AGE_SECONDS) in generateApfV4Program()
260 gen.addStoreData(R0, 0) in generateApfV4Program()
262 maybeSetupCounter(gen, Counter.FILTER_AGE_16384THS) in generateApfV4Program()
263 gen.addLoadFromMemory(R0, MemorySlot.FILTER_AGE_16384THS) in generateApfV4Program()
[all …]
DApfNewTest.kt184 var gen = ApfV6Generator(defaultMaximumApfProgramSize) in testDataInstructionMustComeFirst() variable
185 gen.addAllocateR0() in testDataInstructionMustComeFirst()
186 assertFailsWith<IllegalInstructionException> { gen.addData(ByteArray(3) { 0x01 }) } in testDataInstructionMustComeFirst()
191 var gen = ApfV6Generator(defaultMaximumApfProgramSize) in testApfInstructionEncodingSizeCheck() variable
195 assertFailsWith<IllegalArgumentException> { gen.addAllocate(65536) } in testApfInstructionEncodingSizeCheck()
196 assertFailsWith<IllegalArgumentException> { gen.addAllocate(-1) } in testApfInstructionEncodingSizeCheck()
197 assertFailsWith<IllegalArgumentException> { gen.addDataCopy(-1, 1) } in testApfInstructionEncodingSizeCheck()
198 assertFailsWith<IllegalArgumentException> { gen.addPacketCopy(-1, 1) } in testApfInstructionEncodingSizeCheck()
199 assertFailsWith<IllegalArgumentException> { gen.addDataCopy(1, 256) } in testApfInstructionEncodingSizeCheck()
200 assertFailsWith<IllegalArgumentException> { gen.addPacketCopy(1, 256) } in testApfInstructionEncodingSizeCheck()
[all …]
DJumpTableTest.kt39 lateinit var gen: ApfV4Generator variable in android.net.apf.JumpTableTest
89 val inOrder = inOrder(gen) in testCodeGeneration()
91 j.generate(gen) in testCodeGeneration()
93 inOrder.verify(gen).defineLabel(name) in testCodeGeneration()
94 inOrder.verify(gen).addLoadFromMemory(R0, slot) in testCodeGeneration()
95 inOrder.verify(gen).addJumpIfR0Equals(0, "foo") in testCodeGeneration()
96 inOrder.verify(gen).addJumpIfR0Equals(1, "bar") in testCodeGeneration()
97 inOrder.verify(gen).addJumpIfR0Equals(2, "baz") in testCodeGeneration()
98 inOrder.verify(gen).addJump(ApfV4Generator.PASS_LABEL) in testCodeGeneration()
/packages/modules/Bluetooth/pandora/interfaces/python/
DAndroid.bp6 name: "pandora_experimental-python-gen-src",
9 "protoc-gen-pandora-python",
15 " --plugin=protoc-gen-grpc=$(location protoc-gen-pandora-python)" +
96 ":pandora_experimental-python-gen-src",
106 ":pandora_experimental-python-gen-src{pandora_experimental/asha_pb2.pyi}",
107 ":pandora_experimental-python-gen-src{pandora_experimental/avrcp_pb2.pyi}",
108 ":pandora_experimental-python-gen-src{pandora_experimental/dck_pb2.pyi}",
109 ":pandora_experimental-python-gen-src{pandora_experimental/gatt_pb2.pyi}",
110 ":pandora_experimental-python-gen-src{pandora_experimental/hfp_pb2.pyi}",
111 ":pandora_experimental-python-gen-src{pandora_experimental/hid_pb2.pyi}",
[all …]
/packages/modules/NeuralNetworks/common/random/
Drandom_distributions.h96 ResultType operator()(Generator* gen) { in operator()
97 typename Generator::ResultType sample = (*gen)(); in operator()
120 ResultType operator()(Generator* gen) { in operator()
121 typename Generator::ResultType sample = (*gen)(); in operator()
144 ResultType operator()(Generator* gen) { in operator()
145 typename Generator::ResultType sample = (*gen)(); in operator()
168 ResultType operator()(Generator* gen) { in operator()
169 typename Generator::ResultType sample = (*gen)(); in operator()
196 ResultType operator()(Generator* gen) { in operator()
197 typename Generator::ResultType sample = (*gen)(); in operator()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DApfIntegrationTest.kt437 val gen = ApfV4Generator(4) in testDropPingReply() constant
440 gen.addPassIfNotIcmpv6EchoReply() in testDropPingReply()
443 gen.addLoadImmediate(R0, ICMP6_TYPE_OFFSET + PING_HEADER_LENGTH) in testDropPingReply()
444 gen.addJumpIfBytesAtR0NotEqual(data, BaseApfGenerator.PASS_LABEL) in testDropPingReply()
447 gen.addJump(BaseApfGenerator.DROP_LABEL) in testDropPingReply()
449 val program = gen.generate() in testDropPingReply()
471 val gen = ApfV4Generator(4) in clearApfMemory() constant
474 gen.addPassIfNotIcmpv6EchoReply() in clearApfMemory()
478 gen.addLoadImmediate(R1, counterRegion) in clearApfMemory()
479 gen.addLoadFromMemory(R0, MemorySlot.PROGRAM_SIZE) in clearApfMemory()
[all …]
/packages/modules/CellBroadcastService/
DAndroid.bp11 ":statslog-cellbroadcast-module-java-gen",
62 name: "statslog-cellbroadcast-java-gen",
63 tools: ["stats-log-api-gen"],
64 cmd: "$(location stats-log-api-gen) --java $(out) --module cellbroadcast" +
71 name: "statslog-cellbroadcast-module-java-gen",
72 tools: ["stats-log-api-gen"],
73 cmd: "$(location stats-log-api-gen) --java $(out) --module cellbroadcast" +
85 ":statslog-cellbroadcast-module-java-gen",
105 ":statslog-cellbroadcast-module-java-gen",
/packages/services/Car/cpp/computepipe/runner/graph/proto/
DAndroid.bp9 "protoc-gen-grpc-cpp-plugin",
11 … -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-c…
25 "protoc-gen-grpc-cpp-plugin",
27 … -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-c…
/packages/modules/Bluetooth/system/gd/rust/linux/stack/btif_macros/src/
Dlib.rs18 fn debug_output_to_file(gen: &proc_macro2::TokenStream, filename: String) { in debug_output_to_file()
31 file.write_all(gen.to_string().as_bytes()).unwrap(); in debug_output_to_file()
38 let gen = quote! { in btif_callback() localVariable
41 gen.into() in btif_callback()
152 let gen = quote! { in btif_callbacks_dispatcher() localVariable
164 debug_output_to_file(&gen, format!("out-{}.rs", fn_ident.to_string())); in btif_callbacks_dispatcher()
166 gen.into() in btif_callbacks_dispatcher()
/packages/modules/DeviceLock/DeviceLockController/proto/
DAndroid.bp40 "protoc-gen-grpc-java-plugin",
43 cmd: "mkdir -p $(genDir)/gen && " +
46 "--plugin=protoc-gen-grpc-java=$(location protoc-gen-grpc-java-plugin) " +
47 "--grpc-java_out=lite:$(genDir)/gen $(locations :devicelockcontroller-protos) && " +
48 "$(location soong_zip) -o $(out) -C $(genDir)/gen -D $(genDir)/gen",
/packages/modules/AdServices/adservices/service-core/proto/
DAndroid.bp57 "protoc-gen-grpc-java-plugin",
60 cmd: "mkdir -p $(genDir)/gen && " +
62 …"--plugin=protoc-gen-grpc-java=$(location protoc-gen-grpc-java-plugin) --grpc-java_out=lite:$(genD…
63 "$(location soong_zip) -o $(out) -C $(genDir)/gen -D $(genDir)/gen",
/packages/apps/TV/common/
Dbuildconfig.mk33 gen := $(local-generated-sources-dir)/$(TARGET_BUILD_VARIANT)/BuildConfig.java
34 $(gen): PRIVATE_CUSTOM_TOOL = sed -e \
37 $(gen) : $(LOCAL_PATH)/BuildConfig.java.in
39 LOCAL_GENERATED_SOURCES += $(gen)
/packages/apps/TV/partner_support/
Dbuildconfig.mk33 gen := $(local-generated-sources-dir)/$(TARGET_BUILD_VARIANT)/BuildConfig.java
34 $(gen): PRIVATE_CUSTOM_TOOL = sed -e \
37 $(gen) : $(LOCAL_PATH)/BuildConfig.java.in
39 LOCAL_GENERATED_SOURCES += $(gen)
/packages/services/Car/service/
DAndroid.bp25 name: "statslog-Car-java-gen",
26 tools: ["stats-log-api-gen"],
27 cmd: "$(location stats-log-api-gen) --java $(out) --module car --javaPackage com.android.car" +
33 name: "gen-car-service-dump-javastream-protos",
37 "protoc-gen-javastream",
47 " --plugin=$(location protoc-gen-javastream) " +
62 name: "gen-native-dump-cppstream-proto-headers",
65 "protoc-gen-cppstream",
69 " --plugin=$(location protoc-gen-cppstream) " +
87 name: "gen-native-dump-proto-headers",
[all …]
/packages/services/Iwlan/
DAndroid.bp7 name: "statslog-Iwlan-java-gen",
8 tools: ["stats-log-api-gen"],
9 …cmd: "$(location stats-log-api-gen) --java $(out) --module iwlan --javaPackage com.google.android.…
20 ":statslog-Iwlan-java-gen",
68 ":statslog-Iwlan-java-gen",
/packages/apps/SecureElement/
DAndroid.bp22 name: "statslog-secure-element-java-gen",
23 tools: ["stats-log-api-gen"],
24 cmd: "$(location stats-log-api-gen) --java $(out) --module secure_element"
33 ":statslog-secure-element-java-gen",
/packages/apps/Nfc/
DAndroid.bp7 name: "statslog-Nfc-java-gen",
8 tools: ["stats-log-api-gen"],
9 cmd: "$(location stats-log-api-gen) --java $(out) --module nfc --javaPackage com.android.nfc" +
15 name: "bluetooth-protos-nfc-enums-java-gen",
37 "bluetooth-protos-nfc-enums-java-gen",
124 ":statslog-Nfc-java-gen",
/packages/modules/StatsD/framework/
DAndroid.bp21 name: "statslog-statsd-java-gen",
22 tools: ["stats-log-api-gen"],
23 cmd: "$(location stats-log-api-gen) --java $(out) --module statsd" +
31 ":statslog-statsd-java-gen",
48 ":statslog-statsd-java-gen",
77 // From :statslog-statsd-java-gen
/packages/modules/Bluetooth/system/
DAndroid.bp45 "protoc-gen-grpc-cpp-plugin",
47 …les/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-c…
88 "protoc-gen-grpc-cpp-plugin",
90 …les/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-c…
131 "protoc-gen-grpc-python-plugin",
135 …les/Bluetooth/system -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-p…

123456