Skip to content

Commit 4555834

Browse files
committed
CMPSC-Enhancement Facility
1 parent c0d3812 commit 4555834

18 files changed

+1328
-452
lines changed

CHANGES

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
10 Sep 2012 CMPSC_2012: CMPSC-Enhancement Facility zero padding support - Fish
12
15 Aug 2012 Change DASD utilities defaults to make wait PSW in IPL1 record
23
EC-mode and disabled for machine checks, add -b and -m switches
34
to dasdinit and dasdload to obtain old behavior - Kevin Leonard

README.CMPSCTST

+52-14
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,27 @@
3333
created during processing should be written. If
3434
not specified the current directory is used. The
3535
work files created during processing are called
36-
"cmpout.bin" and "expout.txt".
36+
"cmpout.bin", "expout.txt" and "md5sum.txt".
3737

3838
OPTIONS
3939

4040
-t Translate ASCII/EBCDIC (default = no)
4141
-a Algorithm to be used (default = 0)
42-
-r Number of random tests (default = 100)
42+
-r Number of random tests (default = 4)
43+
-r Number of speed test repeats (default = 4)
4344
-n No hard-coded test cases (default = all)
4445
-bn Use only buffer sizes set 'n' (default = all)
4546
-on Use only buffer offsets set 'n' (default = all)
4647
-speed Speed test; -r = repeats (see NOTES below)
48+
-z Zero Padding [enabled:requested] (see NOTES below)
49+
-w Zero Padding Alignment (default = 8 bit)
4750

4851
EXAMPLES
4952

50-
cmpsctst .\files .\dicts .\work > EXTREMELY-long-test.log
51-
cmpsctst .\files\small .\dicts .\work -r 0 > non-random-test.log
52-
cmpsctst .\files\small .\dicts .\work -n -r 16 > randoms-test.log
53-
cmpsctst .\files\large .\dicts .\work -speed -r 1000 > speed-test.log
53+
cmpsctst .\files .\dicts .\work -z > EXTREMELY-long-test.log
54+
cmpsctst .\files\small .\dicts .\work -r 0 -z -w 3 > VERY-long-non-random-test.log
55+
cmpsctst .\files\small .\dicts .\work -n -r 3 -z 0:1 > short-randoms-test.log
56+
cmpsctst .\files\large .\dicts .\work -speed -r 100 > speed-test.log
5457

5558
NOTES
5659

@@ -94,17 +97,20 @@
9497

9598
Because a default test using the many built-in (hard-coded)
9699
buffer size and offset values can cause cmpsctst to run for
97-
an *VERY* long time since there are so many of them (24336,
100+
a *VERY* long time since there are so many of them (33124
98101
times #of test files, times #of test dictionaries = total
99102
number of tests, each of which does a full compression and
100103
expansion) the -n (no-non-random) option allows you to skip
101104
these tests to allow cmpsctst to finish much more quickly.
102105

103106
You can also use the -bn and -on options to choose a smaller
104107
subset of buffer size and/or offset values too. There are 3
105-
buffer size sets with 2, 6 and 4 values in each of their sets
106-
respectively, and 2 sets of offset values with 9 and 6 values
107-
in each of their sets, respectively.
108+
buffer size sets with 3, 6 and 4 values in each of their
109+
respective sets, and 2 sets of offset values with 9 and 5
110+
values in each of their respective sets. Specifying -b3 -o2
111+
for example, will cause 400 total tests to be performed for
112+
each file/dictionary pair. Thus for a set of 2 files and 3
113+
dictionaries, a grand total of 2400 tests will be performed.
108114

109115
The -r value defines either the number of random buffer size
110116
and offset tests to perform or else the number of repeats to
@@ -126,6 +132,20 @@
126132
specific buffer size and offset values, you need to call the
127133
CMPSCTST.EXE tool yourself (i.e. don't use cmpsctst.rexx).
128134

135+
The '-z' (Zero Padding) option controls CMPSC-Enhancement
136+
Facility. Specify the option as two 0/1 values separated by
137+
a single colon. The first 0/1 defines whether the facility
138+
should be simulated as being enabled or not. The second 0/1
139+
controls whether the Zero Padding option (GR0 bit 46) should
140+
be set (requested) or not in the compression/expansion call.
141+
If the -z option is not specified the default is 0:0. If the
142+
option is specified but without any arguments then it's 1:1.
143+
144+
The '-w' (Zero Padding Alignment) option controls adjustment
145+
of the model-dependent storage boundary used by zero padding.
146+
The value should be specified as a power of 2 number of bits
147+
ranging from 1 to 12 (i.e. zero pad to 2-4096 byte boundary).
148+
129149
All dictionaries must be in RAW BINARY format and MUST use
130150
the following file naming convention:
131151

@@ -166,11 +186,11 @@
166186

167187
VERSION
168188

169-
2.1 (May 22, 2012)
189+
2.4 (July 2012)
170190

171191
-------------------------------------------------------------------------------
172192

173-
CMPSC Instruction Testing Tool, version 2.1.0
193+
CMPSC Instruction Testing Tool, version 2.4.0
174194
Copyright (C) 2012 Software Development Laboratories
175195

176196
Options:
@@ -188,7 +208,10 @@ Options:
188208

189209
-0 Format-0 (default)
190210
-1 Format-1
191-
-s Symbol Size (1-5 or 9-13; default = 2)
211+
-s Symbol Size (1-5 or 9-13; default = 2)
212+
213+
-z Zero Padding (enabled:requested; see NOTES)
214+
-w Zero Padding Alignment (default = 8 bit)
192215

193216
-t Translate (ASCII <-> EBCDIC as needed)
194217
-v Verbose [filename]
@@ -204,7 +227,7 @@ Returns:
204227
Examples:
205228

206229
CMPSCTST -c -i 8192:*:foo.txt -o *:4095:foo.cmpsc -r 1000 \
207-
-t -d cdict.bin -x edict.bin -1 -s 10 -v rpt.log
230+
-t -d cdict.bin -x edict.bin -1 -s 10 -v rpt.log -z 0:1
208231

209232
CMPSCTST -e -i foo.cmpsc -o foo.txt -t -x edict.bin -s 10 -q
210233

@@ -227,6 +250,21 @@ Notes:
227250
If you want your buffers to always be page aligned then you need to
228251
specify 0 for the offset. Dictionaries will always be page aligned.
229252

253+
The '-z' (Zero Padding) option controls CMPSC-Enhancement Facility.
254+
Specify the option as two 0/1 values separated by a single colon.
255+
If the -z option is not specified the default is 0:0. If the option
256+
is specified but without any arguments then the default is 1:1.
257+
The first 0/1 defines whether the facility should be enabled or not.
258+
The second 0/1 controls whether the GR0 zero padding option bit 46
259+
should be set or not (i.e. whether the zero padding option should be
260+
requested or not). The two values together allow testing the proper
261+
handling of the facility since zero padding may only be attempted
262+
when both the Facility bit and the GR0 option bit 46 are both '1'.
263+
264+
The '-w' (Zero Padding Alignment) option allows adjusting the model-
265+
dependent integral storage boundary for zero padding. The value is
266+
specified as a power of 2 number of bits ranging from 1 to 12.
267+
230268
Use the '-t' (Translate) option when testing using ASCII test files
231269
since most dictionaries are intended for EBCDIC data. If specified,
232270
the test data is first internally translated from ASCII to EBCDIC

cmdtab.h

+13
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@
169169
"Format: \"cmdtgt [herc | scp | pscp | ?]\". Specify the command target.\n"
170170

171171
#define cnslport_cmd_desc "Set console port"
172+
#if defined(_FEATURE_CMPSC_ENHANCEMENT_FACILITY)
173+
#define cmpscpad_cmd_desc "Set/display the CMPSC zero padding value."
174+
#define cmpscpad_cmd_help \
175+
\
176+
"The CMPSCPAD command defines the zero padding storage alignment boundary\n" \
177+
"for the CMPSC-Enhancement Facility. It must be a power of 2 value ranging\n" \
178+
"anywhere from " QSTR( MIN_CMPSC_ZP_BITS ) " to " QSTR( MAX_CMPSC_ZP_BITS ) ". Enter the command with no arguments to display the\n" \
179+
"current value.\n"
180+
181+
#endif /* defined(_FEATURE_CMPSC_ENHANCEMENT_FACILITY) */
172182
#define codepage_cmd_desc "Set/display code page conversion table"
173183
#define codepage_cmd_help \
174184
\
@@ -1536,6 +1546,9 @@ COMMAND( "sizeof", sizeof_cmd, SYSCMDNOPERNPROG,
15361546
/*-------------------------------------------------------------------*/
15371547

15381548
// "1...5...9", function type flags description long help
1549+
#if defined(_FEATURE_CMPSC_ENHANCEMENT_FACILITY)
1550+
COMMAND( "cmpscpad", cmpscpad_cmd, SYSCFGNDIAG8, cmpscpad_cmd_desc, cmpscpad_cmd_help )
1551+
#endif /* defined(_FEATURE_CMPSC_ENHANCEMENT_FACILITY) */
15391552
#if defined( _FEATURE_ASN_AND_LX_REUSE )
15401553
COMMAND( "alrf", alrf_cmd, SYSCMDNOPER, alrf_cmd_desc, NULL )
15411554
COMMAND( "asn_and_lx_reuse", alrf_cmd, SYSCMDNOPER, asnlx_cmd_desc, NULL )

cmpsc.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
#define DEF_CMPSC_CPU_AMT ( 1024 * 1024 ) // 1MB
2222
#define MAX_CMPSC_CPU_AMT ( 1024 * 1024 * 1024 ) // 1GB
2323

24-
#define CMPSC_INLINE INLINE // __forceinline
25-
#define CMPSC_FASTCALL ATTR_REGPARM( 3 ) // __fastcall
24+
#define CMPSC_INLINE INLINE // __forceinline
25+
#define CMPSC_FASTCALL ATTR_REGPARM( 3 ) // __fastcall
2626

2727
#define CMPSC_EXPAND8 // (#define to enable expand-8 logic)
2828
#define CMPSC_SYMCACHE // (#define to enable symcache logic)
2929

30-
#define CMPSC_SYMCACHE_SIZE ( 1024 * 32 ) // (must be < 64K)
30+
#define CMPSC_SYMCACHE_SIZE ( 1024 * 32 ) // (must be < 64K)
3131

3232
///////////////////////////////////////////////////////////////////////////////
3333
// Dictionary sizes in bytes by CDSS
@@ -56,7 +56,7 @@ struct CMPSCBLK // CMPSC instruction control block
5656
U8 cdss; // Compressed-data symbol size (1-5)
5757
U8 cbn; // Compressed-data bit number (0-7)
5858
U8 cc; // Condition-Code value (0-3)
59-
U8 rsrvd1; // Reserved for future use (pad)
59+
U8 zp; // Zero-pad operand-1 when done (pad)
6060
};
6161
typedef struct CMPSCBLK CMPSCBLK;
6262

0 commit comments

Comments
 (0)